automake: strip LLVM_CXXFLAGS and LLVM_CPPFLAGS too
authorMaarten Lankhorst <maarten.lankhorst@canonical.com>
Mon, 19 Nov 2012 08:43:29 +0000 (09:43 +0100)
committerMaarten Lankhorst <maarten.lankhorst@canonical.com>
Mon, 19 Nov 2012 08:43:29 +0000 (09:43 +0100)
It seems that -NDEBUG and other flags might still be leaked through
those variables, so strip those off there as well.

NOTE: This is a candidate for the 9.0 branch.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
configure.ac

index 228f464c18cc60984ab0b361617e5d05aa607e91..f484dc4d6a20cacdbd270afad8031c68e605d26e 100644 (file)
@@ -1675,8 +1675,8 @@ if test "x$enable_gallium_llvm" = xyes; then
        fi
        LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags`
        LLVM_BINDIR=`$LLVM_CONFIG --bindir`
-       LLVM_CXXFLAGS=`$LLVM_CONFIG --cxxflags`
-       LLVM_CPPFLAGS=`$LLVM_CONFIG --cppflags`
+       LLVM_CXXFLAGS=`$LLVM_CONFIG --cxxflags|sed -e 's/-DNDEBUG\>//g' -e 's/-pedantic//g' -e 's/-Wcovered-switch-default//g'`
+       LLVM_CPPFLAGS=`$LLVM_CONFIG --cppflags|sed -e 's/-DNDEBUG\>//g' -e 's/-pedantic//g' -e 's/-Wcovered-switch-default//g'`
        LLVM_INCLUDEDIR=`$LLVM_CONFIG --includedir`
        LLVM_LIBDIR=`$LLVM_CONFIG --libdir`
        DEFINES="${DEFINES} -DHAVE_LLVM=`echo $LLVM_VERSION | sed -e 's/\([[0-9]]\)\.\([[0-9]]\)/0x0\10\2/g'`"