[commit: ghc] master: Ensure flags destined for ld are properly passed (f48f5a9e)

git at git.haskell.org git at git.haskell.org
Thu Dec 1 17:24:00 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/f48f5a9ebf384e1e157b7b413e1d779f4289ddd2/ghc

>---------------------------------------------------------------

commit f48f5a9ebf384e1e157b7b413e1d779f4289ddd2
Author: Ben Gamari <bgamari.foss at gmail.com>
Date:   Thu Dec 1 11:28:47 2016 -0500

    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


>---------------------------------------------------------------

f48f5a9ebf384e1e157b7b413e1d779f4289ddd2
 rules/distdir-way-opts.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rules/distdir-way-opts.mk b/rules/distdir-way-opts.mk
index 6ae9807..602e6eb 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 = \



More information about the ghc-commits mailing list