[source] build: add a darwin sitefile to deal with macOS 10.12 + Xcode 9 build errors

LEDE Commits lede-commits at lists.infradead.org
Thu Oct 5 12:58:34 PDT 2017


nbd pushed a commit to source.git, branch lede-17.01:
https://git.lede-project.org/2ce9c84a9233946ca229429d053fcd289b1d1342

commit 2ce9c84a9233946ca229429d053fcd289b1d1342
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Thu Oct 5 19:45:44 2017 +0200

    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 at nbd.name>
---
 include/host-build.mk | 5 +++++
 include/site/darwin   | 2 ++
 2 files changed, 7 insertions(+)

diff --git a/include/host-build.mk b/include/host-build.mk
index 70bf6e5..b5f1a6b 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)
diff --git a/include/site/darwin b/include/site/darwin
new file mode 100644
index 0000000..ec38f67
--- /dev/null
+++ b/include/site/darwin
@@ -0,0 +1,2 @@
+ac_cv_func_futimens=no
+ac_cv_func_utimensat=no



More information about the lede-commits mailing list