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: 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
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
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, [