aboutsummaryrefslogtreecommitdiffstats
path: root/include/host-build.mk
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2017-10-05 19:45:44 +0200
committerFelix Fietkau <nbd@nbd.name>2017-10-05 21:16:25 +0200
commit2ce9c84a9233946ca229429d053fcd289b1d1342 (patch)
tree658d7e3b91b6e974a831aa53acb72e6cdd7dcb73 /include/host-build.mk
parentf9a849ca84f596aafd7c167b2410ec5446c84784 (diff)
downloadupstream-2ce9c84a9233946ca229429d053fcd289b1d1342.tar.gz
upstream-2ce9c84a9233946ca229429d053fcd289b1d1342.tar.bz2
upstream-2ce9c84a9233946ca229429d053fcd289b1d1342.zip
build: add a darwin sitefile to deal with macOS 10.12 + Xcode 9 build errors
Certain functions are available in system headers, but only work on macOS 10.13 Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'include/host-build.mk')
-rw-r--r--include/host-build.mk5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/host-build.mk b/include/host-build.mk
index 70bf6e5a39..b5f1a6bfa7 100644
--- a/include/host-build.mk
+++ b/include/host-build.mk
@@ -77,6 +77,10 @@ HOST_MAKE_FLAGS =
HOST_CONFIGURE_CMD = $(BASH) ./configure
+ifeq ($(HOST_OS),Darwin)
+ HOST_CONFIG_SITE:=$(INCLUDE_DIR)/site/darwin
+endif
+
define Host/Configure/Default
$(if $(HOST_CONFIGURE_PARALLEL),+)(cd $(HOST_BUILD_DIR)/$(3); \
if [ -x configure ]; then \
@@ -127,6 +131,7 @@ define Host/Exports/Default
$(1) : export PKG_CONFIG_PATH=$$(STAGING_DIR_HOST)/lib/pkgconfig:$$(HOST_BUILD_PREFIX)/lib/pkgconfig
$(1) : export PKG_CONFIG_LIBDIR=$$(HOST_BUILD_PREFIX)/lib/pkgconfig
$(1) : export CCACHE_DIR:=$(STAGING_DIR_HOST)/ccache
+ $(if $(HOST_CONFIG_SITE),$(1) : export CONFIG_SITE:=$(HOST_CONFIG_SITE))
$(if $(IS_PACKAGE_BUILD),$(1) : export PATH=$$(TARGET_PATH_PKG))
endef
Host/Exports=$(Host/Exports/Default)