Commit f48f5a9e authored by Ben Gamari's avatar Ben Gamari Committed by Ben Gamari

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
parent 0200dedc
......@@ -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 = \
......
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