|
From: <sv...@va...> - 2013-10-04 21:12:35
|
Author: florian
Date: Fri Oct 4 21:12:17 2013
New Revision: 13619
Log:
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.
Modified:
trunk/Makefile.tool-tests.am
trunk/configure.ac
Modified: trunk/Makefile.tool-tests.am
==============================================================================
--- trunk/Makefile.tool-tests.am (original)
+++ trunk/Makefile.tool-tests.am Fri Oct 4 21:12:17 2013
@@ -31,6 +31,13 @@
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
Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Fri Oct 4 21:12:17 2013
@@ -119,6 +119,8 @@
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 @@
fi
fi
]
+AM_CONDITIONAL(COMPILER_IS_CLANG, test $is_clang = clang)
case "${is_clang}-${gcc_version}" in
notclang-3.*)
|