[commit: ghc] ghc-8.4: add CCX=$(CXX) to integer-gmp (76af028)

git at git.haskell.org git at git.haskell.org
Tue Mar 6 17:30:18 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : ghc-8.4
Link       : http://ghc.haskell.org/trac/ghc/changeset/76af02833913942defee5962669ac67a8ffb1762/ghc

>---------------------------------------------------------------

commit 76af02833913942defee5962669ac67a8ffb1762
Author: Moritz Angermann <moritz.angermann at gmail.com>
Date:   Tue Mar 6 11:20:22 2018 +0800

    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
    
    (cherry picked from commit cf5bc96e1b023275ec3c0399f3345ceebbc48df0)


>---------------------------------------------------------------

76af02833913942defee5962669ac67a8ffb1762
 libraries/integer-gmp/gmp/ghc.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libraries/integer-gmp/gmp/ghc.mk b/libraries/integer-gmp/gmp/ghc.mk
index 556a271..f18e27d 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=



More information about the ghc-commits mailing list