summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2005-04-04 17:10:53 +0000
committerAndy Polyakov <appro@openssl.org>2005-04-04 17:10:53 +0000
commit0abfd606049999071891ef2bab460c99d254edc6 (patch)
treeb5a1d96808941760cfb4ae9e16ece21240ef740c
parente5dbccc182f3ada92014f2569ed9624886040ce0 (diff)
downloadopenssl-new-0abfd606049999071891ef2bab460c99d254edc6.tar.gz
Extend Solaris x86 support to amd64.
-rwxr-xr-xConfigure11
-rw-r--r--Makefile.shared6
-rw-r--r--TABLE58
-rwxr-xr-xconfig11
-rw-r--r--crypto/bn/Makefile1
-rw-r--r--crypto/rc4/Makefile2
6 files changed, 81 insertions, 8 deletions
diff --git a/Configure b/Configure
index 7c91ef5e0b..e7159cd8c5 100755
--- a/Configure
+++ b/Configure
@@ -185,8 +185,19 @@ my %table=(
# 7_x86) /usr/ccs/bin/as fails to assemble with "Illegal mnemonic"
# error message.
"solaris-x86-gcc","gcc:-O3 -fomit-frame-pointer -m486 -Wall -DL_ENDIAN -DOPENSSL_NO_INLINE_ASM::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+# -shared -static-libgcc might appear controversial, but modules taken
+# from static libgcc do not have relocations and linking them into our
+# shared objects doesn't have any negative side-effects. On the contrary,
+# doing so makes it possible to use gcc shared build with Sun C. Given
+# that gcc generates faster code [thanks to inline assembler], I would
+# actually recommend to consider using gcc shared build even with vendor
+# compiler:-)
+# <appro@fy.chalmers.se>
+"solaris64-x86_64-gcc","gcc:-m64 -O3 -Wall -DL_ENDIAN -DMD32_REG_T=int::-D_REENTRANT::-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:solaris-shared:-fPIC:-m64 -shared -static-libgcc:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+
#### Solaris x86 with Sun C setups
"solaris-x86-cc","cc:-fast -O -Xa::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_UNROLL BF_PTR:${no_asm}:dlfcn:solaris-shared:-KPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"solaris64-x86_64-cc","cc:-fast -xarch=amd64 -xstrconst -Xa -DL_ENDIAN::-D_REENTRANT::-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL:${no_asm}:dlfcn:solaris-shared:-KPIC:-xarch=amd64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
#### SPARC Solaris with GNU C setups
"solaris-sparcv7-gcc","gcc:-O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}:dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
diff --git a/Makefile.shared b/Makefile.shared
index d4df5e2b66..6c6a96d58f 100644
--- a/Makefile.shared
+++ b/Makefile.shared
@@ -141,7 +141,7 @@ DO_GNU_SO=$(CALC_VERSIONS); \
LIBDEPS="$(LIBDEPS)"; \
ALLSYMSFLAGS='-Wl,--whole-archive'; \
NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
- SHAREDFLAGS="$(CFLAGS) -shared -Wl,-Bsymbolic -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX -Wl,-rpath,$(LIBRPATH)"; \
+ SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-Bsymbolic -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX -Wl,-rpath,$(LIBRPATH)"; \
SHAREDCMD='$(CC)'
DO_GNU_APP=LDCMD=$(CC);\
LDFLAGS="$(CFLAGS) -Wl,-rpath,$(LIBRPATH)"; \
@@ -457,7 +457,7 @@ link_o.solaris:
LIBDEPS="$(LIBDEPS)"; \
ALLSYMSFLAGS="$${MINUSZ}allextract"; \
NOALLSYMSFLAGS="$${MINUSZ}defaultextract"; \
- SHAREDFLAGS="$(CFLAGS) -G -dy -z text -h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX -R $(LIBRPATH) -Wl,-Bsymbolic"; \
+ SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -G -dy -z text -h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX -R $(LIBRPATH) -Wl,-Bsymbolic"; \
SHAREDCMD='$(CC)'; \
fi; \
$(LINK_SO_O)
@@ -473,7 +473,7 @@ link_a.solaris:
LIBDEPS="$(LIBDEPS)"; \
ALLSYMSFLAGS="$${MINUSZ}allextract"; \
NOALLSYMSFLAGS="$${MINUSZ}defaultextract"; \
- SHAREDFLAGS="$(CFLAGS) -G -dy -z text -h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX -R $(LIBRPATH) -Wl,-Bsymbolic"; \
+ SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -G -dy -z text -h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX -R $(LIBRPATH) -Wl,-Bsymbolic"; \
SHAREDCMD='$(CC)'; \
fi; \
$(LINK_SO_A)
diff --git a/TABLE b/TABLE
index 76ca810e46..bf8e148fb1 100644
--- a/TABLE
+++ b/TABLE
@@ -314,7 +314,7 @@ $md5_obj = mx86-cof.o
$sha1_obj = sx86-cof.o s512sse2-cof.o
$cast_obj = cx86-cof.o
$rc4_obj = rx86-cof.o
-$rmd160_obj = /rm86-cof.o
+$rmd160_obj = rm86-cof.o
$rc5_obj = r586-cof.o
$dso_scheme = dlfcn
$shared_target= cygwin-shared
@@ -3095,7 +3095,7 @@ $md5_obj = mx86-cof.o
$sha1_obj = sx86-cof.o s512sse2-cof.o
$cast_obj = cx86-cof.o
$rc4_obj = rx86-cof.o
-$rmd160_obj = /rm86-cof.o
+$rmd160_obj = rm86-cof.o
$rc5_obj = r586-cof.o
$dso_scheme = win32
$shared_target= cygwin-shared
@@ -3807,6 +3807,60 @@ $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
$ranlib =
$arflags =
+*** solaris64-x86_64-cc
+$cc = cc
+$cflags = -fast -xarch=amd64 -xstrconst -Xa -DL_ENDIAN
+$unistd =
+$thread_cflag = -D_REENTRANT
+$sys_id =
+$lflags = -lsocket -lnsl -ldl
+$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL
+$cpuid_obj =
+$bn_obj =
+$des_obj =
+$aes_obj =
+$bf_obj =
+$md5_obj =
+$sha1_obj =
+$cast_obj =
+$rc4_obj =
+$rmd160_obj =
+$rc5_obj =
+$dso_scheme = dlfcn
+$shared_target= solaris-shared
+$shared_cflag = -KPIC
+$shared_ldflag = -xarch=amd64
+$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
+$ranlib =
+$arflags =
+
+*** solaris64-x86_64-gcc
+$cc = gcc
+$cflags = -m64 -O3 -Wall -DL_ENDIAN -DMD32_REG_T=int
+$unistd =
+$thread_cflag = -D_REENTRANT
+$sys_id =
+$lflags = -lsocket -lnsl -ldl
+$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL
+$cpuid_obj = amd64cpuid.o
+$bn_obj = x86_64-gcc.o
+$des_obj =
+$aes_obj =
+$bf_obj =
+$md5_obj =
+$sha1_obj =
+$cast_obj =
+$rc4_obj = rc4-amd64.o
+$rmd160_obj =
+$rc5_obj =
+$dso_scheme = dlfcn
+$shared_target= solaris-shared
+$shared_cflag = -fPIC
+$shared_ldflag = -m64 -shared -static-libgcc
+$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
+$ranlib =
+$arflags =
+
*** sunos-gcc
$cc = gcc
$cflags = -O3 -mv8 -Dssize_t=int
diff --git a/config b/config
index 711af61541..71ada7bbe1 100755
--- a/config
+++ b/config
@@ -442,7 +442,7 @@ if [ "$SYSTEM" = "SunOS" ]; then
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
+ if [ $MACHINE != i86pc -a $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"
@@ -638,7 +638,14 @@ case "$GUESSOS" in
sun4m-*-solaris2) OUT="solaris-sparcv8-$CC" ;;
sun4d-*-solaris2) OUT="solaris-sparcv8-$CC" ;;
sun4*-*-solaris2) OUT="solaris-sparcv7-$CC" ;;
- *86*-*-solaris2) OUT="solaris-x86-$CC" ;;
+ *86*-*-solaris2)
+ ISA64=`(isalist) 2>/dev/null | grep amd64`
+ if [ "$ISA64" != "" ]; then
+ OUT="solaris64-x86_64-$CC"
+ else
+ OUT="solaris-x86-$CC"
+ fi
+ ;;
*-*-sunos4) OUT="sunos-$CC" ;;
*86*-*-bsdi4) OUT="bsdi-elf-gcc" ;;
diff --git a/crypto/bn/Makefile b/crypto/bn/Makefile
index 75437cdbcc..0a3851853d 100644
--- a/crypto/bn/Makefile
+++ b/crypto/bn/Makefile
@@ -89,6 +89,7 @@ sparcv8plus.o: asm/sparcv8plus.S
mips3.o: asm/mips3.s
x86_64-gcc.o: asm/x86_64-gcc.c
+ $(CC) $(CFLAGS) -c -o $@ asm/x86_64-gcc.c
bn-ia64.s: asm/ia64.S
$(CC) $(CFLAGS) -E asm/ia64.S > $@
diff --git a/crypto/rc4/Makefile b/crypto/rc4/Makefile
index 91fb3ac803..a392e3e997 100644
--- a/crypto/rc4/Makefile
+++ b/crypto/rc4/Makefile
@@ -58,7 +58,7 @@ rx86-cof.s: asm/rc4-586.pl ../perlasm/x86asm.pl
rx86-out.s: asm/rc4-586.pl ../perlasm/x86asm.pl
(cd asm; $(PERL) rc4-586.pl a.out $(CFLAGS) > ../$@)
-rc4-amd64.s: asm/rc4-amd64.pl; $(PERL) $< $@
+rc4-amd64.s: asm/rc4-amd64.pl; $(PERL) asm/rc4-amd64.pl $@
rc4-ia64.s: asm/rc4-ia64.S
$(CC) $(CFLAGS) -E asm/rc4-ia64.S > $@