summaryrefslogtreecommitdiff
path: root/src/libcamera/meson.build
diff options
context:
space:
mode:
authorFabrice Fontaine <fontaine.fabrice@gmail.com>2019-09-05 21:04:57 +0200
committerKieran Bingham <kieran.bingham@ideasonboard.com>2019-09-09 11:44:49 +0100
commit5d05418d9b53e1838692f687a6dc373dad45355c (patch)
treefa8f950e86affa0db07462e2049d583d6cfa6fdf /src/libcamera/meson.build
parent6e620349009de675250a7e3e753480b85a6df10b (diff)
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>
Diffstat (limited to 'src/libcamera/meson.build')
-rw-r--r--src/libcamera/meson.build1
1 files changed, 1 insertions, 0 deletions
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'),