diff options
author | Herbert Valerio Riedel <hvr@gnu.org> | 2016-04-16 18:12:09 +0200 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2016-04-16 18:12:46 +0200 |
commit | 865602e0beb8e30ea1e1edf7db90f24088badb9e (patch) | |
tree | bbda9ab6adebd8b41a95f4f2c4760aab9c04b34e /bindisttest | |
parent | f4e659121960eb81d5478f0b20d4cf6f4c0ed0d9 (diff) | |
download | haskell-865602e0beb8e30ea1e1edf7db90f24088badb9e.tar.gz |
Rework CC/CC_STAGE0 handling in `configure.ac`
Rather than using the non-standard/idiomatic `--with-{gcc,clang}=...`
scheme use the `CC=...` style scheme.
The basic idea is to have Autoconf's CC/CFLAG/CPPFLAG apply to
stage{1,2,3}, while having a separate _STAGE0 set of env-vars
denote the bootstrap-toolchain flags/programs.
This should be simpler, less confusing, and somewhat more in line with
Autoconf's idioms (allowing us to reuse more of Autoconf rather than
(re)inventing our own confusing non-standard m4 macros to do stuff that
Autoconf could almost do already for us)
Morever, expose CC_STAGE0 as a so-called "precious" variable.
So now we can better control which bootstrapping gcc is used
(by default the one used by the stage0 ghc, unless CC_STAGE0 is
overriden)
```
Some influential environment variables:
CC_STAGE0 C compiler command (bootstrap)
CC C compiler command
CFLAGS C compiler flags
...
Use these variables to override the choices made by `configure' or to
help it to find libraries and programs with nonstandard names/locations.
```
Test Plan: I've tested that cross-compiling with
`--target=powerpc-linux-gnu` still works, and tried a few variants of
settting `CC=` and `CC_STAGE0=`; `./validate` passed as well
Reviewers: erikd, austin, bgamari, simonmar
Reviewed By: simonmar
Subscribers: Phyx, thomie
Differential Revision: https://phabricator.haskell.org/D2078
Diffstat (limited to 'bindisttest')
-rw-r--r-- | bindisttest/ghc.mk | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bindisttest/ghc.mk b/bindisttest/ghc.mk index 4b211064b1..cf2e481efd 100644 --- a/bindisttest/ghc.mk +++ b/bindisttest/ghc.mk @@ -38,7 +38,7 @@ test_bindist: ifeq "$(Windows_Host)" "YES" mv bindisttest/a/b/c/$(BIN_DIST_NAME) $(BIN_DIST_INST_DIR) else - cd bindisttest/a/b/c/$(BIN_DIST_NAME) && ./configure --prefix=$(TOP)/$(BIN_DIST_INST_DIR) --with-gcc="$(WhatGccIsCalled)" + cd bindisttest/a/b/c/$(BIN_DIST_NAME) && ./configure --prefix=$(TOP)/$(BIN_DIST_INST_DIR) CC="$(CC)" cd bindisttest/a/b/c/$(BIN_DIST_NAME) && $(MAKE) install endif ifeq "$(GhcProfiled)" "NO" |