diff options
author | Simon Marlow <marlowsd@gmail.com> | 2013-01-17 11:52:15 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2013-01-17 12:39:55 +0000 |
commit | 109a1e53287f50103e8a5b592275940b6e3dbb53 (patch) | |
tree | 0cc3389e7a18318553be973b63577114a8c465f6 /rules/build-package-data.mk | |
parent | 900e7d255e2e41bab50e239f9b12c30bd6254881 (diff) | |
download | haskell-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 'rules/build-package-data.mk')
-rw-r--r-- | rules/build-package-data.mk | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/rules/build-package-data.mk b/rules/build-package-data.mk index 86eae14477..17def03638 100644 --- a/rules/build-package-data.mk +++ b/rules/build-package-data.mk @@ -81,7 +81,12 @@ $1_$2_CONFIGURE_OPTS += $$(BOOT_PKG_CONSTRAINTS) endif $1_$2_CONFIGURE_OPTS += --with-gcc="$$(CC_STAGE$3)" -$1_$2_CONFIGURE_OPTS += --with-ld="$$(LD)" + +ifneq "$3" "0" +# There is no LD_STAGE0, Cabal will figure it out +$1_$2_CONFIGURE_OPTS += --with-ld="$$(LD_STAGE$3)" +endif + $1_$2_CONFIGURE_OPTS += --configure-option=--with-cc="$$(CC_STAGE$3)" $1_$2_CONFIGURE_OPTS += --with-ar="$$(AR_STAGE$3)" $1_$2_CONFIGURE_OPTS += --with-ranlib="$$(RANLIB)" |