[Buildroot] [PATCH 2/2] package/libv4l: link with libatomic when needed

Thomas Petazzoni thomas.petazzoni at bootlin.com
Wed Oct 30 10:30:40 UTC 2019


On Wed, 30 Oct 2019 07:53:03 +0100
Bernd Kuhls <bernd.kuhls at t-online.de> wrote:

> On some architectures, atomic operations are provided by the libatomic
> library from gcc. Linking with libatomic is therefore necessary,
> otherwise the build fails with:
> 
> /home/buildroot/autobuild/run/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/sparc-buildroot-linux-uclibc/7.4.0/../../../../sparc-buildroot-linux-uclibc/bin/ld:
>  qv4l2-qv4l2.o: undefined reference to symbol '__atomic_fetch_add_4@@LIBATOMIC_1.0'
> 
> This is often for example the case on sparcv8 32 bit.
> 
> Fixes:
> http://autobuild.buildroot.net/results/089/08952dbf89bf3c49da7697943441cee411940420/

The LIBV4L_AUTORECONF = YES that was kept in
d0f3c9de49bfe3f8ac6e75a706540eefcc1afc07 was intended to fix this
libatomic linking issue, so I'm a bit confused.

Could you discuss this with Peter Seiderer (in Cc) ?

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



More information about the buildroot mailing list