Ticket #4115: linker-flag-order.dpatch

File linker-flag-order.dpatch, 2.4 KB (added by duncan, 3 years ago)

patch to put the linker flags at the end of the command line

Line 
11 patch for repository http://darcs.haskell.org/hsc2hs:
2
3Sat Jun  5 16:26:49 BST 2010  Duncan Coutts <duncan@well-typed.com>
4  * When linking, put flags after the .o file.
5  Should fix ticket #4115
6  Do the same for the compiler flags, mainly for consistency.
7
8New patches:
9
10[When linking, put flags after the .o file.
11Duncan Coutts <duncan@well-typed.com>**20100605152649
12 Ignore-this: ab62a72ebcc3f79529002528e2b7aed4
13 Should fix ticket #4115
14 Do the same for the compiler flags, mainly for consistency.
15] {
16hunk ./Main.hs 600
17 
18     rawSystemL ("compiling " ++ cProgName) beVerbose compiler
19        (  ["-c"]
20-        ++ [f | CompFlag f <- flags]
21         ++ [cProgName]
22         ++ ["-o", oProgName]
23hunk ./Main.hs 602
24+        ++ [f | CompFlag f <- flags]
25        )
26     finallyRemove cProgName $ do
27 
28hunk ./Main.hs 607
29       rawSystemL ("linking " ++ oProgName) beVerbose linker
30-        (  [f | LinkFlag f <- flags]
31-        ++ [oProgName]
32+        (  [oProgName]
33         ++ ["-o", progName]
34hunk ./Main.hs 609
35+        ++ [f | LinkFlag f <- flags]
36        )
37       finallyRemove oProgName $ do
38 
39}
40
41Context:
42
43[Add C and linker flags to hsc2hs; fixes trac #3400
44Ian Lynagh <igloo@earth.li>**20091107194449]
45[GHC build system: Make *nix installation work in paths containing spaces
46Ian Lynagh <igloo@earth.li>**20091105160606]
47[Add a /. to the $$(dir $$@) to stop make normalising away the trailing /
48Ian Lynagh <igloo@earth.li>**20091004191326]
49[Use the " | $$(dir $$@)" in ghc.mk
50Ian Lynagh <igloo@earth.li>**20091003215551]
51[put template-hsc.h in $(topdir) in an installation (on Unix)
52Simon Marlow <marlowsd@gmail.com>**20090917093914
53 Ignore-this: d8ebcd53e15ca382d273e0c70658c3e5
54 and make sure hsc2hs can find it
55]
56[remove old version of hsc2hs.wrapper, not used now
57Simon Marlow <marlowsd@gmail.com>**20090917093744
58 Ignore-this: d7097362f4db4a1a38a4aa3b06d87397
59]
60[only emit {-# INCLUDE #-} pragmas for GHC < 6.10
61Simon Marlow <marlowsd@gmail.com>**20090802190345
62 Ignore-this: 4ef3764c0d0c0962c995d51d0f66eb9d
63]
64[Update Makefile for the new GHC build system
65Ian Lynagh <igloo@earth.li>**20090705165019]
66[Remove now-redundant "return ()"s
67Ian Lynagh <igloo@earth.li>**20090704211957]
68[Support for -fwarn-unused-do-bind and -fwarn-wrong-do-bind, as per #3263
69Max Bolingbroke <batterseapower@hotmail.com>**20090701200414
70 Ignore-this: ed5e225af9e6ad9a77efc1cd1109f7c1
71]
72[TAG 2009-06-25
73Ian Lynagh <igloo@earth.li>**20090625155947]
74Patch bundle hash:
75e87d01bb6534715671a24d859784904d9f39f258