configure.ac: look for whole words in LLVM flags, not prefixes
authorMarek Olšák <maraeo@gmail.com>
Tue, 27 Nov 2012 22:56:04 +0000 (23:56 +0100)
committerMarek Olšák <maraeo@gmail.com>
Wed, 28 Nov 2012 23:07:27 +0000 (00:07 +0100)
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
configure.ac

index ec06d37..c5cc249 100644 (file)
@@ -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'
 }