[Mesa-dev] [PATCH] Remove CFLAGS and CXXFLAGS which clang does not support. Fixes: clang-3: warning: argument unused during compilation: '-fno-builtin-memcmp' The checks could be also done where '-fno-builtin-memcmp' become added (lines 217 and 240) but this would not remove it if set by user.

Johannes Obermayr johannesobermayr at gmx.de
Sat Mar 3 08:06:51 PST 2012


---
 configure.ac |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/configure.ac b/configure.ac
index a2d906a..44c4e65 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1946,6 +1946,12 @@ dnl Add user CFLAGS and CXXFLAGS
 CFLAGS="$CFLAGS $USER_CFLAGS"
 CXXFLAGS="$CXXFLAGS $USER_CXXFLAGS"
 
+dnl Remove CFLAGS and CXXFLAGS which clang does not support
+if test "x$acv_mesa_CLANG" = xyes; then
+    CFLAGS=`echo $CFLAGS | sed 's/-fno-builtin-memcmp//g'`
+    CXXFLAGS=`echo $CXXFLAGS | sed 's/-fno-builtin-memcmp//g'`
+fi
+
 dnl Substitute the config
 AC_CONFIG_FILES([configs/autoconf
 		src/gallium/drivers/r300/Makefile
-- 
1.7.7



More information about the mesa-dev mailing list