Commit cf5bc96e authored by Moritz Angermann's avatar Moritz Angermann

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
parent f6cf4001
......@@ -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=
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment