Commit a6657bd0 authored by Sergei Trofimovich's avatar Sergei Trofimovich

revert '-Wl' prefixing to *_LD_OPTS

This reverts f48f5a9e

The prefixing does not work as comma
is stripped by $(addprefix) macro:

The following call
    $$(addprefix -optl-Wl, $$($1_$2_$3_ALL_LD_OPTS))

prefixes options with "-optl-Wl" not with "-optl-Wl,"

The simplest breakage can be seen by adding
    SRC_LD_OPTS += -O1
to mk/

  <no location info>: error:
    Warning: Couldn't figure out linker information!
             Make sure you're using GNU ld, GNU gold
             or the built in OS X linker, etc.
  gcc: error: unrecognized command line option '-Wl-O1'

Another problem with original change is loss of ability
to pass options to gcc as a linker driver, for example:
    SRC_LD_OPTS += -flto
Signed-off-by: default avatarSergei Trofimovich <>
parent 2fa00f5b
......@@ -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-Wl, $$($1_$2_$3_ALL_LD_OPTS)) \
$$(addprefix -optl, $$($1_$2_$3_ALL_LD_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