From 5d05418d9b53e1838692f687a6dc373dad45355c Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine <fontaine.fabrice@gmail.com> Date: Thu, 5 Sep 2019 21:04:57 +0200 Subject: src/libcamera/meson.build: link with atomic when needed On some architectures, atomic binutils are provided by the libatomic library from gcc. Linking with libatomic is therefore necessary, otherwise the build fails with: src/libcamera/4ab8042@@camera@sha/message.cpp.o: In function `libcamera::Message::registerMessageType()': message.cpp:(.text+0x178): undefined reference to `__atomic_fetch_add_4' collect2: error: ld returned 1 exit status This is often for example the case on sparc v8 32 bits. Fixes: - http://autobuild.buildroot.org/results/1f0b8338f5f39aa86b9d432598dae2f53c5f7c84 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> [Kieran: Updated commit message to refer to build failure on current master, rather than the old code currently built by buildroot] Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> --- src/libcamera/meson.build | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build index c5d8f116..0706a08b 100644 --- a/src/libcamera/meson.build +++ b/src/libcamera/meson.build @@ -99,6 +99,7 @@ version_cpp = vcs_tag(command : [gen_version, meson.build_root()], libcamera_sources += version_cpp libcamera_deps = [ + cc.find_library('atomic', required: false), cc.find_library('dl'), libudev, dependency('threads'), -- cgit v1.2.1