meson.build: fix intel atomics detection
Subsystems (2)
PATCH v2 1/2 meson.build: fix intel atomics detection
Use the stronger compiler.link() test (instead of the weaker compiler.compile()) to fix the intel atomics detection.
Fixes false positive in case of sparc compile (buildroot toolchain).
Signed-off-by Peter Seiderer <[email protected]>
---
Changes v1 -> v2:
- link test needs main() method
--- meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
meson.build +2 -1
@@ -49,9 +49,10 @@ intel_atomics = false lib_atomics = false dep_atomic_ops = dependency('atomic_ops', required : false) -if cc.compiles(''' +if cc.links(''' int atomic_add(int *i) { return __sync_add_and_fetch (i, 1); } int atomic_cmpxchg(int *i, int j, int k) { return __sync_val_compare_and_swap (i, j, k); } + int main() { } ''', name : 'Intel Atomics') intel_atomics = true
Signature · 6 lines
2.18.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v2 2/2 meson.build: enable static build
Use meson library instead of shared_library to enable static build.
Signed-off-by Peter Seiderer <[email protected]>
---
Changes v1 -> v2:
- new patch
--- amdgpu/meson.build | 2 +- etnaviv/meson.build | 2 +- exynos/meson.build | 2 +- freedreno/meson.build | 2 +- intel/meson.build | 2 +- libkms/meson.build | 2 +- meson.build | 2 +- nouveau/meson.build | 2 +- omap/meson.build | 2 +- radeon/meson.build | 2 +- tegra/meson.build | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-)
amdgpu/meson.build +1 -1
@@ -21,7 +21,7 @@ datadir_amdgpu = join_paths(get_option('prefix'), get_option('datadir'), 'libdrm') -libdrm_amdgpu = shared_library( +libdrm_amdgpu = library( 'drm_amdgpu', [ files(
etnaviv/meson.build +1 -1
@@ -19,7 +19,7 @@ # SOFTWARE. -libdrm_etnaviv = shared_library( +libdrm_etnaviv = library( 'drm_etnaviv', [ files(
exynos/meson.build +1 -1
@@ -18,7 +18,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -libdrm_exynos = shared_library( +libdrm_exynos = library( 'drm_exynos', [files('exynos_drm.c', 'exynos_fimg2d.c'), config_file], c_args : warn_c_args,
freedreno/meson.build +1 -1
@@ -39,7 +39,7 @@ if with_freedreno_kgsl ) endif -libdrm_freedreno = shared_library( +libdrm_freedreno = library( 'drm_freedreno', [files_freedreno, config_file], c_args : warn_c_args,
intel/meson.build +1 -1
@@ -18,7 +18,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -libdrm_intel = shared_library( +libdrm_intel = library( 'drm_intel', [ files(
libkms/meson.build +1 -1
@@ -41,7 +41,7 @@ if with_exynos libkms_include += include_directories('../exynos') endif -libkms = shared_library( +libkms = library( 'kms', [files_libkms, config_file], c_args : warn_c_args,
meson.build +1 -1
@@ -279,7 +279,7 @@ add_project_arguments('-include', 'config.h', language : 'c') inc_root = include_directories('.') inc_drm = include_directories('include/drm') -libdrm = shared_library( +libdrm = library( 'drm', [files( 'xf86drm.c', 'xf86drmHash.c', 'xf86drmRandom.c', 'xf86drmSL.c',
nouveau/meson.build +1 -1
@@ -19,7 +19,7 @@ # SOFTWARE. -libdrm_nouveau = shared_library( +libdrm_nouveau = library( 'drm_nouveau', [files( 'nouveau.c', 'pushbuf.c', 'bufctx.c', 'abi16.c'), config_file], c_args : warn_c_args,
omap/meson.build +1 -1
@@ -18,7 +18,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -libdrm_omap = shared_library( +libdrm_omap = library( 'drm_omap', [files('omap_drm.c'), config_file], include_directories : [inc_root, inc_drm],
radeon/meson.build +1 -1
@@ -19,7 +19,7 @@ # SOFTWARE. -libdrm_radeon = shared_library( +libdrm_radeon = library( 'drm_radeon', [ files(
tegra/meson.build +1 -1
@@ -18,7 +18,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -libdrm_tegra = shared_library( +libdrm_tegra = library( 'drm_tegra', [files('tegra.c'), config_file], include_directories : [inc_root, inc_drm],
Signature · 6 lines
2.18.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v2 2/2] meson.build: enable static build
Quoted 3 lines · Peter Seiderer
Use meson library instead of
shared_libraryto enable static build.Signed-off-by Peter Seiderer <[email protected]>
thanks, seems to work
Signature · 5 lines
t _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel