diff options
author | Yann E. MORIN <yann.morin.1998@free.fr> | 2016-08-18 23:50:13 +0200 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2016-08-19 11:29:12 +0200 |
commit | e31eb720408bb0826ec5a27e804dbe6afaf30390 (patch) | |
tree | 87506d5dc33987534053c715fce90c0a7f73169c /toolchain | |
parent | f55adea434876cf1ee2604abe367ed1b6c555faf (diff) |
package/musl-compat-headers: provide compatibility headers not in musl
musl provides neither sys/queue.h nor sys/cdefs.h. Those two headers are
however quite widely used in a lot of packages (though they should at
least not use cdefs.h which is only full of mostly-legacy macros, and
which is mostly an internal header of glibc and was never really meant to
be exposed to, and used by packages).
But we don't live in an ideal world, so a lot of packages break when
those two headers are missing.
We already took care of sys/queue.h with the netbsd-queue package. But
the need for cdefs.h is getting more and more pressing.
We rename the netbsd-queue package into musl-compat-headers, and we
make it install sys/queue.h (from NetBSD) and sys/cdefs.h (a minimalist
one we bundle in Buildroot). We can't use the cdefs.h from NetBSD
because it includes machine-dependent headers; instead we bundle a very
minimalistic one, that covers only what we need.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Baruch Siach <baruch@tkos.co.il>
Cc: Arnout Vandecappelle <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'toolchain')
-rw-r--r-- | toolchain/toolchain-external/Config.in | 3 | ||||
-rw-r--r-- | toolchain/toolchain-external/toolchain-external.mk | 10 |
2 files changed, 8 insertions, 5 deletions
diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in index f54fbee47..63b77127f 100644 --- a/toolchain/toolchain-external/Config.in +++ b/toolchain/toolchain-external/Config.in @@ -727,7 +727,8 @@ config BR2_TOOLCHAIN_EXTERNAL_UCLIBC config BR2_TOOLCHAIN_EXTERNAL_MUSL bool select BR2_TOOLCHAIN_USES_MUSL - select BR2_PACKAGE_NETBSD_QUEUE + # Compatibility headers: cdefs.h, queue.h + select BR2_PACKAGE_MUSL_COMPAT_HEADERS if BR2_TOOLCHAIN_EXTERNAL_CUSTOM diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk index 29c1f36de..8de324726 100644 --- a/toolchain/toolchain-external/toolchain-external.mk +++ b/toolchain/toolchain-external/toolchain-external.mk @@ -246,11 +246,13 @@ TOOLCHAIN_EXTERNAL_CFLAGS += -msoft-float TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_SOFTFLOAT=1 endif -# musl does not provide a sys/queue.h implementation, so add the -# netbsd-queue package that will install a sys/queue.h file in the -# staging directory based on the NetBSD implementation. +# musl does not provide an implementation for sys/queue.h or sys/cdefs.h. +# So, add the musl-compat-headers package that will install those files, +# into the staging directory: +# sys/queue.h: header from NetBSD +# sys/cdefs.h: minimalist header bundled in Buildroot ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y) -TOOLCHAIN_EXTERNAL_DEPENDENCIES += netbsd-queue +TOOLCHAIN_EXTERNAL_DEPENDENCIES += musl-compat-headers endif # The Linaro toolchain expects the libraries in |