X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=hints%2Fopenbsd.sh;h=2e7a433326406460a557a9c4353692b502b3d1d0;hb=0e06870bf080a38cda51c06c6612359afc2334e1;hp=7e68402088bf575b4b68cac518bf203d1ab3fe05;hpb=cb50131aab68ac6dda048612c6e853b8cb08701e;p=p5sagit%2Fp5-mst-13.2.git diff --git a/hints/openbsd.sh b/hints/openbsd.sh index 7e68402..2e7a433 100644 --- a/hints/openbsd.sh +++ b/hints/openbsd.sh @@ -37,7 +37,15 @@ OpenBSD.alpha|OpenBSD.mips|OpenBSD.powerpc|OpenBSD.vax) # 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" - lddlflags="-Bshareable $lddlflags" + case "$osvers" in + [01].*|2.[0-7]|2.[0-7].*) + lddlflags="-Bshareable $lddlflags" + ;; + *) # from 2.8 onwards + ld=${cc:-cc} + lddlflags="-shared -fPIC $lddlflags" + ;; + esac ;; esac @@ -68,7 +76,11 @@ cat > UU/usethreads.cbu <<'EOCBU' case "$usethreads" in $define|true|[yY]*) # any openbsd version dependencies with pthreads? + ccflags="-pthread $ccflags" + ldflags="-pthread $ldflags" libswanted="$libswanted pthread" + # This is strange. + usevfork="$undef" esac EOCBU @@ -83,6 +95,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'