summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoritz Angermann <moritz.angermann@gmail.com>2018-03-06 11:20:22 +0800
committerMoritz Angermann <moritz.angermann@gmail.com>2018-03-06 17:52:10 +0800
commitcf5bc96e1b023275ec3c0399f3345ceebbc48df0 (patch)
tree4dc52df382816f45f938d49f23310c574eef1678
parentf6cf4001574e789865d25f89b362a04ef1ca3df4 (diff)
downloadhaskell-cf5bc96e1b023275ec3c0399f3345ceebbc48df0.tar.gz
add CCX=$(CXX) to integer-gmp
Summary: This came up when trying to build GHC HEAD with nix. We do not set CCX for integer-gmp when running ./configure. We do this however for libffi. The result is, that if CCX is not set, we default to the system one, of which there might be none (as in nixos's case). This will not show on a debian+nix or similar setup, where the system `cxx` is still in place, and only shows up when the system tries hard to sandbox everything (even cxx) as nixOS does. We use `CXX`, which is set to either `clang` or `CC_STAGE1`, and also usedfor `CC`, similar to what we do for libffi.c Test Plan: ./validate Reviewers: bgamari, hvr Reviewed By: hvr Subscribers: rwbarton, thomie, carter Differential Revision: https://phabricator.haskell.org/D4473
-rw-r--r--libraries/integer-gmp/gmp/ghc.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/libraries/integer-gmp/gmp/ghc.mk b/libraries/integer-gmp/gmp/ghc.mk
index 556a271f90..f18e27d1bb 100644
--- a/libraries/integer-gmp/gmp/ghc.mk
+++ b/libraries/integer-gmp/gmp/ghc.mk
@@ -131,7 +131,7 @@ libraries/integer-gmp/gmp/libgmp.a libraries/integer-gmp/gmp/gmp.h:
# `./configure`, not `HOSTPLATFORM`: the 'host' on which GMP will
# run is the 'target' platform of the compiler we're building.
cd libraries/integer-gmp/gmp/gmpbuild; \
- CC=$(CCX) NM=$(NM) AR=$(AR_STAGE1) ./configure \
+ CC=$(CCX) CXX=$(CCX) NM=$(NM) AR=$(AR_STAGE1) ./configure \
--enable-shared=no \
--host=$(TARGETPLATFORM) --build=$(BUILDPLATFORM)
$(MAKE) -C libraries/integer-gmp/gmp/gmpbuild MAKEFLAGS=