On 03/03/2012 08:06 AM, Johannes Obermayr wrote:
---
  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

This works, but I wonder if we should instead import something like XORG_TESTSET_CFLAG from xorg-util-macros. That would allow us to easily, in one line of code, enable flags when they're supported by the underlying compiler. It would handle this and clean up a bunch of our other flag handling (like warning flags).

I don't think we can depend on xorg-util-macros, but we could probably copy part of it into Mesa.
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to