From 71fcc4c096ec0b575522e4c2d0104ef7a71a13c5 Mon Sep 17 00:00:00 2001 From: Erik de Castro Lopo Date: Thu, 12 Mar 2015 14:36:50 +1100 Subject: 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 --- libffi/ghc.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libffi/ghc.mk') diff --git a/libffi/ghc.mk b/libffi/ghc.mk index abbe87f23c..a5645de9ba 100644 --- a/libffi/ghc.mk +++ b/libffi/ghc.mk @@ -100,7 +100,7 @@ $(libffi_STAMP_CONFIGURE): $(TOUCH_DEP) NM=$(NM) \ RANLIB=$(REAL_RANLIB_CMD) \ CFLAGS="$(SRC_CC_OPTS) $(CONF_CC_OPTS_STAGE1) -w" \ - LDFLAGS="$(SRC_LD_OPTS) $(CONF_GCC_LINKER_OPTS_STAGE1) -w" \ + LDFLAGS="$(SRC_LD_OPTS) -w" \ "$(SHELL)" ./configure \ --prefix=$(TOP)/libffi/build/inst \ --libdir=$(TOP)/libffi/build/inst/lib \ -- cgit v1.2.1