提交 76ef6ac9 编写于 作者: A Andy Polyakov

Refine PowerPC platform support.

上级 a842df66
...@@ -315,7 +315,8 @@ my %table=( ...@@ -315,7 +315,8 @@ my %table=(
"linux-mipsel", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "linux-mipsel", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
"linux-mips", "gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "linux-mips", "gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
"linux-ppc", "gcc:-DB_ENDIAN -DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL::asm/linux_ppc32.o::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "linux-ppc", "gcc:-DB_ENDIAN -DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL::asm/linux_ppc32.o::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
"linux-ppc64", "gcc:-m64 -DB_ENDIAN -DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL::asm/linux_ppc64.o::::::::::dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", # -bpowerpc64-linux is transient option, -m64 should be the one to use...
"linux-ppc64", "gcc:-bpowerpc64-linux -DB_ENDIAN -DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL::asm/linux_ppc64.o::::::::::dlfcn:linux-shared:-fPIC:-bpowerpc64-linux:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
"linux-m68k", "gcc:-DB_ENDIAN -DTERMIO -O2 -fomit-frame-pointer -Wall::-D_REENTRANT:::BN_LLONG::", "linux-m68k", "gcc:-DB_ENDIAN -DTERMIO -O2 -fomit-frame-pointer -Wall::-D_REENTRANT:::BN_LLONG::",
"linux-s390", "gcc:-DB_ENDIAN -DTERMIO -DNO_ASM -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "linux-s390", "gcc:-DB_ENDIAN -DTERMIO -DNO_ASM -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
"linux-s390x", "gcc:-DB_ENDIAN -DTERMIO -DNO_ASM -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "linux-s390x", "gcc:-DB_ENDIAN -DTERMIO -DNO_ASM -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
...@@ -412,11 +413,11 @@ my %table=( ...@@ -412,11 +413,11 @@ my %table=(
"sco5-gcc", "gcc:-O3 -fomit-frame-pointer::(unknown)::-lsocket -lnsl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:svr3-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "sco5-gcc", "gcc:-O3 -fomit-frame-pointer::(unknown)::-lsocket -lnsl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:svr3-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
#### IBM's AIX. #### IBM's AIX.
"aix-gcc", "gcc:-O -DB_ENDIAN::(unknown):AIX::BN_LLONG RC4_CHAR::asm/aix_ppc32.o::::::::::dlfcn:", "aix3-cc", "cc:-O -DB_ENDIAN -qmaxmem=16384::(unknown):AIX::BN_LLONG RC4_CHAR:::",
"aix43-cc", "cc:-O -DB_ENDIAN -qmaxmem=16384::(unknown):::BN_LLONG RC4_CHAR::asm/aix_ppc32.o::::::::::dlfcn:aix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::", "aix-gcc", "gcc:-O -DB_ENDIAN::-D_THREAD_SAFE:AIX::BN_LLONG RC4_CHAR::asm/aix_ppc32.o::::::::::dlfcn:",
# Below targets assume AIX 5. Idea is to effectively disregard $OBJECT_MODE # Below targets assume AIX 5. Idea is to effectively disregard $OBJECT_MODE
# at build time. $OBJECT_MODE is respected at ./config stage! # at build time. $OBJECT_MODE is respected at ./config stage!
"aix-cc", "cc:-q32 -O -DB_ENDIAN -qmaxmem=16384::(unknown):AIX::BN_LLONG RC4_CHAR::asm/aix_ppc32.o::::::::::dlfcn:aix-shared::-q32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 32", "aix-cc", "cc:-q32 -O -DB_ENDIAN -qmaxmem=16384::-qthreaded:AIX::BN_LLONG RC4_CHAR::asm/aix_ppc32.o::::::::::dlfcn:aix-shared::-q32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 32",
"aix64-cc", "cc:-q64 -O -DB_ENDIAN -qmaxmem=16384::(unknown):AIX::SIXTY_FOUR_BIT_LONG RC4_CHAR::asm/aix_ppc64.o::::::::::dlfcn:aix-shared::-q64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 64", "aix64-cc", "cc:-q64 -O -DB_ENDIAN -qmaxmem=16384::(unknown):AIX::SIXTY_FOUR_BIT_LONG RC4_CHAR::asm/aix_ppc64.o::::::::::dlfcn:aix-shared::-q64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 64",
# #
......
...@@ -90,15 +90,6 @@ failures in other parts of the code. ...@@ -90,15 +90,6 @@ failures in other parts of the code.
Workaround: modify the target to +O2 when building with no-asm. Workaround: modify the target to +O2 when building with no-asm.
* Poor support for AIX shared builds.
do_aix-shared rule is not flexible enough to parameterize through a
config-line. './Configure aix43-cc shared' is working, but not
'./Configure aix64-gcc shared'. In latter case make fails to create shared
libraries. It's possible to build 64-bit shared libraries by running
'env OBJECT_MODE=64 make', but we need more elegant solution. Preferably one
supporting even gcc shared builds. See RT#463 for background information.
* Problems building shared libraries on SCO OpenServer Release 5.0.6 * Problems building shared libraries on SCO OpenServer Release 5.0.6
with gcc 2.95.3 with gcc 2.95.3
......
...@@ -1165,7 +1165,7 @@ $arflags = ...@@ -1165,7 +1165,7 @@ $arflags =
$cc = cc $cc = cc
$cflags = -q32 -O -DB_ENDIAN -qmaxmem=16384 $cflags = -q32 -O -DB_ENDIAN -qmaxmem=16384
$unistd = $unistd =
$thread_cflag = (unknown) $thread_cflag = -qthreaded
$sys_id = AIX $sys_id = AIX
$lflags = $lflags =
$bn_ops = BN_LLONG RC4_CHAR $bn_ops = BN_LLONG RC4_CHAR
...@@ -1192,7 +1192,7 @@ $arflags = -X 32 ...@@ -1192,7 +1192,7 @@ $arflags = -X 32
$cc = gcc $cc = gcc
$cflags = -O -DB_ENDIAN $cflags = -O -DB_ENDIAN
$unistd = $unistd =
$thread_cflag = (unknown) $thread_cflag = -D_THREAD_SAFE
$sys_id = AIX $sys_id = AIX
$lflags = $lflags =
$bn_ops = BN_LLONG RC4_CHAR $bn_ops = BN_LLONG RC4_CHAR
...@@ -1215,16 +1215,16 @@ $shared_extension = ...@@ -1215,16 +1215,16 @@ $shared_extension =
$ranlib = $ranlib =
$arflags = $arflags =
*** aix43-cc *** aix3-cc
$cc = cc $cc = cc
$cflags = -O -DB_ENDIAN -qmaxmem=16384 $cflags = -O -DB_ENDIAN -qmaxmem=16384
$unistd = $unistd =
$thread_cflag = (unknown) $thread_cflag = (unknown)
$sys_id = $sys_id = AIX
$lflags = $lflags =
$bn_ops = BN_LLONG RC4_CHAR $bn_ops = BN_LLONG RC4_CHAR
$cpuid_obj = $cpuid_obj =
$bn_obj = asm/aix_ppc32.o $bn_obj =
$des_obj = $des_obj =
$aes_obj = $aes_obj =
$bf_obj = $bf_obj =
...@@ -1234,11 +1234,11 @@ $cast_obj = ...@@ -1234,11 +1234,11 @@ $cast_obj =
$rc4_obj = $rc4_obj =
$rmd160_obj = $rmd160_obj =
$rc5_obj = $rc5_obj =
$dso_scheme = dlfcn $dso_scheme =
$shared_target= aix-shared $shared_target=
$shared_cflag = $shared_cflag =
$shared_ldflag = $shared_ldflag =
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $shared_extension =
$ranlib = $ranlib =
$arflags = $arflags =
...@@ -3377,7 +3377,7 @@ $arflags = ...@@ -3377,7 +3377,7 @@ $arflags =
*** linux-ppc64 *** linux-ppc64
$cc = gcc $cc = gcc
$cflags = -m64 -DB_ENDIAN -DTERMIO -O3 -Wall $cflags = -bpowerpc64-linux -DB_ENDIAN -DTERMIO -O3 -Wall
$unistd = $unistd =
$thread_cflag = -D_REENTRANT $thread_cflag = -D_REENTRANT
$sys_id = $sys_id =
...@@ -3397,7 +3397,7 @@ $rc5_obj = ...@@ -3397,7 +3397,7 @@ $rc5_obj =
$dso_scheme = dlfcn $dso_scheme = dlfcn
$shared_target= linux-shared $shared_target= linux-shared
$shared_cflag = -fPIC $shared_cflag = -fPIC
$shared_ldflag = -m64 $shared_ldflag = -bpowerpc64-linux
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
$ranlib = $ranlib =
$arflags = $arflags =
......
...@@ -111,12 +111,16 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in ...@@ -111,12 +111,16 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in
echo "m68k-apple-aux3"; exit 0 echo "m68k-apple-aux3"; exit 0
;; ;;
AIX:[3-9]:4:*)
echo "${MACHINE}-ibm-aix"; exit 0
;;
AIX:*:[5-9]:*) AIX:*:[5-9]:*)
echo "${MACHINE}-ibm-aix5"; exit 0 echo "${MACHINE}-ibm-aix"; exit 0
;; ;;
AIX:*) AIX:*)
echo "${MACHINE}-ibm-aix"; exit 0 echo "${MACHINE}-ibm-aix3"; exit 0
;; ;;
dgux:*) dgux:*)
...@@ -542,7 +546,15 @@ EOF ...@@ -542,7 +546,15 @@ EOF
${CC} -o dummy dummy.c && OUT=`./dummy ${MACHINE}` ${CC} -o dummy dummy.c && OUT=`./dummy ${MACHINE}`
rm dummy dummy.c rm dummy dummy.c
;; ;;
ppc64-*-linux2) OUT="linux-ppc64" ;; ppc64-*-linux2)
echo "WARNING! If you wish to build 64-bit library, then you have to"
echo " invoke './Configure linux-ppc64' *manually*."
if [ "$TEST" = "false" ]; then
echo " You have about 5 seconds to press Ctrl-C to abort."
(stty -icanon min 0 time 50; read waste) < /dev/tty
fi
OUT="linux-ppc"
;;
ppc-*-linux2) OUT="linux-ppc" ;; ppc-*-linux2) OUT="linux-ppc" ;;
m68k-*-linux*) OUT="linux-m68k" ;; m68k-*-linux*) OUT="linux-m68k" ;;
ia64-*-linux?) OUT="linux-ia64" ;; ia64-*-linux?) OUT="linux-ia64" ;;
...@@ -725,37 +737,28 @@ EOF ...@@ -725,37 +737,28 @@ EOF
fi fi
options="$options -D_REENTRANT" ;; options="$options -D_REENTRANT" ;;
*-hpux) OUT="hpux-parisc-$CC" ;; *-hpux) OUT="hpux-parisc-$CC" ;;
*-aix5) *-aix)
KERNEL_BITS=`(getconf KERNEL_BITMODE) 2>/dev/null` KERNEL_BITS=`(getconf KERNEL_BITMODE) 2>/dev/null`
KERNEL_BITS=${KERNEL_BITS:-32} KERNEL_BITS=${KERNEL_BITS:-32}
if [ $KERNEL_BITS -eq 64 ]; then OBJECT_MODE=${OBJECT_MODE:-32}
# we default to 64-bit because PKI performance is >3x better... if [ "$CC" = "gcc" ]; then
OBJECT_MODE=${OBJECT_MODE:-$KERNEL_BITS} OUT="aix-gcc"
elif [ $OBJECT_MODE -eq 64 ]; then
echo 'Your $OBJECT_MODE was found to be set to 64'
OUT="aix64-cc"
else else
OBJECT_MODE=32
fi
OUT="aix-cc" OUT="aix-cc"
if [ "$CC" = "cc" -a $OBJECT_MODE -eq 64 ]; then if [ $KERNEL_BITS -eq 64 ]; then
OUT="aix64-cc" echo "WARNING! If you wish to build 64-bit kit, then you have to"
echo "WARNING! If you wish to build 32-bit kit, then you have to" echo " invoke './Configure aix64-cc' *manually*."
echo " invoke './Configure aix-cc' *manually*."
if [ "$TEST" = "false" ]; then if [ "$TEST" = "false" ]; then
echo " You have ~5 seconds to press Ctrl-C to abort." echo " You have ~5 seconds to press Ctrl-C to abort."
(stty -icanon min 0 time 50; read waste) < /dev/tty (/bin/stty -icanon min 0 time 50; read waste) < /dev/tty
fi fi
elif [ "$CC" = "gcc" ]; then
OUT="aix-gcc"
fi fi
;;
*-aix)
if [ "$CC" = "gcc" ]; then
OUT="aix-gcc"
else
OUT="aix43-cc"
fi fi
;; ;;
# these are all covered by the catchall below # these are all covered by the catchall below
# *-aix) OUT="aix-$CC" ;;
# *-dgux) OUT="dgux" ;; # *-dgux) OUT="dgux" ;;
mips-sony-newsos4) OUT="newsos4-gcc" ;; mips-sony-newsos4) OUT="newsos4-gcc" ;;
*-*-cygwin_pre1.3) OUT="Cygwin-pre1.3" ;; *-*-cygwin_pre1.3) OUT="Cygwin-pre1.3" ;;
......
...@@ -103,8 +103,8 @@ asm/pa-risc2.o: asm/pa-risc2.s ...@@ -103,8 +103,8 @@ asm/pa-risc2.o: asm/pa-risc2.s
# ppc - AIX, Linux, MacOS X... # ppc - AIX, Linux, MacOS X...
asm/linux_ppc32.s: asm/ppc.pl; $(PERL) $< $@ asm/linux_ppc32.s: asm/ppc.pl; $(PERL) $< $@
asm/linux_ppc64.s: asm/ppc.pl; $(PERL) $< $@ asm/linux_ppc64.s: asm/ppc.pl; $(PERL) $< $@
asm/aix_ppc32.s: asm/ppc.pl; $(PERL) $< $@ asm/aix_ppc32.s: asm/ppc.pl; $(PERL) asm/ppc.pl $@
asm/aix_ppc64.s: asm/ppc.pl; $(PERL) $< $@ asm/aix_ppc64.s: asm/ppc.pl; $(PERL) asm/ppc.pl $@
asm/osx_ppc32.s: asm/ppc.pl; $(PERL) $< $@ asm/osx_ppc32.s: asm/ppc.pl; $(PERL) $< $@
files: files:
......
...@@ -206,7 +206,7 @@ ...@@ -206,7 +206,7 @@
: "cc"); \ : "cc"); \
ret; \ ret; \
}) })
# elif defined(__powerpc) || defined(__ppc) # elif defined(__powerpc) || defined(__ppc__) || defined(__powerpc64__)
# define ROTATE(a,n) ({ register unsigned int ret; \ # define ROTATE(a,n) ({ register unsigned int ret; \
asm ( \ asm ( \
"rlwinm %0,%1,%2,0,31" \ "rlwinm %0,%1,%2,0,31" \
......
...@@ -52,6 +52,7 @@ $symlink_exists=eval {symlink("",""); 1}; ...@@ -52,6 +52,7 @@ $symlink_exists=eval {symlink("",""); 1};
foreach $file (@files) { foreach $file (@files) {
my $err = ""; my $err = "";
if ($symlink_exists) { if ($symlink_exists) {
unlink "$from/$file";
symlink("$to/$file", "$from/$file") or $err = " [$!]"; symlink("$to/$file", "$from/$file") or $err = " [$!]";
} else { } else {
unlink "$from/$file"; unlink "$from/$file";
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册