[Mesa-dev] [PATCH v2] configure.ac: Use POSIX word boundary regex.

Eric Engestrom eric at engestrom.ch
Sun Mar 19 11:57:39 UTC 2017


On Saturday, 2017-03-18 05:18:17 +0000, Vinson Lee wrote:
> Fixes: fe56c745b8cb ("Convert sed(1) syntax to be compatible with FreeBSD and OpenBSD")

I'm not sure about that Fixes: tag… you may have seen this issue after
this commit, but it's unrelated, code-wise.

I don't really care though, and the patch itself looks good :)
Reviewed-by: Eric Engestrom <eric at engestrom.ch>

Cheers,
  Eric

> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100236
> Suggested-by: Jan Beich <jbeich at freebsd.org>
> Suggested-by: Michel Dänzer <michel at daenzer.net>
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
> ---
>  configure.ac | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 8c9d756f294e..dbf0bf83185b 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -907,19 +907,19 @@ llvm_add_target() {
>  # 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 \
> +    echo " `$1` " | sed -E \
>          -e 's/[[[:space:]]]+-m[[^[:space:]]]*//g' \
> -        -e 's/[[[:space:]]]+-DNDEBUG\>//g' \
> -        -e 's/[[[:space:]]]+-D_GNU_SOURCE\>//g' \
> -        -e 's/[[[:space:]]]+-pedantic\>//g' \
> +        -e 's/[[[:space:]]]+-DNDEBUG[[[:space:]]]//g' \
> +        -e 's/[[[:space:]]]+-D_GNU_SOURCE[[[:space:]]]//g' \
> +        -e 's/[[[:space:]]]+-pedantic[[[:space:]]]//g' \
>          -e 's/[[[:space:]]]+-W[[^[:space:]]]*//g' \
>          -e 's/[[[:space:]]]+-O[[^[:space:]]]*//g' \
>          -e 's/[[[:space:]]]+-g[[^[:space:]]]*//g' \
> -        -e 's/-fno-rtti\>/-Fno-rtti/g' \
> +        -e 's/-fno-rtti[[[:space:]]]/-Fno-rtti /g' \
>          -e 's/[[[:space:]]]+-f[[^[:space:]]]*//g' \
> -        -e 's/-Fno-rtti\>/-fno-rtti/g' \
> -        -e 's/^[[[:space:]]]//'
> +        -e 's/-Fno-rtti[[[:space:]]]/-fno-rtti /g' \
> +        -e 's/^[[[:space:]]]//' \
> +        -e 's/[[[:space:]]]$//'

One nit: we could strip all the whitespace on either end, not just the
first and last ones, ie. add a `+` after the last `]` on these last two
lines.

>  }
>  
>  llvm_set_environment_variables() {
> -- 
> 2.12.0
> 


More information about the mesa-dev mailing list