summaryrefslogtreecommitdiff
path: root/rules
diff options
context:
space:
mode:
authorBen Gamari <bgamari.foss@gmail.com>2016-12-01 11:28:47 -0500
committerBen Gamari <ben@smart-cactus.org>2016-12-01 11:28:47 -0500
commitf48f5a9ebf384e1e157b7b413e1d779f4289ddd2 (patch)
treec4cd53c984bf11238ccad6a8024ce58fc9a44e93 /rules
parent0200dedc32122a939fc9e7ed83b01e527d7b3808 (diff)
downloadhaskell-f48f5a9ebf384e1e157b7b413e1d779f4289ddd2.tar.gz
Ensure flags destined for ld are properly passed
GHC uses gcc, not ld, for linking. Consequently all flags to be interpreted by ld need to be prefixed by -optl,-Wl on the GHC command line. Test Plan: Validate on OpenBSD Reviewers: austin, rwbarton Reviewed By: rwbarton Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2776
Diffstat (limited to 'rules')
-rw-r--r--rules/distdir-way-opts.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/rules/distdir-way-opts.mk b/rules/distdir-way-opts.mk
index 6ae9807944..602e6eb94d 100644
--- a/rules/distdir-way-opts.mk
+++ b/rules/distdir-way-opts.mk
@@ -207,7 +207,7 @@ $1_$2_$3_ALL_LD_OPTS = \
# Options for passing to GHC when we use it for linking
$1_$2_$3_GHC_LD_OPTS = \
- $$(addprefix -optl, $$($1_$2_$3_ALL_LD_OPTS)) \
+ $$(addprefix -optl-Wl, $$($1_$2_$3_ALL_LD_OPTS)) \
$$($1_$2_$3_MOST_HC_OPTS)
$1_$2_$3_ALL_AS_OPTS = \