aboutsummaryrefslogtreecommitdiff
path: root/reproduce/src/make
diff options
context:
space:
mode:
authorMohammad Akhlaghi <mohammad@akhlaghi.org>2019-04-08 00:06:55 +0100
committerMohammad Akhlaghi <mohammad@akhlaghi.org>2019-04-08 00:06:55 +0100
commita0f8a70679975f336c54fffd4c22c85c1660c80d (patch)
treefc1636a182b80c7961b4966c8873baa3c0fdcc61 /reproduce/src/make
parent95244a0891bf9068d0e2fb22f42db234c46d8179 (diff)
Using Clang on Mac OS systems for pkg-config
Yahya Sefidbakht reported the following error when building Pkg-config on his Mac OS system (using GCC, not Clang). It is apparently because his version of GCC doesn't support some speical feature on Mac that is necessary to build Glib as part of Pkg-config. With this commit, on Mac systems, for pkg-config we are explicity asking to build with Clang (through the `CC' flag).
Diffstat (limited to 'reproduce/src/make')
-rw-r--r--reproduce/src/make/dependencies-basic.mk12
1 files changed, 10 insertions, 2 deletions
diff --git a/reproduce/src/make/dependencies-basic.mk b/reproduce/src/make/dependencies-basic.mk
index c15ef01..ac662a4 100644
--- a/reproduce/src/make/dependencies-basic.mk
+++ b/reproduce/src/make/dependencies-basic.mk
@@ -713,8 +713,16 @@ $(ibidir)/m4: $(tdir)/m4-$(m4-version).tar.gz \
$(ibidir)/pkg-config: $(tdir)/pkg-config-$(pkgconfig-version).tar.gz \
$(ibidir)/bash
- $(call gbuild, $<, pkg-config-$(pkgconfig-version), static, \
- --with-internal-glib --with-pc-path=$(ildir)/pkgconfig) \
+ # Some Mac OS systems may have a version of the GNU C Compiler
+ # (GCC) installed that doesn't support some necessary features of
+ # building Glib (as part of pkg-config). So to be safe, for Mac
+ # systems, we'll make sure it will use LLVM's Clang.
+ if [ x$(on_mac_os) = xyes ]; then export compiler="CC=clang"; \
+ else export compiler=""; \
+ fi; \
+ $(call gbuild, $<, pkg-config-$(pkgconfig-version), static, \
+ $$compiler --with-internal-glib \
+ --with-pc-path=$(ildir)/pkgconfig) \
&& echo "pkg-config $(pkgconfig-version)" > $@
$(ibidir)/sed: $(tdir)/sed-$(sed-version).tar.xz \