Lines Matching +full:- +full:werror
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])
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 kernel cc supports -Wno-format-zero-length option.
164 [ test -n "$KERNEL_CC" ], [ CC="$KERNEL_CC" ],
165 [ test -n "$KERNEL_LLVM" ], [ CC="clang" ],
168 AC_MSG_CHECKING([whether $CC supports -Wno-format-zero-length])
171 CFLAGS="$CFLAGS -Werror -Wno-format-zero-length"
174 KERNEL_NO_FORMAT_ZERO_LENGTH=-Wno-format-zero-length
187 dnl # Check if cc supports -Wno-clobbered option.
189 dnl # We actually invoke it with the -Wclobbered option
190 dnl # and infer the 'no-' version does or doesn't exist based upon
192 dnl # no- prefixed options gcc always returns success.
195 AC_MSG_CHECKING([whether $CC supports -Wno-clobbered])
198 CFLAGS="$CFLAGS -Werror -Wclobbered"
201 NO_CLOBBERED=-Wno-clobbered
213 dnl # Check if cc supports -Wno-atomic-alignment option.
216 AC_MSG_CHECKING([whether $CC supports -Wno-atomic-alignment])
219 CFLAGS="$CFLAGS -Werror -Wno-atomic-alignment"
222 NO_ATOMIC_ALIGNMENT=-Wno-atomic-alignment
234 dnl # Check if cc supports -Wimplicit-fallthrough option.
237 AC_MSG_CHECKING([whether $CC supports -Wimplicit-fallthrough])
240 CFLAGS="$CFLAGS -Werror -Wimplicit-fallthrough"
243 IMPLICIT_FALLTHROUGH=-Wimplicit-fallthrough
245 [Define if compiler supports -Wimplicit-fallthrough])
257 dnl # Check if cc supports -Winfinite-recursion option.
260 AC_MSG_CHECKING([whether $CC supports -Winfinite-recursion])
263 CFLAGS="$CFLAGS -Werror -Winfinite-recursion"
266 INFINITE_RECURSION=-Winfinite-recursion
268 [Define if compiler supports -Winfinite-recursion])
280 dnl # Check if kernel cc supports -Winfinite-recursion option.
285 [ test -n "$KERNEL_CC" ], [ CC="$KERNEL_CC" ],
286 [ test -n "$KERNEL_LLVM" ], [ CC="clang" ],
289 AC_MSG_CHECKING([whether $CC supports -Winfinite-recursion])
292 CFLAGS="$CFLAGS -Werror -Winfinite-recursion"
295 KERNEL_INFINITE_RECURSION=-Winfinite-recursion
297 [Define if compiler supports -Winfinite-recursion])
310 dnl # Check if cc supports -Wformat-overflow option.
313 AC_MSG_CHECKING([whether $CC supports -Wformat-overflow])
316 CFLAGS="$CFLAGS -Werror -Wformat-overflow"
319 FORMAT_OVERFLOW=-Wformat-overflow
321 [Define if compiler supports -Wformat-overflow])
333 dnl # Check if cc supports -fno-omit-frame-pointer option.
336 AC_MSG_CHECKING([whether $CC supports -fno-omit-frame-pointer])
339 CFLAGS="$CFLAGS -Werror -fno-omit-frame-pointer"
342 NO_OMIT_FRAME_POINTER=-fno-omit-frame-pointer
354 dnl # Check if cc supports -fno-ipa-sra option.
357 AC_MSG_CHECKING([whether $CC supports -fno-ipa-sra])
360 CFLAGS="$CFLAGS -Werror -fno-ipa-sra"
363 NO_IPA_SRA=-fno-ipa-sra
375 dnl # Check if kernel cc supports -fno-ipa-sra option.
380 [ test -n "$KERNEL_CC" ], [ CC="$KERNEL_CC" ],
381 [ test -n "$KERNEL_LLVM" ], [ CC="clang" ],
384 AC_MSG_CHECKING([whether $CC supports -fno-ipa-sra])
387 CFLAGS="$CFLAGS -Werror -fno-ipa-sra"
390 KERNEL_NO_IPA_SRA=-fno-ipa-sra