[Buildroot] [PATCH 3/3] package/multicat: fix build with external Blackfin uClibc toolchain

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Sun Mar 20 17:13:47 UTC 2016


Hello,

On Sun, 20 Mar 2016 18:09:47 +0100, Jörg Krause wrote:

> You're right! It has __UCLIBC_HAS_ADVANCED_REALTIME__, but it does not
> define __UCLIBC_HAS_THREADS_NATIVE__ and clock_nanosleep() is only
> defined if both are set in <time.h>:
> 
> #  ifdef __UCLIBC_HAS_THREADS_NATIVE__
> #   if defined __USE_XOPEN2K && defined
> __UCLIBC_HAS_ADVANCED_REALTIME__

Ah, makes sense!

> I'll prepare a v2 with something like that testing for __UCLIBC__,
> __UCLIBC_HAS_THREADS_NATIVE__ and __UCLIBC_HAS_ADVANCED_REALTIME__.

Sounds good.

It would of course be better if they were using autoconf, to be able to
add a configure script, but well...

> My guess is that uClibc was build with __LINUXTHREADS_OLD__ enabled,
> but the toolchain ships libpthread instead. However, I am not a
> toolchain expert.

Regardless of whether you have linuxthreads/old, linuxthreads or NPTL,
there is always a library named libpthread. It's the internals of the
library and how it interacts with the kernel that completely differs
between the different implementations.

Best regards,

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


More information about the buildroot mailing list