ghc rts selection and third party libraries

John Lask jvlask at
Mon Feb 1 00:33:40 EST 2010


I hope someone can provide some guidance on how I can solve a certain 

I have a library that taps into the ghc c rts: specifically when the rts 
is single threaded I am pumping events in via: stg_pending_events, when 
the threaded rts is used I use sendIOManagerEvent.

i.e. I have two versions of the library with the same api. The problem 
with this is that either library is only good for one context: either 
threaded rts or not, and the user needs to select the appropriate 
library to use depending on the use context.

What I want to be able to do is to have ghc automatically select the 
compiled library version to link in depending on the which rts option is 
selected: "-thread" or not

does any one have any ideas?

More information about the Glasgow-haskell-users mailing list