[Mesa-dev] [PATCH 3/4] configure.ac: look for whole words in LLVM flags, not prefixes

Marek Olšák maraeo at gmail.com
Wed Nov 28 08:58:03 PST 2012


---
 configure.ac |   11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index ec06d37..c5cc249 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1644,13 +1644,14 @@ AC_ARG_WITH([llvm-prefix],
 # Call this inside ` ` to get the return value.
 # $1 is the llvm-config command with arguments.
 strip_unwanted_llvm_flags() {
+    # Use \> (marks the end of the word)
     echo `$1` | sed \
 	-e 's/-DNDEBUG\>//g' \
-	-e 's/-pedantic//g' \
-	-e 's/-Wcovered-switch-default//g' \
-	-e 's/-O.//g' \
-	-e 's/-g//g' \
-	-e 's/-Wall//g'
+	-e 's/-pedantic\>//g' \
+	-e 's/-Wcovered-switch-default\>//g' \
+	-e 's/-O.\>//g' \
+	-e 's/-g\>//g' \
+	-e 's/-Wall\>//g'
 }
 
 
-- 
1.7.10.4



More information about the mesa-dev mailing list