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 ec06d379b2c219a0a30fcb22b104bb736172ae36..c5cc2495d6ca66d8ba7ee7f86eee6174f0fc578f 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'
 }