summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--package/musl/musl.mk5
-rw-r--r--package/netbsd-queue/netbsd-queue.hash2
-rw-r--r--package/netbsd-queue/netbsd-queue.mk23
-rw-r--r--toolchain/toolchain-external/toolchain-external.mk7
4 files changed, 37 insertions, 0 deletions
diff --git a/package/musl/musl.mk b/package/musl/musl.mk
index 6fdcc73122..2cc6699a35 100644
--- a/package/musl/musl.mk
+++ b/package/musl/musl.mk
@@ -13,6 +13,11 @@ 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 is part of the toolchain so disable the toolchain dependency
MUSL_ADD_TOOLCHAIN_DEPENDENCY = NO
diff --git a/package/netbsd-queue/netbsd-queue.hash b/package/netbsd-queue/netbsd-queue.hash
new file mode 100644
index 0000000000..f8e2a6c598
--- /dev/null
+++ b/package/netbsd-queue/netbsd-queue.hash
@@ -0,0 +1,2 @@
+# Locally calculated
+sha256 c13407edd0e33be73cae72514cb234f8612e1c0e54401c9448daffd3a240158b queue.h?rev=1.70
diff --git a/package/netbsd-queue/netbsd-queue.mk b/package/netbsd-queue/netbsd-queue.mk
new file mode 100644
index 0000000000..0f486fa258
--- /dev/null
+++ b/package/netbsd-queue/netbsd-queue.mk
@@ -0,0 +1,23 @@
+################################################################################
+#
+# netbsd-queue
+#
+################################################################################
+
+NETBSD_QUEUE_VERSION = 1.70
+NETBSD_QUEUE_SITE = http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/sys
+NETBSD_QUEUE_SOURCE = queue.h?rev=$(NETBSD_QUEUE_VERSION)
+NETBSD_QUEUE_LICENSE = BSD-3c
+
+NETBSD_QUEUE_INSTALL_STAGING = YES
+
+define NETBSD_QUEUE_EXTRACT_CMDS
+ cp $(DL_DIR)/$(NETBSD_QUEUE_SOURCE) $(@D)/queue.h
+endef
+
+define NETBSD_QUEUE_INSTALL_STAGING_CMDS
+ $(INSTALL) -D -m 0644 $(@D)/queue.h \
+ $(STAGING_DIR)/usr/include/sys/queue.h
+endef
+
+$(eval $(generic-package))
diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
index 613ce50660..745b6858a2 100644
--- a/toolchain/toolchain-external/toolchain-external.mk
+++ b/toolchain/toolchain-external/toolchain-external.mk
@@ -237,6 +237,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.
+ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y)
+TOOLCHAIN_EXTERNAL_DEPENDENCIES += netbsd-queue
+endif
+
# The Linaro ARMhf toolchain expects the libraries in
# {/usr,}/lib/arm-linux-gnueabihf, but Buildroot copies them to
# {/usr,}/lib, so we need to create a symbolic link.
OpenPOWER on IntegriCloud