add CCX=$(CXX) to integer-gmp

Authored by angerman on Mar 6 2018, 12:18 AM.



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


Diff Detail

rGHC Glasgow Haskell Compiler
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
angerman created this revision.Mar 6 2018, 12:18 AM
hvr accepted this revision.Mar 6 2018, 2:16 AM

another kitten.... otoh, there's already precedent for setting CXX=CC in other places of the buildsystem... and Hadrian is supposed to make everything super principled anyway soon... :-)

This revision is now accepted and ready to land.Mar 6 2018, 2:16 AM
Closed by commit rGHCcf5bc96e1b02: add CCX=$(CXX) to integer-gmp (authored by Moritz Angermann <>). · Explain WhyMar 6 2018, 3:52 AM
This revision was automatically updated to reflect the committed changes.