[Mesa-dev] [PATCH 3/3] configure.ac: adjust strip_unwanted_llvm_flags to fix build with LLVM 5.0svn

Marek Olšák maraeo at gmail.com
Tue Mar 21 22:40:16 UTC 2017


This looks like a bug in LLVM. Not sure if Mesa should do anything about it:

llvm-config --cxxflags
-I/usr/llvm/x86_64-linux-gnu/include  -fPIC
-fvisibility-inlines-hidden -Werror=date-time -std=c++11 -Wall -W
-Wno-unused-parameter -Wwrite-strings -Wcast-qual
-Wno-missing-field-initializers -pedantic -Wno-long-long
-Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment
-ffunction-sections -fdata-sections-O2 -g -fno-omit-frame-pointer
-fno-exceptions -fno-rtti-DLLVM_BUILD_GLOBAL_ISEL -D_GNU_SOURCE
-D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
-D__STDC_LIMIT_MACROS

Marek

On Tue, Mar 21, 2017 at 11:18 PM, Marek Olšák <maraeo at gmail.com> wrote:
> From: Marek Olšák <marek.olsak at amd.com>
>
> I get -fno-rtti-DLLVM_... in LLVM_CXX_FLAGS, so add spaces.
> ---
>  configure.ac | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 8c9d756..480f493 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -909,23 +909,23 @@ llvm_add_target() {
>  strip_unwanted_llvm_flags() {
>      # Use \> (marks the end of the word)
>      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:]]]+-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\>/-Fno-rtti /g' \
>          -e 's/[[[:space:]]]+-f[[^[:space:]]]*//g' \
> -        -e 's/-Fno-rtti\>/-fno-rtti/g' \
> +        -e 's/-Fno-rtti\>/-fno-rtti /g' \
>          -e 's/^[[[:space:]]]//'
>  }
>
>  llvm_set_environment_variables() {
>      if test "x$LLVM_CONFIG" != xno; then
>          LLVM_VERSION=`$LLVM_CONFIG --version | egrep -o '^[[0-9.]]+'`
>          LLVM_CPPFLAGS=`strip_unwanted_llvm_flags "$LLVM_CONFIG --cppflags"`
>          LLVM_INCLUDEDIR=`$LLVM_CONFIG --includedir`
>          LLVM_LIBDIR=`$LLVM_CONFIG --libdir`
>
> --
> 2.7.4
>


More information about the mesa-dev mailing list