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])
 
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to