From 28668d808ed03dd0938c5298bfef99284753b79d Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Sun, 10 Nov 2013 13:10:45 +0100 Subject: [PATCH] * configure.ac: Restore CFLAGS to TARGET_CFLAGS before external tests. Add -march=core2 when testing compile of efiemu64. Thanks Andrey Borzenkov for spotting this. --- ChangeLog | 7 +++++++ configure.ac | 13 ++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 0f4df9067..29d59587b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2013-11-09 Vladimir Serbinenko + + * 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 Add new ports: i386-xen and x86_64-xen. This allows running GRUB in diff --git a/configure.ac b/configure.ac index 3232a8089..b321ae41c 100644 --- a/configure.ac +++ b/configure.ac @@ -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