Changeset View
Changeset View
Standalone View
Standalone View
graphics/mesa-dri/files/patch-meson.build
--- meson.build.orig 2020-10-06 07:15:26 UTC | --- meson.build.orig 2021-06-30 18:18:55 UTC | ||||
+++ meson.build | +++ meson.build | ||||
@@ -1108,9 +1108,9 @@ else | @@ -161,7 +161,7 @@ if dri_drivers.contains('auto') | ||||
endif | if system_has_kms_drm | ||||
# TODO: PPC, Sparc | |||||
# Check for GCC style atomics | if ['x86', 'x86_64'].contains(host_machine.cpu_family()) | ||||
-dep_atomic = null_dep | - dri_drivers = ['i915', 'i965', 'r100', 'r200', 'nouveau'] | ||||
+dep_atomic = cc.find_library('atomic', required : false) | + dri_drivers = ['i915', 'i965', 'r100', 'r200'] | ||||
elif ['arm', 'aarch64'].contains(host_machine.cpu_family()) | |||||
-if cc.compiles('''#include <stdint.h> | dri_drivers = [] | ||||
+if cc.links('''#include <stdint.h> | elif ['mips', 'mips64'].contains(host_machine.cpu_family()) | ||||
int main() { | @@ -193,7 +193,7 @@ if gallium_drivers.contains('auto') | ||||
struct { | # TODO: PPC, Sparc | ||||
uint64_t *v; | if ['x86', 'x86_64'].contains(host_machine.cpu_family()) | ||||
@@ -1119,26 +1119,9 @@ if cc.compiles('''#include <stdint.h> | gallium_drivers = [ | ||||
(int)__atomic_add_fetch(x.v, (uint64_t)1, __ATOMIC_ACQ_REL); | - 'r300', 'r600', 'radeonsi', 'nouveau', 'virgl', 'svga', 'swrast', | ||||
+ 'r300', 'r600', 'radeonsi', 'virgl', 'svga', 'swrast', | |||||
}''', | 'iris' | ||||
+ dependencies : dep_atomic, | ] | ||||
name : 'GCC atomic builtins') | elif ['arm', 'aarch64'].contains(host_machine.cpu_family()) | ||||
pre_args += '-DUSE_GCC_ATOMIC_BUILTINS' | @@ -1041,7 +1041,6 @@ else | ||||
- | '-Werror=incompatible-pointer-types', | ||||
- # Not all atomic calls can be turned into lock-free instructions, in which | '-Werror=int-conversion', | ||||
- # GCC will make calls into the libatomic library. Check whether we need to | '-Wimplicit-fallthrough', | ||||
- # link with -latomic. | - '-Werror=thread-safety', | ||||
- # | '-Wno-missing-field-initializers', | ||||
- # This can happen for 64-bit atomic operations on 32-bit architectures such | '-Wno-format-truncation', | ||||
- # as ARM. | '-fno-math-errno', | ||||
- if not cc.links('''#include <stdint.h> | |||||
- int main() { | |||||
- struct { | |||||
- uint64_t *v; | |||||
- } x; | |||||
- return (int)__atomic_load_n(x.v, __ATOMIC_ACQUIRE) & | |||||
- (int)__atomic_add_fetch(x.v, (uint64_t)1, __ATOMIC_ACQ_REL); | |||||
- }''', | |||||
- name : 'GCC atomic builtins required -latomic') | |||||
- dep_atomic = cc.find_library('atomic') | |||||
- endif | |||||
endif | |||||
if not cc.links('''#include <stdint.h> | |||||
uint64_t v; |