* 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

@ -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> 2013-08-22 Vladimir Serbinenko <phcoder@gmail.com>
* configure.ac: Set CPP to build one when checkoing for freetype for * configure.ac: Set CPP to build one when checkoing for freetype for

View file

@ -10,12 +10,6 @@ unexport LC_ALL
if COND_i386_pc if COND_i386_pc
CFLAGS_PLATFORM += -mrtd -mregparm=3 CFLAGS_PLATFORM += -mrtd -mregparm=3
endif 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 if COND_i386_qemu
CFLAGS_PLATFORM += -mrtd -mregparm=3 CFLAGS_PLATFORM += -mrtd -mregparm=3
endif endif

View file

@ -617,6 +617,15 @@ if test "x$target_m64" = x1; then
TARGET_MODULE_FORMAT="elf64" TARGET_MODULE_FORMAT="elf64"
fi 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 if test "$target_cpu" = x86_64; then
# Use large model to support 4G memory # Use large model to support 4G memory
AC_CACHE_CHECK([whether option -mcmodel=large works], grub_cv_cc_mcmodel, [ AC_CACHE_CHECK([whether option -mcmodel=large works], grub_cv_cc_mcmodel, [