mirror of
https://gitee.com/openharmony/third_party_mesa3d
synced 2024-11-23 07:19:50 +00:00
meson: Override C++ standard to gnu++11 when building with altivec on ppc64
Otherwise there will be symbol collisions for the vector name.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108943
Distro Bug: https://bugs.gentoo.org/673622
Fixes: 42ea0631f1
("meson: build clover")
Acked-by: Matt Turner <mattst88@gmail.com>
This commit is contained in:
parent
f7bccf6ab4
commit
133a5b8383
@ -648,6 +648,7 @@ if get_option('power8') != 'false'
|
||||
endif
|
||||
|
||||
_opencl = get_option('gallium-opencl')
|
||||
clover_cpp_std = []
|
||||
if _opencl != 'disabled'
|
||||
if not with_gallium
|
||||
error('OpenCL Clover implementation requires at least one gallium driver.')
|
||||
@ -656,6 +657,14 @@ if _opencl != 'disabled'
|
||||
dep_clc = dependency('libclc')
|
||||
with_gallium_opencl = true
|
||||
with_opencl_icd = _opencl == 'icd'
|
||||
|
||||
if host_machine.cpu_family().startswith('ppc') and cpp.compiles('''
|
||||
#if !defined(__VEC__) || !defined(__ALTIVEC__)
|
||||
#error "AltiVec not enabled"
|
||||
#endif''',
|
||||
name : 'Altivec')
|
||||
clover_cpp_std += ['cpp_std=gnu++11']
|
||||
endif
|
||||
else
|
||||
dep_clc = null_dep
|
||||
with_gallium_opencl = false
|
||||
|
@ -30,6 +30,7 @@ libcltgsi = static_library(
|
||||
files('tgsi/compiler.cpp', 'tgsi/invocation.hpp'),
|
||||
include_directories : clover_incs,
|
||||
cpp_args : [cpp_vis_args],
|
||||
override_options : clover_cpp_std,
|
||||
)
|
||||
|
||||
libclllvm = static_library(
|
||||
@ -56,6 +57,7 @@ libclllvm = static_library(
|
||||
)),
|
||||
],
|
||||
dependencies : [dep_llvm, dep_elf],
|
||||
override_options : clover_cpp_std,
|
||||
)
|
||||
|
||||
clover_files = files(
|
||||
@ -119,4 +121,5 @@ libclover = static_library(
|
||||
include_directories : clover_incs,
|
||||
cpp_args : [clover_cpp_args, cpp_vis_args],
|
||||
link_with : [libcltgsi, libclllvm],
|
||||
override_options : clover_cpp_std,
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user