[Buildroot] [RFC] toolchain: libatomic needs NTPL threads support

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Wed Aug 3 07:22:14 UTC 2016


Hello,

On Wed, 3 Aug 2016 07:43:09 +0200, Waldemar Brodkorb wrote:

> > Example: the Microblaze architecture does not support NPTL, but
> > libatomic is generated:  
> 
> This is not completely correct. Musl and GNU Libc support NPTL/TLS
> for microblaze. uClibc-ng as of 1.0.17 does not. I am working ón
> syncing GNU libc support for microblaze NPTL/TLS into uClibc-ng,
> but have found some issues running the testsuite. (only sjlj
> exception handling in upstream gcc, but pthread_cancel requires
> DWARF exception handling to work, no real runtime testing in GNU
> libc, no active maintainer.)

Right, sorry. I should have said "Our uClibc-based Microblaze
toolchain". It does not have NPTL support, but still libatomic is
generated.

> Hmm. I always disable libatomic for uClibc-ng Linuxthreads and have
> to enable it for NPTL/TLS. Isn't libatomic required for NPTL/TLS to
> work?

I don't think it's related. libatomic is needed to provide the
__atomic_*() built-ins when there are not provided directly by the
architecture support. (See my previous work on __sync and __atomic
builtins).

> Are you sure Linuxthreads can be used for libatomic?
> For m68k-noMMU we need to disable it, as it doesn't compile.
> https://git.busybox.net/buildroot/tree/package/gcc/6.1.0/891-fix-m68k-uclinux.patch

The build failure at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53833
is *NOT* about libatomic, it's about building
libgcc/config/m68k/linux-atomic.c, which is a completely different
thing.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com


More information about the buildroot mailing list