aboutsummaryrefslogtreecommitdiffstats
path: root/config/always-no-aggressive-loop-optimizations.m4
blob: 8f2115ae686bcd3269d57189e1c14eb9b3c83d0e (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_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])
])