Change 13585 by jhi@alpha on 2001/12/10 02:47:01

        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.

Affected files ...

.... //depot/perl/hints/netbsd.sh#17 edit

Differences ...

==== //depot/perl/hints/netbsd.sh#17 (text) ====
Index: perl/hints/netbsd.sh
--- perl/hints/netbsd.sh.~1~    Sun Dec  9 20:00:05 2001
+++ perl/hints/netbsd.sh        Sun Dec  9 20:00:05 2001
@@ -78,6 +78,28 @@
 # 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"
End of Patch.

Reply via email to