]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* configure.ac: Add -Wl,-melf_i386 and -Wl,-melf_x86_64 systematically
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Thu, 22 Aug 2013 17:00:25 +0000 (19:00 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Thu, 22 Aug 2013 17:00:25 +0000 (19:00 +0200)
when on x86 and not cygwin.
* conf/Makefile.common: Remove unsystematic -Wl,-melf_i386 and
-Wl,-melf_x86_64.

ChangeLog
conf/Makefile.common
configure.ac

index 361faaa142289efbfef4cf158bec82a52df38d9b..a9a3db909dc3a8d397d0b750391ac85c4ce3e261 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2013-08-22  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * configure.ac: Add -Wl,-melf_i386 and -Wl,-melf_x86_64 systematically
+       when on x86 and not cygwin.
+       * conf/Makefile.common: Remove unsystematic -Wl,-melf_i386 and
+       -Wl,-melf_x86_64.
+
 2013-08-22  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * configure.ac: Set CPP to build one when checkoing for freetype for
index 2320ad053cafa8e90da763ba083df8c71cfb7ed8..465fd74240031f1ba4a09ad40dc19465e36b0bcd 100644 (file)
@@ -10,12 +10,6 @@ unexport LC_ALL
 if COND_i386_pc
   CFLAGS_PLATFORM += -mrtd -mregparm=3
 endif
-if COND_i386_efi
-  LDFLAGS_PLATFORM = -Wl,-melf_i386
-endif
-if COND_x86_64_efi
-  LDFLAGS_PLATFORM = -Wl,-melf_x86_64
-endif
 if COND_i386_qemu
   CFLAGS_PLATFORM += -mrtd -mregparm=3
 endif
index de9cb24a5b64bb6eb7702637c72e9dc998bf9345..58dd2b8728de89dae07413c4f074be0f86dbeec2 100644 (file)
@@ -617,6 +617,15 @@ if test "x$target_m64" = x1; then
   TARGET_MODULE_FORMAT="elf64"
 fi
 
+if test x"$target_os" != xcygwin; then
+   if test x"$target_cpu" = xi386; then
+     TARGET_LDFLAGS="$TARGET_LDFLAGS -Wl,-melf_i386"
+   fi
+   if test x"$target_cpu" = xx86_64; then
+     TARGET_LDFLAGS="$TARGET_LDFLAGS -Wl,-melf_x86_64"
+   fi
+fi
+
 if test "$target_cpu" = x86_64; then
   # Use large model to support 4G memory
   AC_CACHE_CHECK([whether option -mcmodel=large works], grub_cv_cc_mcmodel, [