summaryrefslogtreecommitdiff
path: root/hints/powerux.sh
diff options
context:
space:
mode:
authorTom Horsley <Tom.Horsley@mail.ccur.com>2002-03-08 13:24:14 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-03-08 13:40:35 +0000
commit92d0bc234510f4edc8fc26296133a8d387183cff (patch)
tree7b1cb29f66bafa62bd021504dcddf9be221eb907 /hints/powerux.sh
parentd464cda8414246b426753b1fdd6237ea6e1966a0 (diff)
downloadperl-92d0bc234510f4edc8fc26296133a8d387183cff.tar.gz
hints/powerux.sh for perl-5.7.3
Message-Id: <200203081324.NAA00642@cleo> p4raw-id: //depot/perl@15103
Diffstat (limited to 'hints/powerux.sh')
-rw-r--r--hints/powerux.sh180
1 files changed, 144 insertions, 36 deletions
diff --git a/hints/powerux.sh b/hints/powerux.sh
index dc1b3d07f0..c95e0e9ef5 100644
--- a/hints/powerux.sh
+++ b/hints/powerux.sh
@@ -1,32 +1,30 @@
-# Hints for the PowerUX operating system running on Concurrent (formerly
-# Harris) NightHawk machines. Written by Tom.Horsley@mail.ccur.com
+# Hints for the Power MAX OS operating system (formerly PowerUX - hence the
+# name) running on Concurrent (formerly Harris) NightHawk machines. Written
+# by Tom.Horsley@ccur.com
#
-# Note: The OS is fated to change names again to PowerMAX OS, but this
-# PowerUX file should still work (I wish marketing would make up their mind
-# about the name :-).
-#
-# This config uses dynamic linking and the Concurrent C compiler. It has
-# been tested on Power PC based 6000 series machines running PowerUX.
+# This hint uses dynamic linking and the new Concurrent C compiler (based
+# on the Edison front end). This hint file was produced for a build of the
+# 5.7.3 development release of perl running on a PowerMAX_OS 5.1SR2 system
+# (but it should work on any Power MAX release using the newer "ec" (versus
+# "cc") compiler, and hopefully will also work for the upcoming 5.8
+# development release of perl).
-# Internally at Concurrent, we use a source management tool which winds up
-# giving us read-only copies of source trees that are mostly symbolic links.
-# That upsets the perl build process when it tries to edit opcode.h and
-# embed.h or touch perly.c or perly.h, so turn those files into "real" files
-# when Configure runs. (If you already have "real" source files, this won't
-# do anything).
-#
-if [ -x /usr/local/mkreal ]
+# First find out where the root of the source tree is located.
+
+SRCROOT=""
+if [ -f ./INSTALL ]
then
- for i in '.' '..'
- do
- for j in embed.h opcode.h perly.h perly.c
- do
- if [ -h $i/$j ]
- then
- ( cd $i ; /usr/local/mkreal $j ; chmod 666 $j )
- fi
- done
- done
+ SRCROOT="."
+else
+ if [ -f ../INSTALL ]
+ then
+ SRCROOT=".."
+ fi
+fi
+if [ -z "$SRCROOT" ]
+then
+ echo "powerux hint file cannot locate root perl source!" 1>&2
+ exit 2
fi
# We DO NOT want -lmalloc or -lPW, we DO need -lgen to follow -lnsl, so
@@ -44,17 +42,123 @@ glibpth=`echo ' '$glibpth' ' | sed -e 's@ /usr/ucblib @ @'`
#
d_csh='undef'
-# Need to use Concurrent cc for most of these options to be meaningful (if you
+# Need to use Concurrent ec for most of these options to be meaningful (if you
# want to get this to work with gcc, you're on your own :-). Passing
# -Bexport to the linker when linking perl is important because it leaves
# the interpreter internal symbols visible to the shared libs that will be
-# loaded on demand (and will try to reference those symbols).
+# loaded on demand (and will try to reference those symbols). The -usys_nerr
+# drags in some stuff from libc that perl proper doesn't reference but
+# some dynamically linked extension will need to be in the static part
+# of perl (there are probably more of these that might be useful, but
+# for the extensions I build, this turned out to be enough). The -uldexp
+# makes sure the custom ldexp.o I add to archobjs actually gets pulled
+# into perl from libperl.a
#
-cc='/bin/cc'
+cc='/usr/ccs/bin/ec'
cccdlflags='-Zpic'
-ccdlflags='-Zlink=dynamic -Wl,-usys_nerr -Wl,-Bexport'
+ccdlflags='-Zlink=dynamic -Wl,-usys_nerr -Wl,-uldexp -Wl,-Bexport'
lddlflags='-Zlink=so'
+# Sigh... Various versions of Power MAX went out with a broken ldexp runtime
+# routine in libc (it is fixed for sure in the upcoming SR4 release, but
+# that hasn't made it out the door yet). Since libc is linked dynamically,
+# and the perl you build might try to run on one of the broken systems, we
+# need to statically link a corrected copy of ldexp.o into perl. What the
+# following code does is determine if the ldexp.o on the current system
+# works right. If it does, it simply extracts the ldexp.o from the system C
+# library and uses that .o file. If the system .o is broken, the btoa
+# encoded copy of a correct ldexp.o file included in this hint file is used
+# (what a pain...)
+#
+if [ ! -f $SRCROOT/ldexp.o ]
+then
+ echo Finding a correct copy of ldexp.o to link with... 1>&2
+ cat > $SRCROOT/UU/ldexptest.c <<'EOF'
+#include <stdio.h>
+#include <math.h>
+#include <string.h>
+int
+main(int argc, char ** argv) {
+ double result = pow(2.0, 38.0);
+ char buf[100];
+ sprintf(buf, "%g", result);
+ if (strncmp(buf, "inf", 3) == 0) {
+ exit(2);
+ }
+ return 0;
+}
+EOF
+ GOODLDEXP="no"
+ $cc -v -Zlink=static -o $SRCROOT/UU/ldexptest $SRCROOT/UU/ldexptest.c -lm > $SRCROOT/UU/ldexptest.lo 2>&1
+ if [ $? -eq 0 ]
+ then
+ $SRCROOT/UU/ldexptest
+ if [ $? -eq 0 ]
+ then
+ LDEXPLIB=`fgrep libc.a $SRCROOT/UU/ldexptest.lo | tail -1 | sed -e 's@^[^/]*@@'`
+ if [ -s "$LDEXPLIB" ]
+ then
+ if [ -f "$LDEXPLIB" ]
+ then
+ GOODLDEXP="yes"
+ fi
+ fi
+ fi
+ fi
+ if [ "$GOODLDEXP" = "yes" ]
+ then
+ echo Congratulations! The ldexp.o on this system looks good! 1>&2
+ echo Using ldexp.o from $LDEXPLIB 1>&2
+ ( cd $SRCROOT ; ar x $LDEXPLIB ldexp.o )
+ else
+ echo Sorry, the ldexp.o on this system is busted. 1>&2
+ echo Using the ldexp.o from the powerux hint file 1>&2
+ atob > $SRCROOT/ldexp.o << 'EOF'
+xbtoa Begin
+Imm%#!<N9%zz!!*'-!!!!"zz!!!8Jz!&OZU!!!!I!"/c-!%r>7Ecb`!!%rA)G]Wp<Ec5JsFC>/%FC\
+s(@fS,lAR]dp?YjFoAH3u00JG4;0JEJZF*VVE@:B4QA7^")/n4k]/hUsNAU&0$@rH4'?Zg7#FC/KgB
+5)5`!%om?A7^")?Y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-H!!!!A!!!!)!!!3Gz!!!
+!-!!!'C!!!)]!!!!>!!!*Ezzzzzzzzzzz!!!!"!!!!$zz!!!!U!!!$Yzz!!!!"z!!!!*!!!!"!!!!'
+z!!!%=!!!)]zz!!!!1z!!!!0!!!!"!!!!#z!!!.(!!!!Qzz!!!!)z!!!!8!!!!"!!!!#z!!!.X!!!!
+Ezz!!!!%z!!!!?!!!!"zz!!!/'!!!"Dzz!!!!%z!!!!KJ,fQLzz!!!0J!!!!Ezz!!!!%z!!!!T!!!!
+#zz!!!0n!!!$b!!!!"!!!!0!!!!%!!!!1!!!$1!!!!%zz!!!4Z!!!$B!!!!(!!!!#!!!!%!!!!-!!!
+$<!!!!%zz!!!8&!!!!9!!!!(!!!!%!!!!%!!!!-!!!$H!!!!%zz!!!8>!!!!-!!!!(!!!!&!!!!%!!
+!!-
+xbtoa End N 2436 984 E ad S 1bf43 R a7867666
+EOF
+ fi
+ ( cd $SRCROOT/UU ; rm -f ldexptest* )
+fi
+if [ -f $SRCROOT/ldexp.o ]
+then
+ archobjs='ldexp.o'
+fi
+
# Configure sometime finds what it believes to be ndbm header files on the
# system and imagines that we have the NDBM library, but we really don't.
# There is something there that once resembled ndbm, but it is purely
@@ -63,15 +167,18 @@ lddlflags='-Zlink=so'
#
i_ndbm='undef'
-# I have no clue what perl thinks it wants <sys/mode.h> for, but if
-# you include it in a program in PowerMAX without first including
-# <sys/vnode.h> the code don't compile...
+# I have no clue what perl thinks it wants <sys/mode.h> for, but if you
+# include it in a program in PowerMAX without first including <sys/vnode.h>
+# the code don't compile (apparently some other operating system has
+# something completely different in its sys/mode.h)
#
i_sysmode='undef'
-# There is a bug in memcmp (which I hope will be fixed soon) which sometimes
-# fails to provide the correct compare status (it is data dependant), so just
-# pretend there is no memcmp...
+# There was a bug in memcmp (which was fixed a while ago) which sometimes
+# fails to provide the correct compare status (it is data dependant). I
+# don't wnat to figure out if you are building with the correct version or
+# not, so just pretend there is no memcmp (since perl has its own handy
+# substitute).
#
d_memcmp='undef'
@@ -108,3 +215,4 @@ d_mymalloc='undef'
usemymalloc='n'
ssizetype='ssize_t'
usevfork='false'
+