test-latomic
authorMaintainers of GStreamer packages <gst-plugins-bad1.0@packages.debian.org>
Wed, 12 Mar 2025 09:50:20 +0000 (10:50 +0100)
committerMarc Leeman <marc.leeman@gmail.com>
Wed, 12 Mar 2025 09:50:20 +0000 (10:50 +0100)
===================================================================

Gbp-Pq: Name 0002-test-latomic.patch

gst-libs/gst/cuda/meson.build

index 3a2524420bf3ffd42572a4ceb8cb6a8b62be5712..a3e3c3b1d75368f13c9e3513e7e36717a4058a60 100644 (file)
@@ -48,15 +48,12 @@ if host_system not in ['windows', 'linux']
   subdir_done()
 endif
 
-# Linux ARM would need -latomic for std::atomic<int64_t>
-if host_system == 'linux' and host_machine.cpu_family() in ['aarch64', 'arm']
-  libatomic_dep = cxx.find_library('atomic', required: get_option('cuda-nvmm'))
-  if not libatomic_dep.found()
-    subdir_done()
-  endif
-
-  gstcuda_platform_dep += [libatomic_dep]
-endif
+# Check for libatomic for use of C11 atomics: some architectures need
+# to link explicitly to this library.
+# TODO: Once meson 1.6 is in use, this can be updated to
+# dependency('atomic')
+atomic_dep = cxx.find_library('atomic', required: false)
+gstcuda_platform_dep += [atomic_dep]
 
 cuda_win32_headers = [
   'initguid.h',