This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Bump version to 5.25.4
[perl5.git] / hints / openbsd.sh
index cc94617..6c366ec 100644 (file)
 # OpenBSD has a better malloc than perl...
 test "$usemymalloc" || usemymalloc='n'
 
+# malloc wrap works
+case "$usemallocwrap" in
+'') usemallocwrap='define' ;;
+esac
+
 # Currently, vfork(2) is not a real win over fork(2).
 usevfork="$undef"
 
@@ -35,7 +40,7 @@ esac
 #
 ARCH=`arch | sed 's/^OpenBSD.//'`
 case "${ARCH}-${osvers}" in
-alpha-2.[0-8]|mips-2.[0-8]|powerpc-2.[0-7]|m88k-*|hppa-*|vax-*)
+alpha-2.[0-8]|mips-2.[0-8]|powerpc-2.[0-7]|m88k-[2-4].*|m88k-5.[0-2]|hppa-3.[0-5]|vax-*)
        test -z "$usedl" && usedl=$undef
        ;;
 *)
@@ -84,12 +89,12 @@ d_suidsafe=$define
 
 # cc is gcc so we can do better than -O
 # Allow a command-line override, such as -Doptimize=-g
-case ${ARCH} in
-m88k)
-   optimize='-O0'
+case "${ARCH}-${osvers}" in
+hppa-3.3|m88k-2.*|m88k-3.[0-3])
+   test "$optimize" || optimize='-O0'
    ;;
-hppa)
-   optimize='-O0'
+m88k-3.4)
+   test "$optimize" || optimize='-O1'
    ;;
 *)
    test "$optimize" || optimize='-O2'
@@ -104,6 +109,19 @@ $define|true|[yY]*)
        # any openbsd version dependencies with pthreads?
        ccflags="-pthread $ccflags"
        ldflags="-pthread $ldflags"
+       case "$osvers" in
+       [0-2].*|3.[0-2])
+               # Change from -lc to -lc_r
+               set `echo "X $libswanted " | sed 's/ c / c_r /'`
+               shift
+               libswanted="$*"
+       ;;
+       esac
+       case "$osvers" in
+       [012].*|3.[0-6])
+               # Broken up to OpenBSD 3.6, fixed in OpenBSD 3.7
+               d_getservbyname_r=$undef ;;
+       esac
 esac
 EOCBU