Commit f0824c85 authored by Judah Jacobson's avatar Judah Jacobson

Allow overriding LD_STAGE0 and AR_STAGE0 in the configure script.

Previously it was possible to override the stage0 C compiler via `CC_STAGE0`,
but you couldn't override `ld` or `ar` in stage0.  This change allows overriding them
by setting `LD_STAGE0` or `AR_STAGE0`, respectively.

Our team uses this feature internally to take more control of our GHC build
and make it run more hermetically.
parent dbea7e9d
Pipeline #16379 passed with stages
in 468 minutes and 1 second
......@@ -135,13 +135,17 @@ if test "$WithGhc" != ""; then
GhcMinVersion2=`echo "$GhcMinVersion" | sed 's/^\\(.\\)$/0\\1/'`
GhcCanonVersion="$GhcMajVersion$GhcMinVersion2"
dnl infer CC_STAGE0 from `ghc --info` unless explicitly set by user
dnl infer {CC,LD,AR}_STAGE0 from `ghc --info` unless explicitly set by user
if test -z "$CC_STAGE0"; then
BOOTSTRAPPING_GHC_INFO_FIELD([CC_STAGE0],[C compiler command])
fi
BOOTSTRAPPING_GHC_INFO_FIELD([LD_STAGE0],[ld command])
BOOTSTRAPPING_GHC_INFO_FIELD([AR_STAGE0],[ar command])
if test -z "$LD_STAGE0"; then
BOOTSTRAPPING_GHC_INFO_FIELD([LD_STAGE0],[ld command])
fi
if test -z "$AR_STAGE0"; then
BOOTSTRAPPING_GHC_INFO_FIELD([AR_STAGE0],[ar command])
fi
BOOTSTRAPPING_GHC_INFO_FIELD([AR_OPTS_STAGE0],[ar flags])
BOOTSTRAPPING_GHC_INFO_FIELD([ArSupportsAtFile_STAGE0],[ar supports at file])
fi
......
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