Lines Matching +full:- +full:- +full:enable +full:- +full:asan
2 dnl # Enabled -fsanitize=address if supported by $CC.
4 dnl # LDFLAGS needs -fsanitize=address at all times so libraries compiled with
8 dnl # the behavior of binaries and libraries build with -fsanitize=address.
11 AC_MSG_CHECKING([whether to build with -fsanitize=address support])
12 AC_ARG_ENABLE([asan],
13 [AS_HELP_STRING([--enable-asan],
14 [Enable -fsanitize=address support @<:@default=no@:>@])],
23 AC_MSG_CHECKING([whether $CC supports -fsanitize=address])
25 CFLAGS="$CFLAGS -Werror -fsanitize=address"
29 ASAN_CFLAGS="-fsanitize=address"
30 ASAN_LDFLAGS="-fsanitize=address"
34 AC_MSG_ERROR([$CC does not support -fsanitize=address])
49 dnl # Enabled -fsanitize=undefined if supported by cc.
51 dnl # LDFLAGS needs -fsanitize=undefined at all times so libraries compiled with
55 dnl # the behavior of binaries and libraries build with -fsanitize=undefined.
58 AC_MSG_CHECKING([whether to build with -fsanitize=undefined support])
60 [AS_HELP_STRING([--enable-ubsan],
61 [Enable -fsanitize=undefined support @<:@default=no@:>@])],
70 AC_MSG_CHECKING([whether $CC supports -fsanitize=undefined])
72 CFLAGS="$CFLAGS -Werror -fsanitize=undefined"
76 UBSAN_CFLAGS="-fsanitize=undefined"
77 UBSAN_LDFLAGS="-fsanitize=undefined"
81 AC_MSG_ERROR([$CC does not support -fsanitize=undefined])
96 dnl # Check if cc supports -Wframe-larger-than=<size> option.
99 AC_MSG_CHECKING([whether $CC supports -Wframe-larger-than=<size>])
102 CFLAGS="$CFLAGS -Werror -Wframe-larger-than=4096"
105 FRAME_LARGER_THAN="-Wframe-larger-than=4096"
117 dnl # Check if cc supports -Wno-format-truncation option.
120 AC_MSG_CHECKING([whether $CC supports -Wno-format-truncation])
123 CFLAGS="$CFLAGS -Werror -Wno-format-truncation"
126 NO_FORMAT_TRUNCATION=-Wno-format-truncation
138 dnl # Check if cc supports -Wno-format-zero-length option.
141 AC_MSG_CHECKING([whether $CC supports -Wno-format-zero-length])
144 CFLAGS="$CFLAGS -Werror -Wno-format-zero-length"
147 NO_FORMAT_ZERO_LENGTH=-Wno-format-zero-length
159 dnl # Check if cc supports -Wno-clobbered option.
161 dnl # We actually invoke it with the -Wclobbered option
162 dnl # and infer the 'no-' version does or doesn't exist based upon
164 dnl # no- prefixed options gcc always returns success.
167 AC_MSG_CHECKING([whether $CC supports -Wno-clobbered])
170 CFLAGS="$CFLAGS -Werror -Wclobbered"
173 NO_CLOBBERED=-Wno-clobbered
185 dnl # Check if cc supports -Wimplicit-fallthrough option.
188 AC_MSG_CHECKING([whether $CC supports -Wimplicit-fallthrough])
191 CFLAGS="$CFLAGS -Werror -Wimplicit-fallthrough"
194 IMPLICIT_FALLTHROUGH=-Wimplicit-fallthrough
196 [Define if compiler supports -Wimplicit-fallthrough])
208 dnl # Check if cc supports -Winfinite-recursion option.
211 AC_MSG_CHECKING([whether $CC supports -Winfinite-recursion])
214 CFLAGS="$CFLAGS -Werror -Winfinite-recursion"
217 INFINITE_RECURSION=-Winfinite-recursion
219 [Define if compiler supports -Winfinite-recursion])
231 dnl # Check if kernel cc supports -Winfinite-recursion option.
234 AC_MSG_CHECKING([whether $KERNEL_CC supports -Winfinite-recursion])
239 CFLAGS="$CFLAGS -Werror -Winfinite-recursion"
241 AS_IF([ test -n "$KERNEL_CC" ], [
244 AS_IF([ test -n "$KERNEL_LLVM" ], [
249 KERNEL_INFINITE_RECURSION=-Winfinite-recursion
251 [Define if compiler supports -Winfinite-recursion])
264 dnl # Check if cc supports -Wformat-overflow option.
267 AC_MSG_CHECKING([whether $CC supports -Wformat-overflow])
270 CFLAGS="$CFLAGS -Werror -Wformat-overflow"
273 FORMAT_OVERFLOW=-Wformat-overflow
275 [Define if compiler supports -Wformat-overflow])
287 dnl # Check if cc supports -fno-omit-frame-pointer option.
290 AC_MSG_CHECKING([whether $CC supports -fno-omit-frame-pointer])
293 CFLAGS="$CFLAGS -Werror -fno-omit-frame-pointer"
296 NO_OMIT_FRAME_POINTER=-fno-omit-frame-pointer
308 dnl # Check if cc supports -fno-ipa-sra option.
311 AC_MSG_CHECKING([whether $CC supports -fno-ipa-sra])
314 CFLAGS="$CFLAGS -Werror -fno-ipa-sra"
317 NO_IPA_SRA=-fno-ipa-sra
329 dnl # Check if kernel cc supports -fno-ipa-sra option.
332 AC_MSG_CHECKING([whether $KERNEL_CC supports -fno-ipa-sra])
337 CFLAGS="$CFLAGS -Werror -fno-ipa-sra"
339 AS_IF([ test -n "$KERNEL_CC" ], [
342 AS_IF([ test -n "$KERNEL_LLVM" ], [
347 KERNEL_NO_IPA_SRA=-fno-ipa-sra