Changes between 0.9.3a and 0.9.4 [xx Jul/Aug/...? 1999]
+ *) Added support for SPARC Linux.
+ [Andy Polyakov]
+
*) pem_password_cb function type incompatibly changed from
typedef int pem_password_cb(char *buf, int size, int rwflag);
to
"solaris-usparc-cc","cc:-xtarget=ultra -xarch=v8plus -xstrconst -xO5 -xdepend -Xa -DB_ENDIAN -DULTRASPARC -DBN_DIV2W::-D_REENTRANT:-lsocket -lnsl:BN_LLONG RC4_CHAR DES_PTR DES_RISC1 DES_UNROLL BF_PTR:asm/sparcv8plus.o:::asm/md5-sparcv8plus.o:",
"solaris64-usparc-cc","cc:-xtarget=ultra -xarch=v9 -xstrconst -xO5 -xdepend -Xa -DB_ENDIAN -DULTRASPARC::-D_REENTRANT:-lsocket -lnsl:SIXTY_FOUR_BIT_LONG RC4_CHAR DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR::::asm/md5-sparcv9.o:",
+#### SPARC Linux setups
+"linux-sparcv7","gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::BN_LLONG RC4_CHAR DES_UNROLL BF_PTR::",
+# Ray Miller <ray.miller@computing-services.oxford.ac.uk> has patiently
+# assisted with debugging of following two configs.
+"linux-sparcv8","gcc:-mv8 -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -DBN_DIV2W::-D_REENTRANT::BN_LLONG RC4_CHAR DES_UNROLL BF_PTR:asm/sparcv8.o::::",
+# it's a real mess with -mcpu=ultrasparc option under Linux, but
+# -Wa,-Av8plus should do the trick no matter what.
+"linux-sparcv9","gcc:-mcpu=ultrasparc -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -Wa,-Av8plus -DULTRASPARC -DBN_DIV2W::-D_REENTRANT::BN_LLONG RC4_CHAR DES_UNROLL BF_PTR:asm/sparcv8plus.o:::asm/md5-sparcv8plus.o:",
+# !!!Folowing can't be even tested yet!!!
+# We have to wait at least till 64-bit libc is available!!!
+#"linux64-sparcv9","sparc64-linux-gcc:-m64 -mcpu=v9 -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -DULTRASPARC -DBN_DIV2W::-D_REENTRANT::BN_LLONG RC4_CHAR DES_UNROLL BF_PTR::::asm/md5-sparcv9.o:",
+
# Sunos configs, assuming sparc for the gcc one.
##"sunos-cc", "cc:-O4 -DNOPROTO -DNOCONST::(unknown)::DES_UNROLL:::",
"sunos-gcc","gcc:-O3 -mv8::(unknown)::BN_LLONG RC4_CHAR DES_UNROLL DES_PTR DES_RISC1:::",
"linux-aout", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall::(unknown)::BN_LLONG $x86_gcc_des $x86_gcc_opts:$x86_out_asm",
"linux-mips", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::(unknown)::BN_LLONG:::",
"linux-ppc", "gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::(unknown)::::",
-"linux-sparc","gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::BN_LLONG RC4_CHAR DES_UNROLL BF_PTR::",
-"linux-sparc64","gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -mv8 -Wall::-D_REENTRANT:::::",
"NetBSD-sparc", "gcc:-DTERMIOS -O3 -fomit-frame-pointer -mv8 -Wall -DB_ENDIAN::(unknown)::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL:::",
"NetBSD-m68", "gcc:-DTERMIOS -O3 -fomit-frame-pointer -Wall -DB_ENDIAN::(unknown)::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL:::",
"NetBSD-x86", "gcc:-DTERMIOS -O3 -fomit-frame-pointer -m486 -Wall::(unknown)::BN_LLONG $x86_gcc_des $x86_gcc_opts:",
# figure out if gcc is available and if so we use it otherwise
# we fallback to whatever cc does on the system
-GCCVER=`(gcc -v) 2>&1`
-if [ $? = "0" ]; then
+GCCVER=`(gcc --version) 2>/dev/null`
+if [ "$GCCVER" != "" ]; then
CC=gcc
+ # then strip off whatever prefix Cygnus prepends the number with...
+ GCCVER=`echo $GCCVER | sed 's/^[a-z]*\-//'`
+ # peak only digits before and after first dot, e.g. 2.95.1 gives 29
+ GCCVER=`echo $GCCVER | sed '/\([0-9]\)\.\([0-9]\).*/\1\2/'`
else
CC=cc
if [ "$SYSTEM" = "SunOS" ]
alpha-*-linux2) OUT="alpha-gcc" ;;
ppc-*-linux2) OUT="linux-ppc" ;;
mips-*-linux?) OUT="linux-mips" ;;
+ sparc64-*-linux2)
+ #Before we uncomment following line we have to wait at least till
+ #64-bit glibc for SPARC is available:-(
+ #echo "WARNING! If you wish to build 64-bit library, then you have to"
+ #echo " invoke './Configure linux64-sparcv9' *manually*."
+ #echo " Type Ctrl-C if you don't want to continue."
+ #read waste < /dev/tty
+ OUT="linux-sparcv9" ;;
sparc-*-linux2) OUT="linux-sparc" ;;
- sparc64-*-linux2) OUT="linux-sparc64" ;;
+ KARCH=`awk '/type/{print$3}' /proc/cpuinfo`
+ case ${KARCH:-sun4} in
+ sun4u*) OUT="linux-sparcv9" ;;
+ sun4m) OUT="linux-sparcv8" ;;
+ sun4d) OUT="linux-sparcv8" ;;
+ *) OUT="linux-sparcv7" ;;
+ esac ;;
*-*-linux2) OUT="linux-elf" ;;
*-*-linux1) OUT="linux-aout" ;;
sun4u-sun-solaris2) OUT="solaris-usparc-$CC" ;;
esac
# gcc < 2.8 does not support -mcpu=ultrasparc
-if [ "$OUT" = solaris-usparc-gcc ]
+if [ "$OUT" = solaris-usparc-gcc -a $GCCVER -lt 28 ]
+then
+ echo "WARNING! Do consider upgrading to gcc-2.8 or later."
+ OUT=solaris-usparc-oldgcc
+fi
+if [ "$OUT" = "linux-sparcv9" -a $GCCVER -lt 28 ]
then
- GCCVERMAJOR="`echo $GCCVER | sed 's/.*version \([^.]*\).*/\1/`"
- GCCVERMINOR="`echo $GCCVER | sed 's/.*version[^.]*\.\([^.]*\).*/\1/`"
- echo "gcc version $GCCVERMAJOR.$GCCVERMINOR.x"
- case "$GCCVERMAJOR" in
- egcs*)
- ;;
- *)
- if [ $GCCVERMAJOR$GCCVERMINOR -lt 28 ]
- then
- OUT=solaris-usparc-oldgcc
- fi
- ;;
- esac
+ echo "WARNING! Falling down to 'linux-sparcv8'."
+ echo " Upgrade to gcc-2.8 or later."
+ OUT=linux-sparcv8
fi
case "$GUESSOS" in
asm/sparcv8.o: asm/sparcv8.S
asm/sparcv8plus.o: asm/sparcv8plus.S
- $(CC) -xarch=v8plus -c asm/sparcv8plus.S -o asm/sparcv8plus.o
asm/sparcv8plus-gcc.o: asm/sparcv8plus.S
gcc -E asm/sparcv8plus.S | /usr/ccs/bin/as -xarch=v8plus - -o asm/sparcv8plus-gcc.o
MD5_ASM_OBJ=
CFLAGS= $(INCLUDES) $(CFLAG)
+ASFLAGS=$(CFLAGS)
GENERAL=Makefile
TEST=md5test.c
asm/mx86unix.cpp: asm/md5-586.pl
(cd asm; $(PERL) md5-586.pl cpp >mx86unix.cpp)
-# works for both SC and gcc
-# (PATH is changed because /usr/ccs/bin/as knows opcodes we need
-# that GNU as has never heard of)
asm/md5-sparcv8plus.o: asm/md5-sparcv9.S
- $(CPP) -DULTRASPARC -DMD5_BLOCK_DATA_ORDER asm/md5-sparcv9.S | \
- PATH=/usr/ccs/bin:$(PATH) as -xarch=v8plus - -o asm/md5-sparcv8plus.o
+ $(CC) $(ASFLAGS) -DMD5_BLOCK_DATA_ORDER -c \
+ -o asm/md5-sparcv8plus.o asm/md5-sparcv9.S
asm/md5-sparcv9.o: asm/md5-sparcv9.S
- PATH=/usr/ccs/bin:$(PATH) $(CC) -xarch=v9 -DULTRASPARC -DMD5_BLOCK_DATA_ORDER -c asm/md5-sparcv9.S -o asm/md5-sparcv9.o
-
+ $(CC) $(ASFLAGS) -DMD5_BLOCK_DATA_ORDER -c \
+ -o asm/md5-sparcv9.o asm/md5-sparcv9.S
files:
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO