Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/openssl/openssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xConfigure32
-rwxr-xr-xconfig54
-rw-r--r--crypto/bn/Makefile.ssl13
-rw-r--r--crypto/md5/Makefile.ssl10
4 files changed, 77 insertions, 32 deletions
diff --git a/Configure b/Configure
index bcd82ad95d..80f0b7680a 100755
--- a/Configure
+++ b/Configure
@@ -104,22 +104,30 @@ my %table=(
"gcc", "gcc:-O3::(unknown)::BN_LLONG:::",
"cc", "cc:-O::(unknown):::::",
-# Solaris setups
+#### Solaris x86 setups
"solaris-x86-gcc","gcc:-O3 -fomit-frame-pointer -m486 -Wall -DL_ENDIAN::-D_REENTRANT:-lsocket -lnsl:BN_LLONG $x86_gcc_des $x86_gcc_opts:$x86_sol_asm",
-"solaris-sparc-gcc","gcc:-O3 -fomit-frame-pointer -mv8 -Wall -DB_ENDIAN::-D_REENTRANT:-lsocket -lnsl:BN_LLONG RC4_CHAR DES_UNROLL BF_PTR:asm/sparcv8.o::",
-"solaris-usparc-gcc","gcc:-O3 -fomit-frame-pointer -mcpu=ultrasparc -Wall -DB_ENDIAN -DULTRASPARC::-D_REENTRANT:-lsocket -lnsl:BN_LLONG RC4_CHAR DES_UNROLL BF_PTR:asm/sparcv8plus-gcc.o:::asm/md5-sparcv8plus.o:",
-"solaris-usparc-oldgcc","gcc:-O3 -fomit-frame-pointer -mv8 -Wall -DB_ENDIAN -DULTRASPARC::-D_REENTRANT:-lsocket -lnsl:BN_LLONG RC4_CHAR DES_UNROLL BF_PTR:asm/sparcv8plus-gcc.o:::asm/md5-sparcv8plus.o:",
-"debug-solaris-sparc-gcc","gcc:-DREF_CHECK -DCRYPTO_MDEBUG_ALL -O -g -mv8 -Wall -DB_ENDIAN::-D_REENTRANT:-lsocket -lnsl:BN_LLONG RC4_CHAR DES_UNROLL BF_PTR:::",
-"debug-solaris-usparc-gcc","gcc:-DREF_CHECK -DCRYPTO_MDEBUG_ALL -O -g -mcpu=ultrasparc -Wall -DB_ENDIAN::-D_REENTRANT:-lsocket -lnsl:BN_LLONG RC4_CHAR DES_UNROLL BF_PTR:asm/sparcv8plus-gcc.o::",
+#### SPARC Solaris with GNU C setups
+"solaris-sparcv7-gcc","gcc:-O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:-lsocket -lnsl:BN_LLONG RC4_CHAR DES_UNROLL BF_PTR:::",
+"solaris-sparcv8-gcc","gcc:-mv8 -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:-lsocket -lnsl:BN_LLONG RC4_CHAR DES_UNROLL BF_PTR:asm/sparcv8.o::",
+"solaris-sparcv9-gcc","gcc:-mcpu=ultrasparc -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W -DULTRASPARC::-D_REENTRANT:-lsocket -lnsl:BN_LLONG RC4_CHAR DES_UNROLL BF_PTR:asm/sparcv8plus.o:::asm/md5-sparcv8plus.o:",
+# gcc pre-2.8 doesn't understand -mcpu=ultrasparc, so fall down to -mv8
+# but keep the assembler modules.
+"solaris-sparcv9-gcc27","gcc:-mv8 -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W -DULTRASPARC::-D_REENTRANT:-lsocket -lnsl:BN_LLONG RC4_CHAR DES_UNROLL BF_PTR:asm/sparcv8plus-gcc27.o:::asm/md5-sparcv8plus-gcc27.o:",
+####
+"debug-solaris-sparcv8-gcc","gcc:-DREF_CHECK -DCRYPTO_MDEBUG_ALL -O -g -mv8 -Wall -DB_ENDIAN::-D_REENTRANT:-lsocket -lnsl:BN_LLONG RC4_CHAR DES_UNROLL BF_PTR:::",
+"debug-solaris-sparcv9-gcc","gcc:-DREF_CHECK -DCRYPTO_MDEBUG_ALL -O -g -mcpu=ultrasparc -Wall -DB_ENDIAN::-D_REENTRANT:-lsocket -lnsl:BN_LLONG RC4_CHAR DES_UNROLL BF_PTR:asm/sparcv8plus.o::",
+
+#### SPARC Solaris with Sun C setups
# DO NOT use /xO[34] on sparc with SC3.0. It is broken, and will not pass the tests
"solaris-sparc-sc3","cc:-fast -O -Xa -DB_ENDIAN::-D_REENTRANT:-lsocket -lnsl:BN_LLONG RC4_CHAR DES_PTR DES_UNROLL BF_PTR:::",
-# SC4 is ok, better than gcc even on bn as long as you tell it -xarch=v8
-# -fast slows things like DES down quite a lot
+# SC4.0 doesn't pass 'make test', upgrade to SC5.0 or SC4.2.
+# SC4.2 is ok, better than gcc even on bn as long as you tell it -xarch=v8
# SC5.0 note: Compiler common patch 107357-01 or later is required!
-"solaris-sparc-cc","cc:-xarch=v8 -xstrconst -xO5 -xdepend -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:-lsocket -lnsl:BN_LLONG RC4_CHAR DES_PTR DES_RISC1 DES_UNROLL BF_PTR:asm/sparcv8.o::",
-"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:",
+"solaris-sparcv7-cc","cc:-xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:-lsocket -lnsl:BN_LLONG RC4_CHAR DES_PTR DES_RISC1 DES_UNROLL BF_PTR:::",
+"solaris-sparcv8-cc","cc:-xarch=v8 -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:-lsocket -lnsl:BN_LLONG RC4_CHAR DES_PTR DES_RISC1 DES_UNROLL BF_PTR:asm/sparcv8.o::",
+"solaris-sparcv9-cc","cc:-xtarget=ultra -xarch=v8plus -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W -DULTRASPARC::-D_REENTRANT:-lsocket -lnsl:BN_LLONG RC4_CHAR DES_PTR DES_RISC1 DES_UNROLL BF_PTR:asm/sparcv8plus.o:::asm/md5-sparcv8plus.o:",
+"solaris64-sparcv9-cc","cc:-xtarget=ultra -xarch=v9 -xO5 -xstrconst -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::",
@@ -130,7 +138,7 @@ my %table=(
# -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!!!
+# We have to wait till 64-bit glibc for SPARC is operational!!!
#"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.
diff --git a/config b/config
index 582a8b038c..f7d4ca7e27 100755
--- a/config
+++ b/config
@@ -98,7 +98,7 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in
echo "mips2-sgi-irix"; exit 0
;;
- IRIX:6.*)
+ IRIX:6.*)
echo "mips3-sgi-irix"; exit 0
;;
@@ -301,17 +301,27 @@ 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
+ # peak single digit before and after first dot, e.g. 2.95.1 gives 29
GCCVER=`echo $GCCVER | sed 's/\([0-9]\)\.\([0-9]\).*/\1\2/'`
else
CC=cc
- if [ "$SYSTEM" = "SunOS" ]
- then
- case `cc -V 2>&1` in
- *4*) CC=cc;;
- *5*) CC=cc;;
- *) CC=sc3;;
- esac
+fi
+
+if [ "$SYSTEM" = "SunOS" ]; then
+ # assume output is "blah-blah C x.x"
+ CCVER=`(cc -V 2>&1) 2>/dev/null | \
+ egrep -e '^cc: .* C [0-9]\.[0-9]' | \
+ sed 's/.* C \([0-9]\)\.\([0-9]\).*/\1\2/'`
+ CCVER=${CCVER:-0}
+ if [ $CCVER -gt 40 ]; then
+ CC=cc # overrides gcc!!!
+ if [ $CCVER -eq 50 ]; then
+ echo "WARNING! Detected WorkShop C 5.0. Do make sure you have"
+ echo " patch #107357-01 or later applied."
+ sleep 5
+ fi
+ elif [ "$CC" = "cc" -a $CCVER -gt 0 ]; then
+ CC=sc3
fi
fi
@@ -357,9 +367,9 @@ case "$GUESSOS" in
OUT="irix-mips3-$CC"
;;
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"
+ #Before we can uncomment following lines we have to wait at least
+ #till 64-bit glibc for SPARC is operational:-(
+ #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
@@ -374,8 +384,18 @@ case "$GUESSOS" in
esac ;;
*-*-linux2) OUT="linux-elf" ;;
*-*-linux1) OUT="linux-aout" ;;
- sun4u-sun-solaris2) OUT="solaris-usparc-$CC" ;;
- sun4*-sun-solaris2) OUT="solaris-sparc-$CC" ;;
+ sun4u*-sun-solaris2)
+ ISA64=`(isalist) 2>/dev/null | grep sparcv9`
+ if [ "$ISA64" != "" -a "$CC" = "cc" -a $CCVER -ge 50 ]; then
+ echo "WARNING! If you wish to build 64-bit library, then you have to"
+ echo " invoke './Configure solaris64-sparcv9-cc' *manually*."
+ echo " Type Ctrl-C if you don't want to continue."
+ read waste < /dev/tty
+ fi
+ OUT="solaris-sparcv9-$CC" ;;
+ sun4m-sun-solaris2) OUT="solaris-sparcv8-$CC" ;;
+ sun4d-sun-solaris2) OUT="solaris-sparcv8-$CC" ;;
+ sun4*-sun-solaris2) OUT="solaris-sparcv7-$CC" ;;
*86*-sun-solaris2) OUT="solaris-x86-$CC" ;;
*-*-sunos4) OUT="sunos-$CC" ;;
alpha*-*-freebsd) OUT="FreeBSD-alpha" ;;
@@ -401,15 +421,17 @@ case "$GUESSOS" in
esac
# gcc < 2.8 does not support -mcpu=ultrasparc
-if [ "$OUT" = solaris-usparc-gcc -a $GCCVER -lt 28 ]
+if [ "$OUT" = solaris-sparcv9-gcc -a $GCCVER -lt 28 ]
then
echo "WARNING! Do consider upgrading to gcc-2.8 or later."
- OUT=solaris-usparc-oldgcc
+ sleep 5
+ OUT=solaris-sparcv9-gcc27
fi
if [ "$OUT" = "linux-sparcv9" -a $GCCVER -lt 28 ]
then
echo "WARNING! Falling down to 'linux-sparcv8'."
echo " Upgrade to gcc-2.8 or later."
+ sleep 5
OUT=linux-sparcv8
fi
diff --git a/crypto/bn/Makefile.ssl b/crypto/bn/Makefile.ssl
index d14f2d5375..fcabb62452 100644
--- a/crypto/bn/Makefile.ssl
+++ b/crypto/bn/Makefile.ssl
@@ -103,10 +103,15 @@ asm/sparcv8.o: asm/sparcv8.S
asm/sparcv8plus.o: asm/sparcv8plus.S
-asm/sparcv8plus-gcc.o: asm/sparcv8plus.S
- gcc -E asm/sparcv8plus.S | /usr/ccs/bin/as -xarch=v8plus - -o asm/sparcv8plus-gcc.o
- # GNU as cannot handle that file, so we circumvent PATH and
- # always use /usr/ccs/bin/as.
+# Old GNU assembler doesn't understand V9 instructions, so we
+# hire /usr/ccs/bin/as to do the job. Note that option is called
+# *-gcc27, but even gcc 2>=8 users may experience similar problem
+# if they didn't bother to upgrade GNU assembler. Such users should
+# not choose this option, but be adviced to *remove* GNU assembler
+# or upgrade it.
+asm/sparcv8plus-gcc27.o: asm/sparcv8plus.S
+ $(CC) $(ASFLAGS) -E asm/sparcv8plus.S | \
+ /usr/ccs/bin/as -xarch=v8plus - -o asm/sparcv8plus-gcc27.o
# MIPS 64 bit assember
asm/mips3.o: asm/mips3.s
diff --git a/crypto/md5/Makefile.ssl b/crypto/md5/Makefile.ssl
index 5d6dc8a376..29ae1b7458 100644
--- a/crypto/md5/Makefile.ssl
+++ b/crypto/md5/Makefile.ssl
@@ -71,6 +71,16 @@ asm/md5-sparcv8plus.o: asm/md5-sparcv9.S
$(CC) $(ASFLAGS) -DMD5_BLOCK_DATA_ORDER -c \
-o asm/md5-sparcv8plus.o asm/md5-sparcv9.S
+# Old GNU assembler doesn't understand V9 instructions, so we
+# hire /usr/ccs/bin/as to do the job. Note that option is called
+# *-gcc27, but even gcc 2>=8 users may experience similar problem
+# if they didn't bother to upgrade GNU assembler. Such users should
+# not choose this option, but be adviced to *remove* GNU assembler
+# or upgrade it.
+sm/md5-sparcv8plus-gcc27.o: asm/md5-sparcv9.S
+ $(CC) $(ASFLAGS) -DMD5_BLOCK_DATA_ORDER -E asm/md5-sparcv9.S | \
+ /usr/ccs/bin/as -xarch=v8plus - -o asm/md5-sparcv8plus-gcc27.o
+
asm/md5-sparcv9.o: asm/md5-sparcv9.S
$(CC) $(ASFLAGS) -DMD5_BLOCK_DATA_ORDER -c \
-o asm/md5-sparcv9.o asm/md5-sparcv9.S