Enforce linkage with pthread library on OpenBSD
[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" PAPI_LIB_DIR FFI_LIB_DIR
21 #else /* !INSTALLING */
22 library-dirs:           TOP"/rts/dist/build" PAPI_LIB_DIR 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 mingw32_HOST_OS
41                               ,"wsock32"    /* for the linker */
42                               ,"gdi32"      /* for the linker */
43                               ,"winmm"      /* for the linker */
44 #endif
45 #ifdef freebsd_HOST_OS
46                               , "pthread" /* for pthread_getthreadid_np() */
47 #endif
48 #ifdef openbsd_HOST_OS
49 /* OpenBSD's libffi is not directly linked to the libpthread but still requires
50 pthread functionality. This means that any client binary which links with libffi
51 also need to link with libpthread. If it does not, then linking fails with
52 unresolved symbols. */
53                               , "pthread"
54
55 #endif
56 #if defined(DEBUG) && defined(HAVE_LIBBFD)
57                               ,"bfd", "iberty"  /* for debugging */
58 #endif
59 #ifdef HAVE_LIBMINGWEX
60 # ifndef INSTALLING                             /* Bundled Mingw is behind */
61                               ,"mingwex"
62 # endif
63 #endif
64 #if USE_PAPI
65                              , "papi"
66 #endif
67 #ifdef USE_LIBDW
68                              , "elf"
69                              , "dw"             /* for backtraces */
70 #endif
71
72 #ifdef INSTALLING
73 include-dirs:           INCLUDE_DIR PAPI_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 #else
126            "-Wl,-u,ghczmprim_GHCziTypes_Izh_static_info"
127          , "-Wl,-u,ghczmprim_GHCziTypes_Czh_static_info"
128          , "-Wl,-u,ghczmprim_GHCziTypes_Fzh_static_info"
129          , "-Wl,-u,ghczmprim_GHCziTypes_Dzh_static_info"
130          , "-Wl,-u,base_GHCziPtr_Ptr_static_info"
131          , "-Wl,-u,ghczmprim_GHCziTypes_Wzh_static_info"
132          , "-Wl,-u,base_GHCziInt_I8zh_static_info"
133          , "-Wl,-u,base_GHCziInt_I16zh_static_info"
134          , "-Wl,-u,base_GHCziInt_I32zh_static_info"
135          , "-Wl,-u,base_GHCziInt_I64zh_static_info"
136          , "-Wl,-u,base_GHCziWord_W8zh_static_info"
137          , "-Wl,-u,base_GHCziWord_W16zh_static_info"
138          , "-Wl,-u,base_GHCziWord_W32zh_static_info"
139          , "-Wl,-u,base_GHCziWord_W64zh_static_info"
140          , "-Wl,-u,base_GHCziStable_StablePtr_static_info"
141          , "-Wl,-u,ghczmprim_GHCziTypes_Izh_con_info"
142          , "-Wl,-u,ghczmprim_GHCziTypes_Czh_con_info"
143          , "-Wl,-u,ghczmprim_GHCziTypes_Fzh_con_info"
144          , "-Wl,-u,ghczmprim_GHCziTypes_Dzh_con_info"
145          , "-Wl,-u,base_GHCziPtr_Ptr_con_info"
146          , "-Wl,-u,base_GHCziPtr_FunPtr_con_info"
147          , "-Wl,-u,base_GHCziStable_StablePtr_con_info"
148          , "-Wl,-u,ghczmprim_GHCziTypes_False_closure"
149          , "-Wl,-u,ghczmprim_GHCziTypes_True_closure"
150          , "-Wl,-u,base_GHCziPack_unpackCString_closure"
151          , "-Wl,-u,base_GHCziIOziException_stackOverflow_closure"
152          , "-Wl,-u,base_GHCziIOziException_heapOverflow_closure"
153          , "-Wl,-u,base_ControlziExceptionziBase_nonTermination_closure"
154          , "-Wl,-u,base_GHCziIOziException_blockedIndefinitelyOnMVar_closure"
155          , "-Wl,-u,base_GHCziIOziException_blockedIndefinitelyOnSTM_closure"
156          , "-Wl,-u,base_GHCziIOziException_allocationLimitExceeded_closure"
157          , "-Wl,-u,base_ControlziExceptionziBase_nestedAtomically_closure"
158          , "-Wl,-u,base_GHCziEventziThread_blockedOnBadFD_closure"
159          , "-Wl,-u,base_GHCziWeak_runFinalizzerBatch_closure"
160          , "-Wl,-u,base_GHCziTopHandler_flushStdHandles_closure"
161          , "-Wl,-u,base_GHCziTopHandler_runIO_closure"
162          , "-Wl,-u,base_GHCziTopHandler_runNonIO_closure"
163          , "-Wl,-u,base_GHCziConcziIO_ensureIOManagerIsRunning_closure"
164          , "-Wl,-u,base_GHCziConcziIO_ioManagerCapabilitiesChanged_closure"
165          , "-Wl,-u,base_GHCziConcziSync_runSparks_closure"
166          , "-Wl,-u,base_GHCziConcziSignal_runHandlersPtr_closure"
167 #endif
168
169 /*  Pick up static libraries in preference over dynamic if in earlier search
170  *  path.  This is important to use the static gmp in preference on Mac OS.
171  *  The used option is specific to the Darwin linker.
172  */
173 #ifdef darwin_HOST_OS
174          , "-Wl,-search_paths_first"
175 #endif
176
177 #if defined(darwin_HOST_OS) && !defined(x86_64_HOST_ARCH)
178          , "-read_only_relocs", "warning"
179 #endif
180
181 framework-dirs:
182
183 haddock-interfaces:
184 haddock-html:
185