From: Jarkko Hietaniemi Date: Mon, 10 Dec 2001 02:47:01 +0000 (+0000) Subject: Add threads support for NetBSD. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7b938c2183e1edeb2747e974c14fe8f98968a4e8;p=p5sagit%2Fp5-mst-13.2.git Add threads support for NetBSD. This is also the first (I think) Perl threads build with the GNU pth ( http://www.gnu.org/software/pth/pth.html ). NetBSD does not as of yet have true kernel POSIX threads, but the user-level pth seems to be doing pretty well-- the only failure is that threads/t/basic okays 6 and 7 consistently seem be arriving in the reverse order. Well, gdbm.t is also failing: 'Undefined PLT symbol "gdbm_open" (reloc type = 7, symnum = 28)', but I'm guessing that GDBM would need a threaded rebuild. p4raw-id: //depot/perl@13585 --- diff --git a/hints/netbsd.sh b/hints/netbsd.sh index 00fb809..1d3b270 100644 --- a/hints/netbsd.sh +++ b/hints/netbsd.sh @@ -78,6 +78,28 @@ installusrbinperl="$undef" # This is there but in machine/ieeefp_h. ieeefp_h="define" +# This script UU/usethreads.cbu will get 'called-back' by Configure +# after it has prompted the user for whether to use threads. +cat > UU/usethreads.cbu <<'EOCBU' +case "$usethreads" in +$define|true|[yY]*) + # The GNU pth is the recommended user-level pthreads implementation. + # As of NetBSD 1.5.2 there are no kernel pthreads. + if pkg_info -qe pth; then + # Add -lpthread. + libswanted="$libswanted pthread" + # -R so that we find the libpthread.so from /usr/pkg/lib + # during Configure and build. + ldflags="-R/usr/pkg/lib $ldflags" + # There is no libc_r as of NetBSD 1.5.2, so no c -> c_r. + else + echo "$0: You need to install the GNU pth. Aborting." >&4 + exit 1 + fi + ;; +esac +EOCBU + # Recognize the NetBSD packages collection. # GDBM might be here. test -d /usr/pkg/lib && loclibpth="$loclibpth /usr/pkg/lib"