Re: [Mesa-dev] [PATCH 07/18] configure: add CXX11_CXXFLAGS to LLVM_CXXFLAGS

2018-12-14 Thread Dylan Baker
Quoting Emil Velikov (2018-12-13 08:05:56)
> From: Emil Velikov 
> 
> Seemingly with LLVM7 and GCC 5.0, the former won't properly advertise
> -std=c++11 and the latter will choke.
> 
> dd this temporary workaround, otherwise we'll get errors like:
> 
> In file included from /usr/include/c++/5/type_traits:35:0,
>  from /usr/lib/llvm-7/include/llvm/Support/type_traits.h:18,
>  from /usr/lib/llvm-7/include/llvm/ADT/Optional.h:22,
>  from /usr/lib/llvm-7/include/llvm/ADT/STLExtras.h:20,
>  from /usr/lib/llvm-7/include/llvm/ADT/StringRef.h:13,
>  from /usr/lib/llvm-7/include/llvm/Target/TargetMachine.h:17,
>  from ../../../src/amd/common/ac_llvm_helper.cpp:36:
> /usr/include/c++/5/bits/c++0x_warning.h:32:2: error: #error This file 
> requires compiler and library support for the ISO C++ 2011 standard. This 
> support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
> 
> Signed-off-by: Emil Velikov 
> ---
>  configure.ac | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/configure.ac b/configure.ac
> index 5d3da4b7c48..e5e95f12732 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -2903,6 +2903,7 @@ if test "x$enable_llvm" = xyes; then
>  LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags`
>  LLVM_CFLAGS=$LLVM_CPPFLAGS   # CPPFLAGS seem to be sufficient
>  LLVM_CXXFLAGS=`strip_unwanted_llvm_flags "$LLVM_CONFIG --cxxflags"`
> +LLVM_CXXFLAGS="$CXX11_CXXFLAGS $LLVM_CXXFLAGS"
>  
>  dnl Set LLVM_LIBS - This is done after the driver configuration so
>  dnl that drivers can add additional components to LLVM_COMPONENTS.
> -- 
> 2.19.2
> 

This is why in meson I just assume C++11 all the time...

Reviewed-by: Dylan Baker 


signature.asc
Description: signature
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 07/18] configure: add CXX11_CXXFLAGS to LLVM_CXXFLAGS

2018-12-13 Thread Emil Velikov
From: Emil Velikov 

Seemingly with LLVM7 and GCC 5.0, the former won't properly advertise
-std=c++11 and the latter will choke.

dd this temporary workaround, otherwise we'll get errors like:

In file included from /usr/include/c++/5/type_traits:35:0,
 from /usr/lib/llvm-7/include/llvm/Support/type_traits.h:18,
 from /usr/lib/llvm-7/include/llvm/ADT/Optional.h:22,
 from /usr/lib/llvm-7/include/llvm/ADT/STLExtras.h:20,
 from /usr/lib/llvm-7/include/llvm/ADT/StringRef.h:13,
 from /usr/lib/llvm-7/include/llvm/Target/TargetMachine.h:17,
 from ../../../src/amd/common/ac_llvm_helper.cpp:36:
/usr/include/c++/5/bits/c++0x_warning.h:32:2: error: #error This file requires 
compiler and library support for the ISO C++ 2011 standard. This support must 
be enabled with the -std=c++11 or -std=gnu++11 compiler options.

Signed-off-by: Emil Velikov 
---
 configure.ac | 1 +
 1 file changed, 1 insertion(+)

diff --git a/configure.ac b/configure.ac
index 5d3da4b7c48..e5e95f12732 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2903,6 +2903,7 @@ if test "x$enable_llvm" = xyes; then
 LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags`
 LLVM_CFLAGS=$LLVM_CPPFLAGS   # CPPFLAGS seem to be sufficient
 LLVM_CXXFLAGS=`strip_unwanted_llvm_flags "$LLVM_CONFIG --cxxflags"`
+LLVM_CXXFLAGS="$CXX11_CXXFLAGS $LLVM_CXXFLAGS"
 
 dnl Set LLVM_LIBS - This is done after the driver configuration so
 dnl that drivers can add additional components to LLVM_COMPONENTS.
-- 
2.19.2

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev