summaryrefslogtreecommitdiff
path: root/hints/solaris_2.sh
diff options
context:
space:
mode:
authorRobin Barker <RMBarker@cpan.org>2000-03-01 17:59:36 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-03-01 18:18:04 +0000
commit9b119d5a443153d58c9d4caad4b23fab7c13227e (patch)
tree299e871daf2b5f821e32d545864e3d3df57c90d6 /hints/solaris_2.sh
parentc739111c01bcc76523dcfc2986f6b0a93da0d494 (diff)
downloadperl-9b119d5a443153d58c9d4caad4b23fab7c13227e.tar.gz
solaris 64-bit and gcc
To: perl5-porters@perl.org Message-Id: <200003011759.RAA03938@tempest.npl.co.uk> p4raw-id: //depot/cfgperl@5410
Diffstat (limited to 'hints/solaris_2.sh')
-rw-r--r--hints/solaris_2.sh28
1 files changed, 22 insertions, 6 deletions
diff --git a/hints/solaris_2.sh b/hints/solaris_2.sh
index 954af6a418..2599fe1ca6 100644
--- a/hints/solaris_2.sh
+++ b/hints/solaris_2.sh
@@ -370,7 +370,7 @@ case "$use64bitall" in
"$define"|true|[yY]*)
libc='/usr/lib/sparcv9/libc.so'
if test ! -f $libc; then
- cat <<EOM
+ cat >&4 <<EOM
I do not see the 64-bit libc, $libc.
Cannot continue, aborting.
@@ -381,11 +381,27 @@ EOM
loclibpth="$loclibpth /usr/lib/sparcv9"
case "$cc -v 2>/dev/null" in
*gcc*)
- # I don't know what are the flags to make gcc sparcv9-aware,
- # I'm just guessing. --jhi
- ccflags="$ccflags -mv9"
- ldflags="$ldflags -mv9"
- lddlflags="$lddlflags -G -mv9"
+ echo 'main() { return 0; }' > try.c
+ if ${cc:-cc} -mcpu=v9 -m64 -S try.c 2>&1 | grep -e \
+ '-m64 is not supported by this configuration'; then
+ cat >&4 <<EOM
+
+Full 64-bit build not supported by this configuration.
+Cannot continue, aborting.
+
+EOM
+ exit 1
+ fi
+ ccflags="$ccflags -mcpu=v9 -m64"
+ if test X`getconf XBS5_LP64_OFF64_CFLAGS 2>/dev/null` != X; then
+ ccflags="$ccflags -Wa,`getconf XBS5_LP64_OFF64_CFLAGS 2>/dev/null`"
+ fi
+ # no changes to ld flags, as (according to man ld):
+ #
+ # There is no specific option that tells ld to link 64-bit
+ # objects; the class of the first object that gets processed
+ # by ld determines whether it is to perform a 32-bit or a
+ # 64-bit link edit.
;;
*)
ccflags="$ccflags `getconf XBS5_LP64_OFF64_CFLAGS 2>/dev/null`"