* configure.ac: Restore CFLAGS to TARGET_CFLAGS before external tests.

Add -march=core2 when testing compile of efiemu64.

	Thanks Andrey Borzenkov for spotting this.
This commit is contained in:
Vladimir Serbinenko 2013-11-10 13:10:45 +01:00
parent 9612ebc00e
commit 28668d808e
2 changed files with 19 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2013-11-09 Vladimir Serbinenko <phcoder@gmail.com>
* configure.ac: Restore CFLAGS to TARGET_CFLAGS before external tests.
Add -march=core2 when testing compile of efiemu64.
Thanks Andrey Borzenkov for spotting this.
2013-11-09 Vladimir Serbinenko <phcoder@gmail.com>
Add new ports: i386-xen and x86_64-xen. This allows running GRUB in

View File

@ -672,7 +672,7 @@ if test x"$platform" = xefi ; then
fi
if test x"$efiemu_excuse" = x ; then
AC_CACHE_CHECK([whether options required for efiemu work], grub_cv_cc_efiemu, [
CFLAGS="$TARGET_CFLAGS -m64 -mcmodel=large -mno-red-zone -nostdlib"
CFLAGS="$TARGET_CFLAGS -march=core2 -m64 -mcmodel=large -mno-red-zone -nostdlib"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
[grub_cv_cc_efiemu=yes],
[grub_cv_cc_efiemu=no])
@ -762,6 +762,8 @@ fi
# Compiler features.
#
CFLAGS="$TARGET_CFLAGS"
# Position independent executable.
grub_CHECK_PIE
[# Need that, because some distributions ship compilers that include
@ -770,6 +772,8 @@ if [ x"$pie_possible" = xyes ]; then
TARGET_CFLAGS="$TARGET_CFLAGS -fno-PIE"
fi]
CFLAGS="$TARGET_CFLAGS"
# Position independent executable.
grub_CHECK_PIC
[# Need that, because some distributions ship compilers that include
@ -778,6 +782,8 @@ if [ x"$pic_possible" = xyes ]; then
TARGET_CFLAGS="$TARGET_CFLAGS -fno-PIC"
fi]
CFLAGS="$TARGET_CFLAGS"
# Smashing stack protector.
grub_CHECK_STACK_PROTECTOR
# Need that, because some distributions ship compilers that include
@ -785,6 +791,9 @@ grub_CHECK_STACK_PROTECTOR
if test "x$ssp_possible" = xyes; then
TARGET_CFLAGS="$TARGET_CFLAGS -fno-stack-protector"
fi
CFLAGS="$TARGET_CFLAGS"
grub_CHECK_STACK_ARG_PROBE
# Cygwin's GCC uses alloca() to probe the stackframe on static
# stack allocations above some threshold.
@ -792,6 +801,8 @@ if test x"$sap_possible" = xyes; then
TARGET_CFLAGS="$TARGET_CFLAGS -mno-stack-arg-probe"
fi
CFLAGS="$TARGET_CFLAGS"
# -mno-unaligned-access
if test "$target_cpu" = arm; then
grub_CHECK_NO_UNALIGNED_ACCESS