summaryrefslogtreecommitdiff
path: root/hints/solaris_2.sh
diff options
context:
space:
mode:
authorAlan Burlison <Alan.Burlison@uk.sun.com>2003-07-01 01:03:24 +0100
committerJarkko Hietaniemi <jhi@iki.fi>2003-07-01 05:04:50 +0000
commit6bdd71ef1830fa9fb85306405e4da0222df1321d (patch)
tree2fb88ccc6e29120e6f97d3358d7d74592f52c902 /hints/solaris_2.sh
parent15e890e9f40e1f08583b147ed6ceb93e819e7aa1 (diff)
downloadperl-6bdd71ef1830fa9fb85306405e4da0222df1321d.tar.gz
Re: Subject: Problems: 5.8.1, Solaris, Configure, sched_yield(), -lrt & -lposix4
Message-ID: <3F00C1BC.3020103@sun.com> p4raw-id: //depot/perl@19897
Diffstat (limited to 'hints/solaris_2.sh')
-rw-r--r--hints/solaris_2.sh27
1 files changed, 19 insertions, 8 deletions
diff --git a/hints/solaris_2.sh b/hints/solaris_2.sh
index bc49daedb6..5d643deffd 100644
--- a/hints/solaris_2.sh
+++ b/hints/solaris_2.sh
@@ -330,6 +330,21 @@ to the beginning of your PATH.
END
fi
fi
+
+# Check to see if the selected compiler and linker
+# support the -z ignore, -z lazyload and -z combreloc flags.
+echo "int main() { return(0); } " > try.c
+ zflgs=''
+for zf in ignore lazyload combreloc; do
+ if ${cc:-cc} -o try try.c -z $zf > /dev/null 2>&1; then
+ zflgs="$zflgs -z $zf"
+ fi
+done
+if test -n "$zflgs"; then
+ ccdlflags="$ccdlflags $zflgs"
+ lddlflags="$lddlflags -G $zflgs"
+fi
+
# as --version or ld --version might dump core.
rm -f try try.c core
EOCBU
@@ -341,12 +356,8 @@ case "$usethreads" in
$define|true|[yY]*)
ccflags="-D_REENTRANT $ccflags"
- # sched_yield is in -lposix4 up to Solaris 2.6, in -lrt starting with Solaris 2.7
- case `uname -r` in
- 5.[0-6] | 5.5.1) sched_yield_lib="posix4" ;;
- *) sched_yield_lib="rt";
- esac
- set `echo X "$libswanted "| sed -e "s/ c / $sched_yield_lib pthread c /"`
+ sched_yield='yield'
+ set `echo X "$libswanted "| sed -e "s/ c / pthread c /"`
shift
libswanted="$*"
@@ -496,7 +507,7 @@ Cannot continue, aborting.
EOM
exit 1
fi
- case "$cc -v 2>/dev/null" in
+ case "${cc:-cc} -v 2>/dev/null" in
*gcc*)
echo 'int main() { return 0; }' > try.c
case "`${cc:-cc} -mcpu=v9 -m64 -S try.c 2>&1 | grep 'm64 is not supported by this configuration'`" in
@@ -561,7 +572,7 @@ case "$uselongdouble" in
#include <sunmath.h>
int main() { (void) powl(2, 256); return(0); }
EOM
- if cc try.c -lsunmath -o try > /dev/null 2>&1 && ./try; then
+ if ${cc:-cc} try.c -lsunmath -o try > /dev/null 2>&1 && ./try; then
libswanted="$libswanted sunmath"
fi
else