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