summaryrefslogtreecommitdiffstats
path: root/package/musl
diff options
context:
space:
mode:
authorYann E. MORIN <yann.morin.1998@free.fr>2016-08-18 23:50:13 +0200
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2016-08-19 11:29:12 +0200
commite31eb720408bb0826ec5a27e804dbe6afaf30390 (patch)
tree87506d5dc33987534053c715fce90c0a7f73169c /package/musl
parentf55adea434876cf1ee2604abe367ed1b6c555faf (diff)
downloadbuildroot-e31eb720408bb0826ec5a27e804dbe6afaf30390.tar.gz
buildroot-e31eb720408bb0826ec5a27e804dbe6afaf30390.zip
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 'package/musl')
-rw-r--r--package/musl/Config.in3
-rw-r--r--package/musl/musl.mk10
2 files changed, 8 insertions, 5 deletions
diff --git a/package/musl/Config.in b/package/musl/Config.in
index c263006a29..18ae69d280 100644
--- a/package/musl/Config.in
+++ b/package/musl/Config.in
@@ -3,5 +3,6 @@ config BR2_PACKAGE_MUSL
depends on BR2_TOOLCHAIN_USES_MUSL
default y
select BR2_PACKAGE_LINUX_HEADERS
- select BR2_PACKAGE_NETBSD_QUEUE
select BR2_TOOLCHAIN_HAS_SSP
+ # Compatibility headers: cdefs.h, queue.h
+ select BR2_PACKAGE_MUSL_COMPAT_HEADERS
diff --git a/package/musl/musl.mk b/package/musl/musl.mk
index 920bbbfd16..ea1ce6d9a0 100644
--- a/package/musl/musl.mk
+++ b/package/musl/musl.mk
@@ -13,10 +13,12 @@ MUSL_LICENSE_FILES = COPYRIGHT
# cross-compiler and the kernel headers
MUSL_DEPENDENCIES = host-gcc-initial linux-headers
-# 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_DEPENDENCIES += netbsd-queue
+# 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
+MUSL_DEPENDENCIES += musl-compat-headers
# musl is part of the toolchain so disable the toolchain dependency
MUSL_ADD_TOOLCHAIN_DEPENDENCY = NO
OpenPOWER on IntegriCloud