diff options
author | Rich Felker <dalias@aerifal.cx> | 2020-06-01 20:53:42 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2020-06-01 20:59:53 -0400 |
commit | c40157d87ef0b585a90ff5230fdf69cddc824d7f (patch) | |
tree | e4569c082284d1cfa4b32f92696cc8fd2f700f2f /configure | |
parent | 8d81ba8c0bc6fe31136cb15c9c82ef4c24965040 (diff) | |
download | musl-c40157d87ef0b585a90ff5230fdf69cddc824d7f.tar.gz musl-c40157d87ef0b585a90ff5230fdf69cddc824d7f.tar.bz2 musl-c40157d87ef0b585a90ff5230fdf69cddc824d7f.tar.xz musl-c40157d87ef0b585a90ff5230fdf69cddc824d7f.zip |
suppress unwanted warnings when configuring with clang
coding style warnings enabled by default in clang have long been a
source of spurious questions/bug-reports. since clang provides a -w
that behaves differently from gcc's, and that lets us enable any
warnings we may actually want after turning them all off to start with
a clean slate, use it at configure time if clang is detected.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -495,6 +495,13 @@ fnmatch '-mtune=*|*\ -mtune=*' "$CC $CFLAGS" || tryldflag CFLAGS_AUTO -mtune=gen fi # +# GCC defines -w as overriding any -W options, regardless of order, but +# clang has a bunch of annoying warnings enabled by default and needs -w +# to start from a clean slate. So use -w if building with clang. +# +test "$cc_family" = clang && tryflag CFLAGS_AUTO -w + +# # Even with -std=c99, gcc accepts some constructs which are constraint # violations. We want to treat these as errors regardless of whether # other purely stylistic warnings are enabled -- especially implicit |