SPARC Solaris config updates.
./config sences whole range of SPARC instruction sets. Do note that it favors Sun C now if both gcc and cc 4.2 or later are present!
This commit is contained in:
parent
da8fa72f99
commit
1656ef2997
4 changed files with 77 additions and 32 deletions
32
Configure
32
Configure
|
@ -104,22 +104,30 @@ my %table=(
|
||||||
"gcc", "gcc:-O3::(unknown)::BN_LLONG:::",
|
"gcc", "gcc:-O3::(unknown)::BN_LLONG:::",
|
||||||
"cc", "cc:-O::(unknown):::::",
|
"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-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
|
# 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:::",
|
"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
|
# SC4.0 doesn't pass 'make test', upgrade to SC5.0 or SC4.2.
|
||||||
# -fast slows things like DES down quite a lot
|
# 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!
|
# 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-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-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:",
|
"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::",
|
||||||
"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-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
|
#### SPARC Linux setups
|
||||||
"linux-sparcv7","gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::BN_LLONG RC4_CHAR DES_UNROLL BF_PTR::",
|
"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.
|
# -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:",
|
"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!!!
|
# !!!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:",
|
#"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 configs, assuming sparc for the gcc one.
|
||||||
|
|
50
config
50
config
|
@ -301,17 +301,27 @@ if [ "$GCCVER" != "" ]; then
|
||||||
CC=gcc
|
CC=gcc
|
||||||
# then strip off whatever prefix Cygnus prepends the number with...
|
# then strip off whatever prefix Cygnus prepends the number with...
|
||||||
GCCVER=`echo $GCCVER | sed 's/^[a-z]*\-//'`
|
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/'`
|
GCCVER=`echo $GCCVER | sed 's/\([0-9]\)\.\([0-9]\).*/\1\2/'`
|
||||||
else
|
else
|
||||||
CC=cc
|
CC=cc
|
||||||
if [ "$SYSTEM" = "SunOS" ]
|
fi
|
||||||
then
|
|
||||||
case `cc -V 2>&1` in
|
if [ "$SYSTEM" = "SunOS" ]; then
|
||||||
*4*) CC=cc;;
|
# assume output is "blah-blah C x.x"
|
||||||
*5*) CC=cc;;
|
CCVER=`(cc -V 2>&1) 2>/dev/null | \
|
||||||
*) CC=sc3;;
|
egrep -e '^cc: .* C [0-9]\.[0-9]' | \
|
||||||
esac
|
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
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -357,8 +367,8 @@ case "$GUESSOS" in
|
||||||
OUT="irix-mips3-$CC"
|
OUT="irix-mips3-$CC"
|
||||||
;;
|
;;
|
||||||
sparc64-*-linux2)
|
sparc64-*-linux2)
|
||||||
#Before we uncomment following line we have to wait at least till
|
#Before we can uncomment following lines we have to wait at least
|
||||||
#64-bit glibc for SPARC is available:-(
|
#till 64-bit glibc for SPARC is operational:-(
|
||||||
#echo "WARNING! If you wish to build 64-bit library, then you have to"
|
#echo "WARNING! If you wish to build 64-bit library, then you have to"
|
||||||
#echo " invoke './Configure linux64-sparcv9' *manually*."
|
#echo " invoke './Configure linux64-sparcv9' *manually*."
|
||||||
#echo " Type Ctrl-C if you don't want to continue."
|
#echo " Type Ctrl-C if you don't want to continue."
|
||||||
|
@ -374,8 +384,18 @@ case "$GUESSOS" in
|
||||||
esac ;;
|
esac ;;
|
||||||
*-*-linux2) OUT="linux-elf" ;;
|
*-*-linux2) OUT="linux-elf" ;;
|
||||||
*-*-linux1) OUT="linux-aout" ;;
|
*-*-linux1) OUT="linux-aout" ;;
|
||||||
sun4u-sun-solaris2) OUT="solaris-usparc-$CC" ;;
|
sun4u*-sun-solaris2)
|
||||||
sun4*-sun-solaris2) OUT="solaris-sparc-$CC" ;;
|
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" ;;
|
*86*-sun-solaris2) OUT="solaris-x86-$CC" ;;
|
||||||
*-*-sunos4) OUT="sunos-$CC" ;;
|
*-*-sunos4) OUT="sunos-$CC" ;;
|
||||||
alpha*-*-freebsd) OUT="FreeBSD-alpha" ;;
|
alpha*-*-freebsd) OUT="FreeBSD-alpha" ;;
|
||||||
|
@ -401,15 +421,17 @@ case "$GUESSOS" in
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# gcc < 2.8 does not support -mcpu=ultrasparc
|
# 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
|
then
|
||||||
echo "WARNING! Do consider upgrading to gcc-2.8 or later."
|
echo "WARNING! Do consider upgrading to gcc-2.8 or later."
|
||||||
OUT=solaris-usparc-oldgcc
|
sleep 5
|
||||||
|
OUT=solaris-sparcv9-gcc27
|
||||||
fi
|
fi
|
||||||
if [ "$OUT" = "linux-sparcv9" -a $GCCVER -lt 28 ]
|
if [ "$OUT" = "linux-sparcv9" -a $GCCVER -lt 28 ]
|
||||||
then
|
then
|
||||||
echo "WARNING! Falling down to 'linux-sparcv8'."
|
echo "WARNING! Falling down to 'linux-sparcv8'."
|
||||||
echo " Upgrade to gcc-2.8 or later."
|
echo " Upgrade to gcc-2.8 or later."
|
||||||
|
sleep 5
|
||||||
OUT=linux-sparcv8
|
OUT=linux-sparcv8
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -103,10 +103,15 @@ asm/sparcv8.o: asm/sparcv8.S
|
||||||
|
|
||||||
asm/sparcv8plus.o: asm/sparcv8plus.S
|
asm/sparcv8plus.o: asm/sparcv8plus.S
|
||||||
|
|
||||||
asm/sparcv8plus-gcc.o: asm/sparcv8plus.S
|
# Old GNU assembler doesn't understand V9 instructions, so we
|
||||||
gcc -E asm/sparcv8plus.S | /usr/ccs/bin/as -xarch=v8plus - -o asm/sparcv8plus-gcc.o
|
# hire /usr/ccs/bin/as to do the job. Note that option is called
|
||||||
# GNU as cannot handle that file, so we circumvent PATH and
|
# *-gcc27, but even gcc 2>=8 users may experience similar problem
|
||||||
# always use /usr/ccs/bin/as.
|
# 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
|
# MIPS 64 bit assember
|
||||||
asm/mips3.o: asm/mips3.s
|
asm/mips3.o: asm/mips3.s
|
||||||
|
|
|
@ -71,6 +71,16 @@ asm/md5-sparcv8plus.o: asm/md5-sparcv9.S
|
||||||
$(CC) $(ASFLAGS) -DMD5_BLOCK_DATA_ORDER -c \
|
$(CC) $(ASFLAGS) -DMD5_BLOCK_DATA_ORDER -c \
|
||||||
-o asm/md5-sparcv8plus.o asm/md5-sparcv9.S
|
-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
|
asm/md5-sparcv9.o: asm/md5-sparcv9.S
|
||||||
$(CC) $(ASFLAGS) -DMD5_BLOCK_DATA_ORDER -c \
|
$(CC) $(ASFLAGS) -DMD5_BLOCK_DATA_ORDER -c \
|
||||||
-o asm/md5-sparcv9.o asm/md5-sparcv9.S
|
-o asm/md5-sparcv9.o asm/md5-sparcv9.S
|
||||||
|
|
Loading…
Reference in a new issue