X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=hints%2Fopenbsd.sh;h=8e7c4e5ce18749465b52227cb92c5a2e0d49f016;hb=67597c89125e7e144f9ba60f5b1fe23b951286d8;hp=5b7970905550801379346676f45a61bcd634a19e;hpb=154d43cbcf57271c884e15f24587b4e8d54edbdb;p=p5sagit%2Fp5-mst-13.2.git diff --git a/hints/openbsd.sh b/hints/openbsd.sh index 5b79709..8e7c4e5 100644 --- a/hints/openbsd.sh +++ b/hints/openbsd.sh @@ -25,15 +25,18 @@ d_setruid=$undef # # Not all platforms support dynamic loading... +# For the case of "$openbsd_distribution", the hints file +# needs to know whether we are using dynamic loading so that +# it can set the libperl name appropriately. +# Allow command line overrides. # -case `arch` in -OpenBSD.alpha|OpenBSD.mips|OpenBSD.powerpc|OpenBSD.vax) - usedl=$undef +ARCH=`arch|sed 's/^OpenBSD.//'` +case "${ARCH}-${osvers}" in +alpha-*|mips-*|vax-*|powerpc-2.[0-7]|m88k-*) + test -z "$usedl" && usedl=$undef ;; *) - usedl=$define - d_dlopen=$define - d_dlerror=$define + test -z "$usedl" && usedl=$define # we use -fPIC here because -fpic is *NOT* enough for some of the # extensions like Tk on some OpenBSD platforms (ie: sparc) cccdlflags="-DPIC -fPIC $cccdlflags" @@ -43,7 +46,7 @@ OpenBSD.alpha|OpenBSD.mips|OpenBSD.powerpc|OpenBSD.vax) ;; *) # from 2.8 onwards ld=${cc:-cc} - lddlflags="-shared $lddlflags" + lddlflags="-shared -fPIC $lddlflags" ;; esac ;; @@ -68,7 +71,14 @@ d_suidsafe=$define # cc is gcc so we can do better than -O # Allow a command-line override, such as -Doptimize=-g -test "$optimize" || optimize='-O2' +case "$ARCH" in +m88k) + optimize='-O0' + ;; +*) + test "$optimize" || optimize='-O2' + ;; +esac # This script UU/usethreads.cbu will get 'called-back' by Configure # after it has prompted the user for whether to use threads. @@ -95,6 +105,9 @@ case "$openbsd_distribution" in sysman='/usr/share/man/man1' libpth='/usr/lib' glibpth='/usr/lib' + # Local things, however, do go in /usr/local + siteprefix='/usr/local' + siteprefixexp='/usr/local' # Ports installs non-std libs in /usr/local/lib so look there too locincpth='/usr/local/include' loclibpth='/usr/local/lib'