Commit 21663693 authored by Ben Gamari's avatar Ben Gamari 🐢 Committed by Marge Bot

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.
parent 4af20bbc
......@@ -186,8 +186,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 = \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment