From: Vladimir Serbinenko Date: Thu, 7 Nov 2013 02:25:30 +0000 (+0100) Subject: * configure.ac: Check that -malign-loops works rather than assuming that X-Git-Tag: grub-2.02-beta1~458 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c966a489cf0b7f1ffa10b8ca0406d0f206b39fcf;p=thirdparty%2Fgrub.git * configure.ac: Check that -malign-loops works rather than assuming that either -falign-loops or -malign-loops work. --- diff --git a/ChangeLog b/ChangeLog index ffb87f386..dabc4120a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-11-07 Vladimir Serbinenko + + * configure.ac: Check that -malign-loops works rather than assuming that + either -falign-loops or -malign-loops work. + 2013-11-07 Vladimir Serbinenko * configure.ac: Remove -fnested-functions. We don't need it anymore. diff --git a/configure.ac b/configure.ac index cebf27fbe..081bbdde4 100644 --- a/configure.ac +++ b/configure.ac @@ -485,9 +485,16 @@ if test "x$target_cpu" = xi386; then [grub_cv_cc_falign_loop=no]) ]) + AC_CACHE_CHECK([whether -malign-loops works], [grub_cv_cc_malign_loop], [ + CFLAGS="$TARGET_CFLAGS -malign-loops=1" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], + [grub_cv_cc_malign_loop=yes], + [grub_cv_cc_malign_loop=no]) + ]) + if test "x$grub_cv_cc_falign_loop" = xyes; then TARGET_CFLAGS="$TARGET_CFLAGS -falign-jumps=1 -falign-loops=1 -falign-functions=1" - else + elif test "x$grub_cv_cc_malign_loop" = xyes; then TARGET_CFLAGS="$TARGET_CFLAGS -malign-jumps=1 -malign-loops=1 -malign-functions=1" fi fi