Fix memory leak from #12664
[ghc.git] / rts / package.conf.in
1 /* The RTS is just another package! */
2
3 #include "ghcconfig.h"
4 #include "rts/Config.h"
5
6 name:           rts
7 version:        1.0
8 id:             rts
9 key:            rts
10 license:        BSD3
11 maintainer:     glasgow-haskell-users@haskell.org
12 exposed:        True
13
14 exposed-modules:
15 hidden-modules:
16
17 import-dirs:
18
19 #ifdef INSTALLING
20 library-dirs:           LIB_DIR"/rts" FFI_LIB_DIR
21 #else /* !INSTALLING */
22 library-dirs:           TOP"/rts/dist/build" FFI_LIB_DIR
23 #endif
24
25 hs-libraries:   "HSrts" FFI_LIB
26
27 extra-libraries:
28 #ifdef HAVE_LIBM
29                                 "m"             /* for ldexp() */
30 #endif
31 #ifdef HAVE_LIBRT
32                               , "rt"
33 #endif
34 #ifdef HAVE_LIBDL
35                               , "dl"
36 #endif
37 #ifdef HAVE_LIBFFI
38                               , "ffi"
39 #endif
40 #ifdef HAVE_LIBNUMA
41                               , "numa"
42 #endif
43 #ifdef mingw32_HOST_OS
44                               ,"wsock32"    /* for the linker */
45                               ,"gdi32"      /* for the linker */
46                               ,"winmm"      /* for the linker */
47 #endif
48 #ifdef freebsd_HOST_OS
49                               , "pthread" /* for pthread_getthreadid_np() */
50 #endif
51 #ifdef openbsd_HOST_OS
52 /* OpenBSD's libffi is not directly linked to the libpthread but still requires
53 pthread functionality. This means that any client binary which links with libffi
54 also need to link with libpthread. If it does not, then linking fails with
55 unresolved symbols. */
56                               , "pthread"
57
58 #endif
59 #if defined(DEBUG) && defined(HAVE_LIBBFD)
60                               ,"bfd", "iberty"  /* for debugging */
61 #endif
62 #ifdef HAVE_LIBMINGWEX
63 # ifndef INSTALLING                             /* Bundled Mingw is behind */
64                               ,"mingwex"
65 # endif
66 #endif
67 #if USE_LIBDW
68                              , "elf"
69                              , "dw"             /* for backtraces */
70 #endif
71
72 #ifdef INSTALLING
73 include-dirs:           INCLUDE_DIR FFI_INCLUDE_DIR
74 #else /* !INSTALLING */
75 include-dirs:           TOP"/rts/dist/build" TOP"/includes" TOP"/includes/dist-derivedconstants/header" FFI_INCLUDE_DIR
76 #endif
77
78 includes:               Stg.h
79 hugs-options:
80 cc-options:
81
82 ld-options:
83 #ifdef LEADING_UNDERSCORE
84            "-Wl,-u,_ghczmprim_GHCziTypes_Izh_static_info"
85          , "-Wl,-u,_ghczmprim_GHCziTypes_Czh_static_info"
86          , "-Wl,-u,_ghczmprim_GHCziTypes_Fzh_static_info"
87          , "-Wl,-u,_ghczmprim_GHCziTypes_Dzh_static_info"
88          , "-Wl,-u,_base_GHCziPtr_Ptr_static_info"
89          , "-Wl,-u,_ghczmprim_GHCziTypes_Wzh_static_info"
90          , "-Wl,-u,_base_GHCziInt_I8zh_static_info"
91          , "-Wl,-u,_base_GHCziInt_I16zh_static_info"
92          , "-Wl,-u,_base_GHCziInt_I32zh_static_info"
93          , "-Wl,-u,_base_GHCziInt_I64zh_static_info"
94          , "-Wl,-u,_base_GHCziWord_W8zh_static_info"
95          , "-Wl,-u,_base_GHCziWord_W16zh_static_info"
96          , "-Wl,-u,_base_GHCziWord_W32zh_static_info"
97          , "-Wl,-u,_base_GHCziWord_W64zh_static_info"
98          , "-Wl,-u,_base_GHCziStable_StablePtr_static_info"
99          , "-Wl,-u,_ghczmprim_GHCziTypes_Izh_con_info"
100          , "-Wl,-u,_ghczmprim_GHCziTypes_Czh_con_info"
101          , "-Wl,-u,_ghczmprim_GHCziTypes_Fzh_con_info"
102          , "-Wl,-u,_ghczmprim_GHCziTypes_Dzh_con_info"
103          , "-Wl,-u,_base_GHCziPtr_Ptr_con_info"
104          , "-Wl,-u,_base_GHCziPtr_FunPtr_con_info"
105          , "-Wl,-u,_base_GHCziStable_StablePtr_con_info"
106          , "-Wl,-u,_ghczmprim_GHCziTuple_Z0T_closure"
107          , "-Wl,-u,_ghczmprim_GHCziTypes_False_closure"
108          , "-Wl,-u,_ghczmprim_GHCziTypes_True_closure"
109          , "-Wl,-u,_base_GHCziPack_unpackCString_closure"
110          , "-Wl,-u,_base_GHCziIOziException_stackOverflow_closure"
111          , "-Wl,-u,_base_GHCziIOziException_heapOverflow_closure"
112          , "-Wl,-u,_base_ControlziExceptionziBase_nonTermination_closure"
113          , "-Wl,-u,_base_GHCziIOziException_blockedIndefinitelyOnMVar_closure"
114          , "-Wl,-u,_base_GHCziIOziException_blockedIndefinitelyOnSTM_closure"
115          , "-Wl,-u,_base_GHCziIOziException_allocationLimitExceeded_closure"
116          , "-Wl,-u,_base_ControlziExceptionziBase_nestedAtomically_closure"
117          , "-Wl,-u,_base_GHCziEventziThread_blockedOnBadFD_closure"
118          , "-Wl,-u,_base_GHCziWeak_runFinalizzerBatch_closure"
119          , "-Wl,-u,_base_GHCziTopHandler_flushStdHandles_closure"
120          , "-Wl,-u,_base_GHCziTopHandler_runIO_closure"
121          , "-Wl,-u,_base_GHCziTopHandler_runNonIO_closure"
122          , "-Wl,-u,_base_GHCziConcziIO_ensureIOManagerIsRunning_closure"
123          , "-Wl,-u,_base_GHCziConcziIO_ioManagerCapabilitiesChanged_closure"
124          , "-Wl,-u,_base_GHCziConcziSync_runSparks_closure"
125          , "-Wl,-u,_base_GHCziConcziSignal_runHandlersPtr_closure"
126          , "-Wl,-u,_hs_atomic_add8"
127          , "-Wl,-u,_hs_atomic_add16"
128          , "-Wl,-u,_hs_atomic_add32"
129 #if WORD_SIZE_IN_BITS == 64
130          , "-Wl,-u,_hs_atomic_add64"
131 #endif
132          , "-Wl,-u,_hs_atomic_sub8"
133          , "-Wl,-u,_hs_atomic_sub16"
134          , "-Wl,-u,_hs_atomic_sub32"
135 #if WORD_SIZE_IN_BITS == 64
136          , "-Wl,-u,_hs_atomic_sub64"
137 #endif
138          , "-Wl,-u,_hs_atomic_and8"
139          , "-Wl,-u,_hs_atomic_and16"
140          , "-Wl,-u,_hs_atomic_and32"
141 #if WORD_SIZE_IN_BITS == 64
142          , "-Wl,-u,_hs_atomic_and64"
143 #endif
144          , "-Wl,-u,_hs_atomic_nand8"
145          , "-Wl,-u,_hs_atomic_nand16"
146          , "-Wl,-u,_hs_atomic_nand32"
147 #if WORD_SIZE_IN_BITS == 64
148          , "-Wl,-u,_hs_atomic_nand64"
149 #endif
150          , "-Wl,-u,_hs_atomic_or8"
151          , "-Wl,-u,_hs_atomic_or16"
152          , "-Wl,-u,_hs_atomic_or32"
153 #if WORD_SIZE_IN_BITS == 64
154          , "-Wl,-u,_hs_atomic_or64"
155 #endif
156          , "-Wl,-u,_hs_atomic_xor8"
157          , "-Wl,-u,_hs_atomic_xor16"
158          , "-Wl,-u,_hs_atomic_xor32"
159 #if WORD_SIZE_IN_BITS == 64
160          , "-Wl,-u,_hs_atomic_xor64"
161 #endif
162          , "-Wl,-u,_hs_cmpxchg8"
163          , "-Wl,-u,_hs_cmpxchg16"
164          , "-Wl,-u,_hs_cmpxchg32"
165 #if WORD_SIZE_IN_BITS == 64
166          , "-Wl,-u,_hs_cmpxchg64"
167 #endif
168          , "-Wl,-u,_hs_atomicread8"
169          , "-Wl,-u,_hs_atomicread16"
170          , "-Wl,-u,_hs_atomicread32"
171 #if WORD_SIZE_IN_BITS == 64
172          , "-Wl,-u,_hs_atomicread64"
173 #endif
174          , "-Wl,-u,_hs_atomicwrite8"
175          , "-Wl,-u,_hs_atomicwrite16"
176          , "-Wl,-u,_hs_atomicwrite32"
177 #if WORD_SIZE_IN_BITS == 64
178          , "-Wl,-u,_hs_atomicwrite64"
179 #endif
180 #else
181            "-Wl,-u,ghczmprim_GHCziTypes_Izh_static_info"
182          , "-Wl,-u,ghczmprim_GHCziTypes_Czh_static_info"
183          , "-Wl,-u,ghczmprim_GHCziTypes_Fzh_static_info"
184          , "-Wl,-u,ghczmprim_GHCziTypes_Dzh_static_info"
185          , "-Wl,-u,base_GHCziPtr_Ptr_static_info"
186          , "-Wl,-u,ghczmprim_GHCziTypes_Wzh_static_info"
187          , "-Wl,-u,base_GHCziInt_I8zh_static_info"
188          , "-Wl,-u,base_GHCziInt_I16zh_static_info"
189          , "-Wl,-u,base_GHCziInt_I32zh_static_info"
190          , "-Wl,-u,base_GHCziInt_I64zh_static_info"
191          , "-Wl,-u,base_GHCziWord_W8zh_static_info"
192          , "-Wl,-u,base_GHCziWord_W16zh_static_info"
193          , "-Wl,-u,base_GHCziWord_W32zh_static_info"
194          , "-Wl,-u,base_GHCziWord_W64zh_static_info"
195          , "-Wl,-u,base_GHCziStable_StablePtr_static_info"
196          , "-Wl,-u,ghczmprim_GHCziTypes_Izh_con_info"
197          , "-Wl,-u,ghczmprim_GHCziTypes_Czh_con_info"
198          , "-Wl,-u,ghczmprim_GHCziTypes_Fzh_con_info"
199          , "-Wl,-u,ghczmprim_GHCziTypes_Dzh_con_info"
200          , "-Wl,-u,base_GHCziPtr_Ptr_con_info"
201          , "-Wl,-u,base_GHCziPtr_FunPtr_con_info"
202          , "-Wl,-u,base_GHCziStable_StablePtr_con_info"
203          , "-Wl,-u,ghczmprim_GHCziTuple_Z0T_closure"
204          , "-Wl,-u,ghczmprim_GHCziTypes_False_closure"
205          , "-Wl,-u,ghczmprim_GHCziTypes_True_closure"
206          , "-Wl,-u,base_GHCziPack_unpackCString_closure"
207          , "-Wl,-u,base_GHCziIOziException_stackOverflow_closure"
208          , "-Wl,-u,base_GHCziIOziException_heapOverflow_closure"
209          , "-Wl,-u,base_ControlziExceptionziBase_nonTermination_closure"
210          , "-Wl,-u,base_GHCziIOziException_blockedIndefinitelyOnMVar_closure"
211          , "-Wl,-u,base_GHCziIOziException_blockedIndefinitelyOnSTM_closure"
212          , "-Wl,-u,base_GHCziIOziException_allocationLimitExceeded_closure"
213          , "-Wl,-u,base_ControlziExceptionziBase_nestedAtomically_closure"
214          , "-Wl,-u,base_GHCziEventziThread_blockedOnBadFD_closure"
215          , "-Wl,-u,base_GHCziWeak_runFinalizzerBatch_closure"
216          , "-Wl,-u,base_GHCziTopHandler_flushStdHandles_closure"
217          , "-Wl,-u,base_GHCziTopHandler_runIO_closure"
218          , "-Wl,-u,base_GHCziTopHandler_runNonIO_closure"
219          , "-Wl,-u,base_GHCziConcziIO_ensureIOManagerIsRunning_closure"
220          , "-Wl,-u,base_GHCziConcziIO_ioManagerCapabilitiesChanged_closure"
221          , "-Wl,-u,base_GHCziConcziSync_runSparks_closure"
222          , "-Wl,-u,base_GHCziConcziSignal_runHandlersPtr_closure"
223          , "-Wl,-u,hs_atomic_add8"
224          , "-Wl,-u,hs_atomic_add16"
225          , "-Wl,-u,hs_atomic_add32"
226 #if WORD_SIZE_IN_BITS == 64
227          , "-Wl,-u,hs_atomic_add64"
228 #endif
229          , "-Wl,-u,hs_atomic_sub8"
230          , "-Wl,-u,hs_atomic_sub16"
231          , "-Wl,-u,hs_atomic_sub32"
232 #if WORD_SIZE_IN_BITS == 64
233          , "-Wl,-u,hs_atomic_sub64"
234 #endif
235          , "-Wl,-u,hs_atomic_and8"
236          , "-Wl,-u,hs_atomic_and16"
237          , "-Wl,-u,hs_atomic_and32"
238 #if WORD_SIZE_IN_BITS == 64
239          , "-Wl,-u,hs_atomic_and64"
240 #endif
241          , "-Wl,-u,hs_atomic_nand8"
242          , "-Wl,-u,hs_atomic_nand16"
243          , "-Wl,-u,hs_atomic_nand32"
244 #if WORD_SIZE_IN_BITS == 64
245          , "-Wl,-u,hs_atomic_nand64"
246 #endif
247          , "-Wl,-u,hs_atomic_or8"
248          , "-Wl,-u,hs_atomic_or16"
249          , "-Wl,-u,hs_atomic_or32"
250 #if WORD_SIZE_IN_BITS == 64
251          , "-Wl,-u,hs_atomic_or64"
252 #endif
253          , "-Wl,-u,hs_atomic_xor8"
254          , "-Wl,-u,hs_atomic_xor16"
255          , "-Wl,-u,hs_atomic_xor32"
256 #if WORD_SIZE_IN_BITS == 64
257          , "-Wl,-u,hs_atomic_xor64"
258 #endif
259          , "-Wl,-u,hs_cmpxchg8"
260          , "-Wl,-u,hs_cmpxchg16"
261          , "-Wl,-u,hs_cmpxchg32"
262 #if WORD_SIZE_IN_BITS == 64
263          , "-Wl,-u,hs_cmpxchg64"
264 #endif
265          , "-Wl,-u,hs_atomicread8"
266          , "-Wl,-u,hs_atomicread16"
267          , "-Wl,-u,hs_atomicread32"
268 #if WORD_SIZE_IN_BITS == 64
269          , "-Wl,-u,hs_atomicread64"
270 #endif
271          , "-Wl,-u,hs_atomicwrite8"
272          , "-Wl,-u,hs_atomicwrite16"
273          , "-Wl,-u,hs_atomicwrite32"
274 #if WORD_SIZE_IN_BITS == 64
275          , "-Wl,-u,hs_atomicwrite64"
276 #endif
277 #endif
278
279 /*  Pick up static libraries in preference over dynamic if in earlier search
280  *  path.  This is important to use the static gmp in preference on Mac OS.
281  *  The used option is specific to the Darwin linker.
282  */
283 #ifdef darwin_HOST_OS
284          , "-Wl,-search_paths_first"
285 #endif
286
287 #if defined(darwin_HOST_OS) && !defined(x86_64_HOST_ARCH)
288          , "-read_only_relocs", "warning"
289 #endif
290
291 framework-dirs:
292
293 haddock-interfaces:
294 haddock-html: