diff options
Diffstat (limited to 'config/always-no-aggressive-loop-optimizations.m4')
-rw-r--r-- | config/always-no-aggressive-loop-optimizations.m4 | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/config/always-no-aggressive-loop-optimizations.m4 b/config/always-no-aggressive-loop-optimizations.m4 new file mode 100644 index 000000000..8f2115ae6 --- /dev/null +++ b/config/always-no-aggressive-loop-optimizations.m4 @@ -0,0 +1,20 @@ +dnl # +dnl # Check if gcc supports -fno-aggressive-loop-optimizations +dnl # +AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_NO_AGGRESSIVE_LOOP_OPTIMIZATIONS], [ + AC_MSG_CHECKING([for -fno-aggressive-loop-optimizations support]) + + saved_flags="$CFLAGS" + CFLAGS="$CFLAGS -fno-aggressive-loop-optimizations" + + AC_RUN_IFELSE([AC_LANG_PROGRAM([], [])], [ + NO_AGGRESSIVE_LOOP_OPTIMIZATIONS=-fno-aggressive-loop-optimizations + AC_MSG_RESULT([yes]) + ], [ + NO_AGGRESSIVE_LOOP_OPTIMIZATIONS= + AC_MSG_RESULT([no]) + ]) + + CFLAGS="$saved_flags" + AC_SUBST([NO_AGGRESSIVE_LOOP_OPTIMIZATIONS]) +]) |