1 dnl These options seem to only be used for the 2.4.x
3 AC_DEFUN([OPENAFS_GCC_SUPPORTS_MARCH], [
4 AC_CACHE_CHECK([if $CC accepts -march=pentium],
5 [openafs_cv_gcc_supports_march],
7 CFLAGS="-MARCH=pentium"
12 [openafs_cv_gcc_supports_march=yes],
13 [openafs_cv_gcc_supports_march=no])
16 AS_IF([test x$openafs_cv_gcc_supports_march = xyes],
17 [P5PLUS_KOPTS="-march=pentium"],
18 [P5PLUS_KOPTS="-m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2"])
21 AC_DEFUN([OPENAFS_GCC_NEEDS_NO_STRICT_ALIASING], [
22 AC_CACHE_CHECK([if $CC needs -fno-strict-aliasing],
23 [openafs_cv_gcc_needs_no_strict_aliasing],
24 [save_CFLAGS="$CFLAGS"
25 CFLAGS="-fno-strict-aliasing"
30 [openafs_cv_gcc_needs_no_strict_aliasing=yes],
31 [openafs_cv_gcc_needs_no_strict_aliasing=no])
34 AS_IF([test x$openafs_cv_gcc_needs_no_strict_aliasing = xyes],
35 [LINUX_GCC_KOPTS="$LINUX_GCC_KOPTS -fno-strict-aliasing"])
38 AC_DEFUN([OPENAFS_GCC_NEEDS_NO_STRENGTH_REDUCE], [
39 AC_CACHE_CHECK([if $CC needs -fno-strength-reduce],
40 [openafs_cv_gcc_needs_no_strength_reduce],
41 [save_CFLAGS="$CFLAGS"
42 CFLAGS="-fno-strength-reduce"
47 [openafs_cv_gcc_needs_no_strength_reduce=yes],
48 [openafs_cv_gcc_needs_no_strength_reduce=no])
51 AS_IF([test x$openafs_cv_gcc_needs_no_strength_reduce = xyes],
52 [LINUX_GCC_KOPTS="$LINUX_GCC_KOPTS -fno-strength-reduce"])
55 AC_DEFUN([OPENAFS_GCC_SUPPORTS_NO_COMMON], [
56 AC_CACHE_CHECK([if $CC supports -fno-common],
57 [openafs_cv_gcc_supports_no_common],
58 [save_CFLAGS="$CFLAGS"
64 [openafs_cv_gcc_supports_no_common=yes],
65 [openafs_cv_gcc_supports_no_common=no])
69 AS_IF([test x$openafs_cv_gcc_supports_no_common = xyes],
70 [LINUX_GCC_KOPTS="$LINUX_GCC_KOPTS -fno-common"])
73 AC_DEFUN([OPENAFS_GCC_SUPPORTS_PIPE], [
74 AC_CACHE_CHECK([if $CC supports -pipe],
75 [openafs_cv_gcc_supports_pipe],
76 [save_CFLAGS="$CFLAGS"
82 [openafs_cv_gcc_supports_pipe=yes],
83 [openafs_cv_gcc_supports_pipe=no])
86 AS_IF([test x$openafs_cv_gcc_supports_pipe = xyes],
87 [LINUX_GCC_KOPTS="$LINUX_GCC_KOPTS -pipe"])
90 AC_DEFUN([OPENAFS_GCC_SUPPORTS_WNO_ERROR_FRAME_LARGER_THAN], [
91 AC_CACHE_CHECK([if $CC supports -Wno-error=frame-larger-than=],
92 [openafs_cv_gcc_supports_wno_error_frame_larger_than],
93 [save_CFLAGS="$CFLAGS"
94 CFLAGS="-Wno-error=frame-larger-than="
99 [openafs_cv_gcc_supports_wno_error_frame_larger_than=yes],
100 [openafs_cv_gcc_supports_wno_error_frame_larger_than=no])
101 CFLAGS="$save_CFLAGS"
103 AS_IF([test x$openafs_cv_gcc_supports_wno_error_frame_larger_than = xyes && test x"$CFLAGS_NOERROR" != x],
104 dnl Only use -Wno-error=frame-larger-than= if gcc supports it, and if
105 dnl CFLAGS_NOERROR is nonempty (so if --enable-checking=all is used, we
106 dnl don't pass -Wno-error=frame-larger-than=)
107 [CFLAGS_WNOERROR_FRAME_LARGER_THAN="-Wno-error=frame-larger-than="])
108 AC_SUBST([CFLAGS_WNOERROR_FRAME_LARGER_THAN])