On Wed, Nov 19, 2008 at 01:18:39PM +0000, Simon Marlow wrote:
> >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?
Patch attached. If it's not too stupid (autoconf-wise), it would
be nice if someone could apply it upstream. Applying it to other
operating systems (if necessary) shouldn't be too difficult.
Ciao,
Kili
Sat Nov 29 01:06:38 CET 2008 Matthias Kilian <[EMAIL PROTECTED]>
* fix pthread linkage problem for openbsd
This should make my openbsd build slave happy when SplitObjs=NO.
May be useful for other BSDs and even Linux, regardless wether you
need -pthread or -lpthread. Time will tell...
New patches:
[fix pthread linkage problem for openbsd
Matthias Kilian <[EMAIL PROTECTED]>**20081129000638
This should make my openbsd build slave happy when SplitObjs=NO.
May be useful for other BSDs and even Linux, regardless wether you
need -pthread or -lpthread. Time will tell...
] {
hunk ./configure.ac 197
AC_CHECK_LIB(dl, dlopen, [EXTRA_LIBS="$EXTRA_LIBS dl"])
AC_SUBST([EXTRA_LIBS])
+# -{l,}pthread goo
+AC_CANONICAL_TARGET
+
+PTHREAD_CFLAGS=
+PTHREAD_LDFLAGS=
+PTHREAD_LIBS=
+case "$host_os" in
+openbsd*)
+ PTHREAD_CFLAGS=-pthread
+ PTHREAD_LDFLAGS=-pthread
+ ;;
+esac
+AC_SUBST(PTHREAD_CFLAGS)
+AC_SUBST(PTHREAD_LDFLAGS)
+AC_SUBST(PTHREAD_LIBS)
+
AC_CONFIG_FILES([unix.buildinfo])
AC_OUTPUT
hunk ./unix.buildinfo.in 2
buildable: @BUILD_PACKAGE_BOOL@
-extra-libraries: @EXTRA_LIBS@
+cc-options: @PTHREAD_CFLAGS@
+ld-options: @PTHREAD_LDFLAGS@
+extra-libraries: @EXTRA_LIBS@ @PTHREAD_LIBS@
}
Context:
[catch up with exception changes
Simon Marlow <[EMAIL PROTECTED]>**20080927135428]
[Bump version number to 2.3.1.0
Ian Lynagh <[EMAIL PROTECTED]>**20080920160248]
[TAG 6.10 branch has been forked
Ian Lynagh <[EMAIL PROTECTED]>**20080919123439]
Patch bundle hash:
4b0a7348f02044fc30ba4170d463d2f7bb5a2790
_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc