summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-10-22 00:00:20 -0400
committerBen Gamari <ben@smart-cactus.org>2019-11-03 13:17:58 -0500
commit9c7dde7fc26a86c7fe285b164f4f3e46a5c35b65 (patch)
tree6bb4e10a9a2b125b62acaae2de23f05e68a3c196
parent68dc5b0aa3b282065572422017cac1c31d326302 (diff)
downloadhaskell-9c7dde7fc26a86c7fe285b164f4f3e46a5c35b65.tar.gz
Drop duplicate -optl's from GHC invocations
Previously the make build system would pass things like `-optl-optl-Wl,-x -optl-optl-Wl,noexecstack` to GHC. This would naturally result in mass confusion as GHC would pass `-optl-Wl,-x` to GCC. GCC would in turn interpret this as `-o ptl-Wl,-x`, setting the output pass of the invocation. The problem that `-optl` was added to the command-line in two places in the build system. Fix this. Fixes #17385. (cherry picked from commit 2d12d59ec989d0f174f5f15e0a92cb1a9cc017e4)
-rw-r--r--rules/distdir-way-opts.mk4
1 files changed, 2 insertions, 2 deletions
diff --git a/rules/distdir-way-opts.mk b/rules/distdir-way-opts.mk
index 9166abc378..f68ef035a5 100644
--- a/rules/distdir-way-opts.mk
+++ b/rules/distdir-way-opts.mk
@@ -187,8 +187,8 @@ $1_$2_$3_ALL_LD_OPTS = \
$$($1_$2_$3_LD_OPTS) \
$$($1_$2_EXTRA_LD_OPTS) \
$$(EXTRA_LD_OPTS) \
- $$(foreach o,$$(EXTRA_LD_LINKER_OPTS),-optl-Wl$$(comma)$$o) \
- $$(foreach o,$$(CONF_LD_LINKER_OPTS_STAGE$4),-optl-Wl$$(comma)$$o)
+ $$(foreach o,$$(EXTRA_LD_LINKER_OPTS),-Wl$$(comma)$$o) \
+ $$(foreach o,$$(CONF_LD_LINKER_OPTS_STAGE$4),-Wl$$(comma)$$o)
# Options for passing to GHC when we use it for linking
$1_$2_$3_GHC_LD_OPTS = \