* configure.ac: Check that -malign-loops works rather than assuming that

either -falign-loops or -malign-loops work.
This commit is contained in:
Vladimir Serbinenko 2013-11-07 03:25:30 +01:00
parent bb0c57ecd2
commit c966a489cf
2 changed files with 13 additions and 1 deletions

View file

@ -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.

View 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