summaryrefslogtreecommitdiff
path: root/ghc/ghc.mk
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2013-01-17 11:52:15 +0000
committerSimon Marlow <marlowsd@gmail.com>2013-01-17 12:39:55 +0000
commit109a1e53287f50103e8a5b592275940b6e3dbb53 (patch)
tree0cc3389e7a18318553be973b63577114a8c465f6 /ghc/ghc.mk
parent900e7d255e2e41bab50e239f9b12c30bd6254881 (diff)
downloadhaskell-109a1e53287f50103e8a5b592275940b6e3dbb53.tar.gz
Tidy up cross-compiling
We have two cases: 1. building a cross-compiler 2. compiling GHC to run on a foreign platform These two are done with almost the same setup: (1) is the stage 1 compiler, and (2) is the stage 2 compiler, when CrossCompiling=YES. The only difference between (1) and (2) is that you if you set up the build for (1), then it stops before stage 2 and you can 'make install' to install stage 1. Unfortunately, (2) didn't work, and the build system code needed some tidying up. Change to the way the build is set up: Before ------ To build a cross-compiler: ./configure --target=<..> To compile a foreign GHC: ./configure --host=<..> --target=<..> Now --- To build a cross-compiler: ./configure --target=<..> And set "Stage1Only=YES" in mk/build.mk To compile a foreign GHC: ./configure --target=<..>
Diffstat (limited to 'ghc/ghc.mk')
-rw-r--r--ghc/ghc.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/ghc/ghc.mk b/ghc/ghc.mk
index 809756e334..6df1a50746 100644
--- a/ghc/ghc.mk
+++ b/ghc/ghc.mk
@@ -99,7 +99,7 @@ ifneq "$(filter-out 2,$(stage))" ""
ghc_stage2_NOT_NEEDED = YES
endif
# When cross-compiling, the stage 1 compiler is our release compiler, so omit stage 2
-ifeq "$(BuildingCrossCompiler)" "YES"
+ifeq "$(Stage1Only)" "YES"
ghc_stage2_NOT_NEEDED = YES
endif
# stage 3 has to be requested explicitly with stage=3