All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Franke <Christian.Franke@t-online.de>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: bug: cygwin support breaks cross compiles on cygwin
Date: Fri, 08 Aug 2008 12:36:10 +0200	[thread overview]
Message-ID: <489C219A.3000900@t-online.de> (raw)
In-Reply-To: <g7h257$r1l$1@ger.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 621 bytes --]

Patrick Georgi wrote:
> Hi,
>
> I used cygwin to build grub2/i386-coreboot using an i386-elf cross 
> compiler. unfortunately the test in configure only looks for the host 
> platform and enables pe2elf in that case, even though my compiler 
> emits ELF already.
>
> my workaround is to just change that test (there's no OS cyg_win), but 
> of course that's no permanent solution.
> Bean proposed on IRC to look if the target compiler emits PE, and 
> enable pe2elf based on that.
>
>
Thanks for the info.

A simple fix is probably a test for target_os also, please try attached 
patch (and re-run autoconf).

Christian


[-- Attachment #2: grub2-configure.patch --]
[-- Type: text/x-diff, Size: 536 bytes --]

diff --git a/configure.ac b/configure.ac
index 7a5938a..41e08f1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -206,9 +206,10 @@ AC_MSG_RESULT([$TARGET_IMG_LDFLAGS_AC])
 
 # For platforms where ELF is not the default link format.
 AC_MSG_CHECKING([for command to convert module to ELF format])
-if test "$host_os" = cygwin; then
-  TARGET_OBJ2ELF='grub-pe2elf.exe'
-fi
+case "${host_os}:${target_os}" in
+  cygwin:cygwin) TARGET_OBJ2ELF='grub-pe2elf.exe' ;;
+  *) ;;
+esac
 AC_SUBST(TARGET_OBJ2ELF)
 AC_MSG_RESULT([$TARGET_OBJ2ELF])
 

  parent reply	other threads:[~2008-08-08 10:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-08  9:03 bug: cygwin support breaks cross compiles on cygwin Patrick Georgi
2008-08-08 10:17 ` Bean
2008-08-08 10:36 ` Christian Franke [this message]
2008-08-08 11:09 ` Robert Millan
2008-08-08 12:59   ` Christian Franke
2008-08-08 13:37     ` Felix Zielcke
2008-08-08 21:13       ` Christian Franke
2008-08-09  9:20         ` Felix Zielcke
2008-08-09 13:08           ` Christian Franke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=489C219A.3000900@t-online.de \
    --to=christian.franke@t-online.de \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.