diff options
author | Jason Downs <downsj@cvs.openbsd.org> | 1996-08-19 10:13:38 +0000 |
---|---|---|
committer | Jason Downs <downsj@cvs.openbsd.org> | 1996-08-19 10:13:38 +0000 |
commit | 14856225739aa48b6c9cf4c17925362b2d95cea3 (patch) | |
tree | dfd38f1b654fb5bbdfc38887c1a829b658e71530 /gnu/usr.bin/perl/hints/3b1cc | |
parent | 77469082517e44fe6ca347d9e8dc7dffd1583637 (diff) |
Import of Perl 5.003 into the tree. Makefile.bsd-wrapper and
config.sh.OpenBSD are the only local changes.
Diffstat (limited to 'gnu/usr.bin/perl/hints/3b1cc')
-rw-r--r-- | gnu/usr.bin/perl/hints/3b1cc | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/gnu/usr.bin/perl/hints/3b1cc b/gnu/usr.bin/perl/hints/3b1cc new file mode 100644 index 00000000000..0001e046b8c --- /dev/null +++ b/gnu/usr.bin/perl/hints/3b1cc @@ -0,0 +1,88 @@ +# To incorporate the 7300/3b1 shared library, run this script in place +# of 'CC'. +# You can skip this is you have the shcc program installed as cc in +# your path. +# First: Run 'Configure' through to the end and run 'make depend'. +# Second: Edit 'makefile' ( not Makefile ) and set CC = 3b1cc. +# Third: Edit 'x2p/makefile' and set CC = 3b1cc. +# +# Do not use '3b1cc' as the default compiler. The call to the default +# compiler is used by 'perl' and will not be available when running +# 'perl'. +# +# Note: This script omits libraries which are redundant in the shared +# library. It is an excerpt from a grander version available upon +# request from "zebra!vern" or "vern@zebra.alphacdc.com". + +CC="cc" +LIBS= +INCL= + +LD="ld" +SHAREDLIB="/lib/crt0s.o /lib/shlib.ifile" + +# Local variables +COBJS= +LOBJS= +TARG= +FLAGS= +CMD= + +# These are libraries which are incorporated in the shared library +OMIT="-lmalloc" + +# These routines are in libc.a but not in the shared library +if [ ! -f vsprintf.o -o ! -f doprnt.o ] +then + echo "Extracting vsprintf.o from libc.a" + ar -x /lib/libc.a vsprintf.o doprnt.o +fi + +CMD="$CC" +while [ $# -gt 0 ] +do + case $1 in + -c) CFLAG=$1;; + -o) CFLAG=$1 + shift + TARG="$1";; + -l*) match=false + for i in $OMIT + do + [ "$i" = "$1" ] && match=true + done + [ "$match" != false ] || LIBS="$LIBS $1";; + -*) FLAGS="$FLAGS $1";; + *.c) COBJS="$COBJS $1";; + *.o) LOBJS="$LOBJS $1";; + *) TARG="$1";; + esac + shift +done + +if [ -n "$COBJS" ] +then + CMD="$CMD $FLAGS $INCL $LPATHS $LIBS $COBJS $CFLAG $TARG" +elif [ -n "$LOBJS" ] +then + LOBJS="$LOBJS vsprintf.o doprnt.o" + CMD="$LD -r $LOBJS $LPATHS $LIBS -o temp.o" + echo "\t$CMD" + $CMD + CMD="$LD -s temp.o $SHAREDLIB -o $TARG" + echo "\t$CMD" + $CMD + ccrslt=$? + if [ $ccrslt -ne 0 ] + then + exit $ccrslt + fi + CMD="rm -f temp.o" +else + exit 1 +fi +echo "\t$CMD" +$CMD +ccrslt=$? +rm -f $$.c +exit $ccrslt |