Add atomic operations to package.conf.in
[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_GHCziTypes_False_closure"
107          , "-Wl,-u,_ghczmprim_GHCziTypes_True_closure"
108          , "-Wl,-u,_base_GHCziPack_unpackCString_closure"
109          , "-Wl,-u,_base_GHCziIOziException_stackOverflow_closure"
110          , "-Wl,-u,_base_GHCziIOziException_heapOverflow_closure"
111          , "-Wl,-u,_base_ControlziExceptionziBase_nonTermination_closure"
112          , "-Wl,-u,_base_GHCziIOziException_blockedIndefinitelyOnMVar_closure"
113          , "-Wl,-u,_base_GHCziIOziException_blockedIndefinitelyOnSTM_closure"
114          , "-Wl,-u,_base_GHCziIOziException_allocationLimitExceeded_closure"
115          , "-Wl,-u,_base_ControlziExceptionziBase_nestedAtomically_closure"
116          , "-Wl,-u,_base_GHCziEventziThread_blockedOnBadFD_closure"
117          , "-Wl,-u,_base_GHCziWeak_runFinalizzerBatch_closure"
118          , "-Wl,-u,_base_GHCziTopHandler_flushStdHandles_closure"
119          , "-Wl,-u,_base_GHCziTopHandler_runIO_closure"
120          , "-Wl,-u,_base_GHCziTopHandler_runNonIO_closure"
121          , "-Wl,-u,_base_GHCziConcziIO_ensureIOManagerIsRunning_closure"
122          , "-Wl,-u,_base_GHCziConcziIO_ioManagerCapabilitiesChanged_closure"
123          , "-Wl,-u,_base_GHCziConcziSync_runSparks_closure"
124          , "-Wl,-u,_base_GHCziConcziSignal_runHandlersPtr_closure"
125          , "-Wl,-u,_hs_atomic_add8"
126          , "-Wl,-u,_hs_atomic_add16"
127          , "-Wl,-u,_hs_atomic_add32"
128 #if WORD_SIZE_IN_BITS == 64
129          , "-Wl,-u,_hs_atomic_add64"
130 #endif
131          , "-Wl,-u,_hs_atomic_sub8"
132          , "-Wl,-u,_hs_atomic_sub16"
133          , "-Wl,-u,_hs_atomic_sub32"
134 #if WORD_SIZE_IN_BITS == 64
135          , "-Wl,-u,_hs_atomic_sub64"
136 #endif
137          , "-Wl,-u,_hs_atomic_and8"
138          , "-Wl,-u,_hs_atomic_and16"
139          , "-Wl,-u,_hs_atomic_and32"
140 #if WORD_SIZE_IN_BITS == 64
141          , "-Wl,-u,_hs_atomic_and64"
142 #endif
143          , "-Wl,-u,_hs_atomic_nand8"
144          , "-Wl,-u,_hs_atomic_nand16"
145          , "-Wl,-u,_hs_atomic_nand32"
146 #if WORD_SIZE_IN_BITS == 64
147          , "-Wl,-u,_hs_atomic_nand64"
148 #endif
149          , "-Wl,-u,_hs_atomic_or8"
150          , "-Wl,-u,_hs_atomic_or16"
151          , "-Wl,-u,_hs_atomic_or32"
152 #if WORD_SIZE_IN_BITS == 64
153          , "-Wl,-u,_hs_atomic_or64"
154 #endif
155          , "-Wl,-u,_hs_atomic_xor8"
156          , "-Wl,-u,_hs_atomic_xor16"
157          , "-Wl,-u,_hs_atomic_xor32"
158 #if WORD_SIZE_IN_BITS == 64
159          , "-Wl,-u,_hs_atomic_xor64"
160 #endif
161          , "-Wl,-u,_hs_cmpxchg8"
162          , "-Wl,-u,_hs_cmpxchg16"
163          , "-Wl,-u,_hs_cmpxchg32"
164 #if WORD_SIZE_IN_BITS == 64
165          , "-Wl,-u,_hs_cmpxchg64"
166 #endif
167          , "-Wl,-u,_hs_atomicread8"
168          , "-Wl,-u,_hs_atomicread16"
169          , "-Wl,-u,_hs_atomicread32"
170 #if WORD_SIZE_IN_BITS == 64
171          , "-Wl,-u,_hs_atomicread64"
172 #endif
173          , "-Wl,-u,_hs_atomicwrite8"
174          , "-Wl,-u,_hs_atomicwrite16"
175          , "-Wl,-u,_hs_atomicwrite32"
176 #if WORD_SIZE_IN_BITS == 64
177          , "-Wl,-u,_hs_atomicwrite64"
178 #endif
179 #else
180            "-Wl,-u,ghczmprim_GHCziTypes_Izh_static_info"
181          , "-Wl,-u,ghczmprim_GHCziTypes_Czh_static_info"
182          , "-Wl,-u,ghczmprim_GHCziTypes_Fzh_static_info"
183          , "-Wl,-u,ghczmprim_GHCziTypes_Dzh_static_info"
184          , "-Wl,-u,base_GHCziPtr_Ptr_static_info"
185          , "-Wl,-u,ghczmprim_GHCziTypes_Wzh_static_info"
186          , "-Wl,-u,base_GHCziInt_I8zh_static_info"
187          , "-Wl,-u,base_GHCziInt_I16zh_static_info"
188          , "-Wl,-u,base_GHCziInt_I32zh_static_info"
189          , "-Wl,-u,base_GHCziInt_I64zh_static_info"
190          , "-Wl,-u,base_GHCziWord_W8zh_static_info"
191          , "-Wl,-u,base_GHCziWord_W16zh_static_info"
192          , "-Wl,-u,base_GHCziWord_W32zh_static_info"
193          , "-Wl,-u,base_GHCziWord_W64zh_static_info"
194          , "-Wl,-u,base_GHCziStable_StablePtr_static_info"
195          , "-Wl,-u,ghczmprim_GHCziTypes_Izh_con_info"
196          , "-Wl,-u,ghczmprim_GHCziTypes_Czh_con_info"
197          , "-Wl,-u,ghczmprim_GHCziTypes_Fzh_con_info"
198          , "-Wl,-u,ghczmprim_GHCziTypes_Dzh_con_info"
199          , "-Wl,-u,base_GHCziPtr_Ptr_con_info"
200          , "-Wl,-u,base_GHCziPtr_FunPtr_con_info"
201          , "-Wl,-u,base_GHCziStable_StablePtr_con_info"
202          , "-Wl,-u,ghczmprim_GHCziTypes_False_closure"
203          , "-Wl,-u,ghczmprim_GHCziTypes_True_closure"
204          , "-Wl,-u,base_GHCziPack_unpackCString_closure"
205          , "-Wl,-u,base_GHCziIOziException_stackOverflow_closure"
206          , "-Wl,-u,base_GHCziIOziException_heapOverflow_closure"
207          , "-Wl,-u,base_ControlziExceptionziBase_nonTermination_closure"
208          , "-Wl,-u,base_GHCziIOziException_blockedIndefinitelyOnMVar_closure"
209          , "-Wl,-u,base_GHCziIOziException_blockedIndefinitelyOnSTM_closure"
210          , "-Wl,-u,base_GHCziIOziException_allocationLimitExceeded_closure"
211          , "-Wl,-u,base_ControlziExceptionziBase_nestedAtomically_closure"
212          , "-Wl,-u,base_GHCziEventziThread_blockedOnBadFD_closure"
213          , "-Wl,-u,base_GHCziWeak_runFinalizzerBatch_closure"
214          , "-Wl,-u,base_GHCziTopHandler_flushStdHandles_closure"
215          , "-Wl,-u,base_GHCziTopHandler_runIO_closure"
216          , "-Wl,-u,base_GHCziTopHandler_runNonIO_closure"
217          , "-Wl,-u,base_GHCziConcziIO_ensureIOManagerIsRunning_closure"
218          , "-Wl,-u,base_GHCziConcziIO_ioManagerCapabilitiesChanged_closure"
219          , "-Wl,-u,base_GHCziConcziSync_runSparks_closure"
220          , "-Wl,-u,base_GHCziConcziSignal_runHandlersPtr_closure"
221          , "-Wl,-u,hs_atomic_add8"
222          , "-Wl,-u,hs_atomic_add16"
223          , "-Wl,-u,hs_atomic_add32"
224 #if WORD_SIZE_IN_BITS == 64
225          , "-Wl,-u,hs_atomic_add64"
226 #endif
227          , "-Wl,-u,hs_atomic_sub8"
228          , "-Wl,-u,hs_atomic_sub16"
229          , "-Wl,-u,hs_atomic_sub32"
230 #if WORD_SIZE_IN_BITS == 64
231          , "-Wl,-u,hs_atomic_sub64"
232 #endif
233          , "-Wl,-u,hs_atomic_and8"
234          , "-Wl,-u,hs_atomic_and16"
235          , "-Wl,-u,hs_atomic_and32"
236 #if WORD_SIZE_IN_BITS == 64
237          , "-Wl,-u,hs_atomic_and64"
238 #endif
239          , "-Wl,-u,hs_atomic_nand8"
240          , "-Wl,-u,hs_atomic_nand16"
241          , "-Wl,-u,hs_atomic_nand32"
242 #if WORD_SIZE_IN_BITS == 64
243          , "-Wl,-u,hs_atomic_nand64"
244 #endif
245          , "-Wl,-u,hs_atomic_or8"
246          , "-Wl,-u,hs_atomic_or16"
247          , "-Wl,-u,hs_atomic_or32"
248 #if WORD_SIZE_IN_BITS == 64
249          , "-Wl,-u,hs_atomic_or64"
250 #endif
251          , "-Wl,-u,hs_atomic_xor8"
252          , "-Wl,-u,hs_atomic_xor16"
253          , "-Wl,-u,hs_atomic_xor32"
254 #if WORD_SIZE_IN_BITS == 64
255          , "-Wl,-u,hs_atomic_xor64"
256 #endif
257          , "-Wl,-u,hs_cmpxchg8"
258          , "-Wl,-u,hs_cmpxchg16"
259          , "-Wl,-u,hs_cmpxchg32"
260 #if WORD_SIZE_IN_BITS == 64
261          , "-Wl,-u,hs_cmpxchg64"
262 #endif
263          , "-Wl,-u,hs_atomicread8"
264          , "-Wl,-u,hs_atomicread16"
265          , "-Wl,-u,hs_atomicread32"
266 #if WORD_SIZE_IN_BITS == 64
267          , "-Wl,-u,hs_atomicread64"
268 #endif
269          , "-Wl,-u,hs_atomicwrite8"
270          , "-Wl,-u,hs_atomicwrite16"
271          , "-Wl,-u,hs_atomicwrite32"
272 #if WORD_SIZE_IN_BITS == 64
273          , "-Wl,-u,hs_atomicwrite64"
274 #endif
275 #endif
276
277 /*  Pick up static libraries in preference over dynamic if in earlier search
278  *  path.  This is important to use the static gmp in preference on Mac OS.
279  *  The used option is specific to the Darwin linker.
280  */
281 #ifdef darwin_HOST_OS
282          , "-Wl,-search_paths_first"
283 #endif
284
285 #if defined(darwin_HOST_OS) && !defined(x86_64_HOST_ARCH)
286          , "-read_only_relocs", "warning"
287 #endif
288
289 framework-dirs:
290
291 haddock-interfaces:
292 haddock-html: