]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* configure.ac: Check that -malign-loops works rather than assuming that
authorVladimir Serbinenko <phcoder@gmail.com>
Thu, 7 Nov 2013 02:25:30 +0000 (03:25 +0100)
committerVladimir Serbinenko <phcoder@gmail.com>
Thu, 7 Nov 2013 02:25:30 +0000 (03:25 +0100)
either -falign-loops or -malign-loops work.

ChangeLog
configure.ac

index ffb87f386925f863ccfb48623c9cbfa0f62eb8ba..dabc4120a9b8260dba08824512867094bf201e1d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-11-07  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * configure.ac: Check that -malign-loops works rather than assuming that
+       either -falign-loops or -malign-loops work.
+
 2013-11-07  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * configure.ac: Remove -fnested-functions. We don't need it anymore.
index cebf27fbe557e56c898b254a58613428a115774e..081bbdde42f7cb26dd513d8db1bd972ab8e5a3fd 100644 (file)
@@ -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