Matthias Kilian wrote:
From the link map (invoking gcc by hand and adding -Wl,-M):
/var/tmp/ghc/ghc-head/libraries/unix/dist/build/libHSunix-2.3.1.0.a(Posix.o)
/var/tmp/ghc/ghc-head/libraries/directory/dist/build/libHSdirectory-1.0.0.2.a(Directory.o)
(__stginit_unixzm2zi3zi1zi0_SystemziPosix_)
[...]
/var/tmp/ghc/ghc-head/libraries/unix/dist/build/libHSunix-2.3.1.0.a(Semaphore.o)
/var/tmp/ghc/ghc-head/libraries/unix/dist/build/libHSunix-2.3.1.0.a(Posix.o)
(__stginit_unixzm2zi3zi1zi0_SystemziPosixziSemaphore_)
Semaphore.o is pulled in via Posix.o which is pulled in via
libHSdirectory(Directory.o). I wonder wether this works on any
unix-like system when SplitObjs=NO.
My only idea how to fix this it to add -pthread to cc-options and
ld-options of unix.buildinfo if SplitObjs=NO, but this sounds like
a crude hack to me.
If anyone has a better solution, please let me know.
SplitObjs is a red herring: it only hides the real problem, which is that
the unix package depends on the pthread library on OpenBSD, and doesn't
express this dependency in its .cabal file. The fix is surely to add
-lpthread to extra-libraries in unix.cabal. Right?
Cheers,
Simon
_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc