diff options
author | Erik de Castro Lopo <erikd@mega-nerd.com> | 2015-03-12 14:36:50 +1100 |
---|---|---|
committer | Erik de Castro Lopo <erikd@mega-nerd.com> | 2015-03-12 14:36:33 +1100 |
commit | 71fcc4c096ec0b575522e4c2d0104ef7a71a13c5 (patch) | |
tree | 742a91723032531f5aad8fe3345e5ac914dc887b /rules/build-package-data.mk | |
parent | ec67f8136a8953c4813f875b7c9390aa81c2c9aa (diff) | |
download | haskell-71fcc4c096ec0b575522e4c2d0104ef7a71a13c5.tar.gz |
Use the gold linker for linux/ARM and android/ARM targets.
Fixes #8976 and #9873 by making use of the Binutils ld.gold
linker explicit whenever the target is linux/ARM or android/ARM.
This does not affect iOS where Apple provides its own linker.
In order to achieve this, we need to add `-fuse-ld=gold` to
the SettingsCCompilerLinkFlags setting and set
SettingsLdCommand to `ld.gold` (or `${target}-ld.gold` when
cross-compiling). In addition, simplifying the use of
`$(CONF_GCC_LINKER_OPTS_STAGEn)`.
This patch was tested by ensuring that the following worked
as expected:
* Native builds on linux/x86_64 (nothing changed).
* Native builds on linux/arm (and uses the gold linker).
* Linux to linux/arm cross compiles (and uses the cross
gold linker).
Contributions by Ben Gamari, Joachim Breitner and Reid Barton.
Reviewers: nomeata, bgamari, austin, rwbarton
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D715
GHC Trac Issues: #8976 #9873
Diffstat (limited to 'rules/build-package-data.mk')
-rw-r--r-- | rules/build-package-data.mk | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rules/build-package-data.mk b/rules/build-package-data.mk index 494b89afc5..817bf8db9e 100644 --- a/rules/build-package-data.mk +++ b/rules/build-package-data.mk @@ -50,7 +50,7 @@ endif # for a feature it may not generate warning-free C code, and thus may # think that the feature doesn't exist if -Werror is on. $1_$2_CONFIGURE_CFLAGS = $$(filter-out -Werror,$$(SRC_CC_OPTS)) $$(CONF_CC_OPTS_STAGE$3) $$($1_CC_OPTS) $$($1_$2_CC_OPTS) $$(SRC_CC_WARNING_OPTS) -$1_$2_CONFIGURE_LDFLAGS = $$(SRC_LD_OPTS) $$(CONF_GCC_LINKER_OPTS_STAGE$3) $$($1_LD_OPTS) $$($1_$2_LD_OPTS) +$1_$2_CONFIGURE_LDFLAGS = $$(SRC_LD_OPTS) $$($1_LD_OPTS) $$($1_$2_LD_OPTS) $1_$2_CONFIGURE_CPPFLAGS = $$(SRC_CPP_OPTS) $$(CONF_CPP_OPTS_STAGE$3) $$($1_CPP_OPTS) $$($1_$2_CPP_OPTS) $1_$2_CONFIGURE_OPTS += --configure-option=CFLAGS="$$($1_$2_CONFIGURE_CFLAGS)" |