mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-03 18:13:01 +00:00
Adjust CFLAGS and CXXFLAGS for compilation with clang. The current
setting suppresses almost all warnings originating in source code constructs. It does ot yet suppress warnings from unrecognised command line flags as they may be the reason for regression test failures which have not yet been investigated. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13619
This commit is contained in:
parent
f43cafa3f0
commit
4f1758438b
@ -31,6 +31,13 @@ if HAS_WRITE_STRINGS_WARNING
|
||||
CFLAGS += -Wno-write-strings
|
||||
endif
|
||||
|
||||
if COMPILER_IS_CLANG
|
||||
CFLAGS += -Wno-format-extra-args # perf/tinycc.c
|
||||
CFLAGS += -Wno-literal-range # none/tests/amd64/fxtract.c
|
||||
CFLAGS += -Wno-string-plus-int # drd/tests/annotate_ignore_rw.c
|
||||
CXXFLAGS += -Wno-unused-private-field # drd/tests/tsan_unittest.cpp
|
||||
endif
|
||||
|
||||
check-local: build-noinst_DSYMS
|
||||
|
||||
clean-local: clean-noinst_DSYMS
|
||||
|
||||
@ -119,6 +119,8 @@ if test "x`${CC} --version | $SED -n -e 's/.*\(clang\) version.*/\1/p'`" = "xcla
|
||||
is_clang="clang"
|
||||
# Don't use -dumpversion with clang: it will always produce "4.2.1".
|
||||
gcc_version=`${CC} --version | $SED -n -e 's/.*clang version \([0-9.]*\).*$/\1/p'`
|
||||
CFLAGS="$CFLAGS -Wno-tautological-compare -Wno-cast-align -Wno-self-assign"
|
||||
CXXFLAGS="$CXXFLAGS -Wno-tautological-compare -Wno-cast-align -Wno-self-assign"
|
||||
else
|
||||
is_clang="notclang"
|
||||
gcc_version=`${CC} -dumpversion 2>/dev/null`
|
||||
@ -127,6 +129,7 @@ else
|
||||
fi
|
||||
fi
|
||||
]
|
||||
AM_CONDITIONAL(COMPILER_IS_CLANG, test $is_clang = clang)
|
||||
|
||||
case "${is_clang}-${gcc_version}" in
|
||||
notclang-3.*)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user