In the gamin package, patch 0003-fix-missing-PTHREAD_MUTEX_RECURSIVE_NP.patch was introduced to fix the build with musl. Indeed, while musl defines "linux", it does not define PTHREAD_MUTEX_RECURSIVE_NP, but only PTHREAD_MUTEX_RECURSIVE. So the check was simplified to only verify if PTHREAD_MUTEX_RECURSIVE_NP is defined. However, this doesn't work well with uClibc linuxthreads. In uClibc, PTHREAD_MUTEX_RECURSIVE_NP and PTHREAD_MUTEX_RECURSIVE are not pre-processor defines, but enum values. For this reason, even if PTHREAD_MUTEX_RECURSIVE_NP actually exists, #if defined(PTHREAD_MUTEX_RECURSIVE_NP) is false. So, the gamin code falls back to using PTHREAD_MUTEX_RECURSIVE. Except that for uClibc linuxthreads, PTHREAD_MUTEX_RECURSIVE is defined only if __USE_UNIX98 is defined. For the NPTL implementation, PTHREAD_MUTEX_RECURSIVE is defined either if __USE_UNIX98 or __USE_XOPEN2K8 are defined. This strange difference has been reported to uClibc-ng upstream [1]. However, regardless of this uClibc behavior, using #if defined to check for the availability of PTHREAD_MUTEX_RECURSIVE_NP is not good. This commit therefore switches to using a proper AC_CHECK_DECL() autoconf test, which works regardless of whether the value is #define'd or defined as an enum value. This fixes the build of gamin on linuxthreads platforms, such as Microblaze or m68k. Fixes: http://autobuild.buildroot.net/results/887df97196d7777efbf18a7bee91aa45c1a98700/ (Microblaze) http://autobuild.buildroot.net/results/eb4389474e1b30b5c395a07a857da13a66763bdb/ (m68k) [1] http://mailman.uclibc-ng.org/pipermail/devel/2016-July/001087.html Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> |
||
---|---|---|
arch | ||
board | ||
boot | ||
configs | ||
docs | ||
fs | ||
linux | ||
package | ||
support | ||
system | ||
toolchain | ||
.defconfig | ||
.gitignore | ||
CHANGES | ||
Config.in | ||
Config.in.legacy | ||
COPYING | ||
Makefile | ||
Makefile.legacy | ||
README |
Buildroot is a simple, efficient and easy-to-use tool to generate embedded Linux systems through cross-compilation. The documentation can be found in docs/manual. You can generate a text document with 'make manual-text' and read output/docs/manual/manual.text. Online documentation can be found at http://buildroot.org/docs.html To build and use the buildroot stuff, do the following: 1) run 'make menuconfig' 2) select the target architecture and the packages you wish to compile 3) run 'make' 4) wait while it compiles 5) find the kernel, bootloader, root filesystem, etc. in output/images You do not need to be root to build or run buildroot. Have fun! Buildroot comes with a basic configuration for a number of boards. Run 'make list-defconfigs' to view the list of provided configurations. Please feed suggestions, bug reports, insults, and bribes back to the buildroot mailing list: buildroot@buildroot.org You can also find us on #buildroot on Freenode IRC. If you would like to contribute patches, please read https://buildroot.org/manual.html#submitting-patches