Skip to contentSkip to conversation

package/libcamera-apps: link with -latomic if needed

Buildroot Peter Korsgaard 1 participant 1 message Mar 7, 2022

lore
Share & tools
lore
#0 lore raw

commit: https://git.buildroot.net/buildroot/commit/?id=f41d47f15b63a4bbe026834478e63acba85d33fe
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Link with -latomic if needed to avoid the following build failure raised since the addition of the package in commit 7227d005d2435ec7b38995a6247d233ddb5ba365:

/home/buildroot/autobuild/instance-2/output-1/host/opt/ext-toolchain/bin/../lib/gcc/sparc-buildroot-linux-uclibc/10.3.0/../../../../sparc-buildroot-linux-uclibc/bin/ld: CMakeFiles/libcamera-still.dir/libcamera_still.cpp.o: undefined reference to symbol '__atomic_fetch_sub_4@@LIBATOMIC_1.0'

Fixes:
- http://autobuild.buildroot.org/results/b20465140f3a5281f9b586f442b67fd400e7184a

---
 package/libcamera-apps/libcamera-apps.mk | 4 ++++
 1 file changed, 4 insertions(+)
package/libcamera-apps/libcamera-apps.mk +4 -0
index 210d4e1e52..f4fc019c17 100644
@@ -45,4 +45,8 @@ else
 LIBCAMERA_APPS_CONF_OPTS += -DENABLE_QT=0
 endif
 
+ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
+LIBCAMERA_APPS_CONF_OPTS += -DCMAKE_EXE_LINKER_FLAGS=-latomic
+endif
+
 $(eval $(cmake-package))

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot