summaryrefslogtreecommitdiffstats
path: root/config/always-no-aggressive-loop-optimizations.m4
blob: 0a5576de179d95f5735fbf86ddfef41802bdfcd1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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_COMPILE_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])
])