[Mesa-dev] [PATCH 1/2] Sort/Unify CFLAGS and CXXFLAGS.

Jakob Bornecrantz jakob at vmware.com
Sat Oct 8 07:59:53 PDT 2011


----- Original Message -----
> ---
>  configure.ac |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 49e81ad..942084b 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1875,9 +1875,9 @@ dnl Restore LDFLAGS and CPPFLAGS
>  LDFLAGS="$_SAVE_LDFLAGS"
>  CPPFLAGS="$_SAVE_CPPFLAGS"
>  
> -dnl Add user CFLAGS and CXXFLAGS
> -CFLAGS="$CFLAGS $USER_CFLAGS"
> -CXXFLAGS="$CXXFLAGS $USER_CXXFLAGS"
> +dnl Add user CFLAGS and CXXFLAGS and sort them
> +CFLAGS=`echo "$CFLAGS $USER_CFLAGS"|tr " " "\n"|sort -u|tr "\n" " "`
> +CXXFLAGS=`echo "$CXXFLAGS $USER_CXXFLAGS"|tr " " "\n"|sort -u|tr

NACK, order matters for example "-O3 -O0" would be sorted as "-O0 -O3"
and have different meanings.

Cheers Jakob.


More information about the mesa-dev mailing list