* 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.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2013-08-22 19:00:25 +02:00
parent b224c26627
commit 8f0baaac38
3 changed files with 16 additions and 6 deletions

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