From: Marek Olšák Date: Tue, 27 Nov 2012 22:56:04 +0000 (+0100) Subject: configure.ac: look for whole words in LLVM flags, not prefixes X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3d59cde92e22ffc651ef41f29056b7d7284bf121;p=mesa.git configure.ac: look for whole words in LLVM flags, not prefixes Reviewed-by: Tom Stellard --- diff --git a/configure.ac b/configure.ac index ec06d379b2c..c5cc2495d6c 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' }