[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug: cygwin support breaks cross compiles on cygwin
From: |
Christian Franke |
Subject: |
Re: bug: cygwin support breaks cross compiles on cygwin |
Date: |
Fri, 08 Aug 2008 12:36:10 +0200 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.16) Gecko/20080702 SeaMonkey/1.1.11 |
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
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])