Commit 6d03b73e authored by Andy Polyakov's avatar Andy Polyakov
Browse files

Enhanced support for IA-64 Linux and HP-UX (as well as better support for

HP-UX in common in ./config). Note that for the moment of this writing
none of 64-bit platforms pass bntest. I'm committing this anyway as it's
too frustrating to patch snapshots over and over while 0.9.6 is known to
work.
parent 622d3d35
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -12,6 +12,9 @@
         *) applies to 0.9.6a/0.9.6b/0.9.6c and 0.9.7
         *) applies to 0.9.6a/0.9.6b/0.9.6c and 0.9.7
         +) applies to 0.9.7 only
         +) applies to 0.9.7 only


  +) Enhanced support for IA-64 Unix platforms (well, Linux and HP-UX).
     [Andy Polyakov]

  *) Modified SSL library such that the verify_callback that has been set
  *) Modified SSL library such that the verify_callback that has been set
     specificly for an SSL object with SSL_set_verify() is actually being
     specificly for an SSL object with SSL_set_verify() is actually being
     used. Before the change, a verify_callback set with this function was
     used. Before the change, a verify_callback set with this function was
+11 −2
Original line number Original line Diff line number Diff line
@@ -233,7 +233,7 @@ my %table=(
# - Keep in mind that the HP compiler by default generates code
# - Keep in mind that the HP compiler by default generates code
#   suitable for execution on the host you're currently compiling at.
#   suitable for execution on the host you're currently compiling at.
#   If the toolkit is ment to be used on various PA-RISC processors
#   If the toolkit is ment to be used on various PA-RISC processors
#   consider './config +Dportable'.
#   consider './config +DAportable'.
# - +DD64 is chosen in favour of +DA2.0W because it's ment to be
# - +DD64 is chosen in favour of +DA2.0W because it's ment to be
#   compatible with *future* releases.
#   compatible with *future* releases.
# - If you run ./Configure hpux-parisc-[g]cc manually don't forget to
# - If you run ./Configure hpux-parisc-[g]cc manually don't forget to
@@ -251,6 +251,13 @@ my %table=(
"hpux-parisc-gcc","gcc:-O3 -DB_ENDIAN -DBN_DIV2W::::-Wl,+s -ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:-fPIC:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
"hpux-parisc-gcc","gcc:-O3 -DB_ENDIAN -DBN_DIV2W::::-Wl,+s -ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:-fPIC:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
"hpux64-parisc-cc","cc:-Ae +DD64 +O3 +ESlit -z -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dlfcn:hpux64-shared:+Z:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
"hpux64-parisc-cc","cc:-Ae +DD64 +O3 +ESlit -z -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dlfcn:hpux64-shared:+Z:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",


# IA-64 targets
# I have no idea if this one actually works, feedback needed. <appro>
"hpux-ia64-cc","cc:-Ae +DD32 +O3 +ESlit -z -DB_ENDIAN::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/ia64-cpp.o:::::::::dlfcn:hpux-shared:+Z:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
# Frank Geurts <frank.geurts@nl.abnamro.com> has patiently assisted with
# with debugging of the following config.
"hpux64-ia64-cc","cc:-Ae +DD64 +O3 +ESlit -z -DB_ENDIAN::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/ia64-cpp.o:::::::::dlfcn:hpux64-shared:+Z:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",

# More attempts at unified 10.X and 11.X targets for HP C compiler.
# More attempts at unified 10.X and 11.X targets for HP C compiler.
#
#
# Chris Ruemmler <ruemmler@cup.hp.com>
# Chris Ruemmler <ruemmler@cup.hp.com>
@@ -258,6 +265,8 @@ my %table=(
"hpux-parisc-cc","cc:+O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY::-D_REENTRANT::-Wl,+s -ldld:MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dl:hpux-shared:+Z:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
"hpux-parisc-cc","cc:+O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY::-D_REENTRANT::-Wl,+s -ldld:MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dl:hpux-shared:+Z:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
"hpux-parisc2-cc","cc:+DA2.0 +DS2.0 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-Wl,+s -ldld:SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/pa-risc2.o:::::::::dl:hpux-shared:+Z:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
"hpux-parisc2-cc","cc:+DA2.0 +DS2.0 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-Wl,+s -ldld:SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/pa-risc2.o:::::::::dl:hpux-shared:+Z:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
"hpux64-parisc2-cc","cc:+DD64 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/pa-risc2W.o:::::::::dlfcn:hpux64-shared:+Z:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
"hpux64-parisc2-cc","cc:+DD64 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/pa-risc2W.o:::::::::dlfcn:hpux64-shared:+Z:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
# Isn't the line below meaningless? HP-UX cc optimizes for host by default.
# hpux-parisc1_0-cc with +DAportable flag would make more sense. <appro>
"hpux-parisc1_1-cc","cc:+DA1.1 +DS1.1 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-Wl,+s -ldld:MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dl:hpux-shared:+Z:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
"hpux-parisc1_1-cc","cc:+DA1.1 +DS1.1 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-Wl,+s -ldld:MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dl:hpux-shared:+Z:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",


# HPUX 9.X config.
# HPUX 9.X config.
@@ -332,7 +341,7 @@ my %table=(
"linux-ppc",    "gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL::::::::::dlfcn:linux-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
"linux-ppc",    "gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL::::::::::dlfcn:linux-shared:-fPIC:.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 -O3 -fomit-frame-pointer -Wall::-D_REENTRANT:::BN_LLONG::",
"linux-s390",	"gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT:::BN_LLONG::",
"linux-ia64",   "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::(unknown):::SIXTY_FOUR_BIT_LONG::",
"linux-ia64",   "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR:asm/ia64.o:::::::::dlfcn:linux-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
"NetBSD-sparc",	"gcc:-DTERMIOS -O3 -fomit-frame-pointer -mv8 -Wall -DB_ENDIAN::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
"NetBSD-sparc",	"gcc:-DTERMIOS -O3 -fomit-frame-pointer -mv8 -Wall -DB_ENDIAN::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
"NetBSD-m68",	"gcc:-DTERMIOS -O3 -fomit-frame-pointer -Wall -DB_ENDIAN::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
"NetBSD-m68",	"gcc:-DTERMIOS -O3 -fomit-frame-pointer -Wall -DB_ENDIAN::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
"NetBSD-x86",	"gcc:-DTERMIOS -O3 -fomit-frame-pointer -m486 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::dlfcn:bsd-gcc-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
"NetBSD-x86",	"gcc:-DTERMIOS -O3 -fomit-frame-pointer -m486 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::dlfcn:bsd-gcc-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+54 −8
Original line number Original line Diff line number Diff line
@@ -1517,6 +1517,29 @@ $shared_cflag = -fPIC
$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
$ranlib       = 
$ranlib       = 


*** hpux-ia64-cc
$cc           = cc
$cflags       = -Ae +DD32 +O3 +ESlit -z -DB_ENDIAN
$unistd       = 
$thread_cflag = -D_REENTRANT
$sys_id       = 
$lflags       = -ldl
$bn_ops       = SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT
$bn_obj       = asm/ia64-cpp.o
$des_obj      = 
$bf_obj       = 
$md5_obj      = 
$sha1_obj     = 
$cast_obj     = 
$rc4_obj      = 
$rmd160_obj   = 
$rc5_obj      = 
$dso_scheme   = dlfcn
$shared_target= hpux-shared
$shared_cflag = +Z
$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
$ranlib       = 

*** hpux-parisc-cc
*** hpux-parisc-cc
$cc           = cc
$cc           = cc
$cflags       = +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY
$cflags       = +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY
@@ -1724,6 +1747,29 @@ $shared_cflag = -fPIC
$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
$ranlib       = 
$ranlib       = 


*** hpux64-ia64-cc
$cc           = cc
$cflags       = -Ae +DD64 +O3 +ESlit -z -DB_ENDIAN
$unistd       = 
$thread_cflag = -D_REENTRANT
$sys_id       = 
$lflags       = -ldl
$bn_ops       = SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT
$bn_obj       = asm/ia64-cpp.o
$des_obj      = 
$bf_obj       = 
$md5_obj      = 
$sha1_obj     = 
$cast_obj     = 
$rc4_obj      = 
$rmd160_obj   = 
$rc5_obj      = 
$dso_scheme   = dlfcn
$shared_target= hpux64-shared
$shared_cflag = +Z
$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
$ranlib       = 

*** hpux64-parisc-cc
*** hpux64-parisc-cc
$cc           = cc
$cc           = cc
$cflags       = -Ae +DD64 +O3 +ESlit -z -DB_ENDIAN -DMD32_XARRAY
$cflags       = -Ae +DD64 +O3 +ESlit -z -DB_ENDIAN -DMD32_XARRAY
@@ -2096,11 +2142,11 @@ $ranlib =
$cc           = gcc
$cc           = gcc
$cflags       = -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall
$cflags       = -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall
$unistd       = 
$unistd       = 
$thread_cflag = (unknown)
$thread_cflag = -D_REENTRANT
$sys_id       = 
$sys_id       = 
$lflags       = 
$lflags       = -ldl
$bn_ops       = SIXTY_FOUR_BIT_LONG
$bn_ops       = SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR
$bn_obj       = 
$bn_obj       = asm/ia64.o
$des_obj      = 
$des_obj      = 
$bf_obj       = 
$bf_obj       = 
$md5_obj      = 
$md5_obj      = 
@@ -2109,10 +2155,10 @@ $cast_obj =
$rc4_obj      = 
$rc4_obj      = 
$rmd160_obj   = 
$rmd160_obj   = 
$rc5_obj      = 
$rc5_obj      = 
$dso_scheme   = 
$dso_scheme   = dlfcn
$shared_target= 
$shared_target= linux-shared
$shared_cflag = 
$shared_cflag = -fPIC
$shared_extension = 
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
$ranlib       = 
$ranlib       = 


*** linux-m68k
*** linux-m68k
+35 −6
Original line number Original line Diff line number Diff line
@@ -135,10 +135,7 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in
    HP-UX:*)
    HP-UX:*)
	HPUXVER=`echo ${RELEASE}|sed -e 's/[^.]*.[0B]*//'`
	HPUXVER=`echo ${RELEASE}|sed -e 's/[^.]*.[0B]*//'`
	case "$HPUXVER" in
	case "$HPUXVER" in
	    11.*)
	    1[0-9].*)	# HPUX 10 and 11 targets are unified
		echo "${MACHINE}-hp-hpux11"; exit 0
		;;
	    10.*)
		echo "${MACHINE}-hp-hpux10"; exit 0
		echo "${MACHINE}-hp-hpux10"; exit 0
		;;
		;;
	    *)
	    *)
@@ -567,7 +564,39 @@ EOF
  BS2000-siemens-sysv4) OUT="BS2000-OSD" ;;
  BS2000-siemens-sysv4) OUT="BS2000-OSD" ;;
  RM*-siemens-sysv4) OUT="ReliantUNIX" ;;
  RM*-siemens-sysv4) OUT="ReliantUNIX" ;;
  *-siemens-sysv4) OUT="SINIX" ;;
  *-siemens-sysv4) OUT="SINIX" ;;
  *-hpux1*)	OUT="hpux-parisc-$CC"
  *-hpux1*)
	OUT="hpux-parisc-$CC"
	KERNEL_BITS=`(getconf KERNEL_BITS) 2>/dev/null`
	KERNEL_BITS=${KERNEL_BITS:-32}
	CPU_VERSION=`(getconf CPU_VERSION) 2>/dev/null`
	CPU_VERSION=${CPU_VERSION:-0}
	# See <sys/unistd.h> for further info on CPU_VERSION.
	if   [ $CPU_VERSION -ge 768 ]; then	# IA-64 CPU
	     echo "NOTICE! 64-bit is the only ABI currently operational on HP-UXi."
	     echo "        Post request to openssl-dev@openssl.org for 32-bit support."
	     if [ "$TEST" = "false" ]; then
		(stty -icanon min 0 time 50; read waste) < /dev/tty
	     fi
	     OUT="hpux64-ia64-cc"
	elif [ $CPU_VERSION -ge 532 ]; then	# PA-RISC 2.x CPU
	     if [ "$CC" = "cc" ]; then
		OUT="hpux-parisc2-cc" # can't we have hpux-parisc2-gcc?
	     fi
	     if [ $KERNEL_BITS -eq 64 -a "$CC" = "cc" ]; then
		echo "WARNING! If you wish to build 64-bit library then you have to"
		echo "         invoke './Configure hpux64-parisc2-cc' *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
	     fi
	elif [ $CPU_VERSION -ge 528 ]; then	# PA-RISC 1.1+ CPU
	     :
	elif [ $CPU_VERSION -ge 523 ]; then	# PA-RISC 1.0 CPU
	     :
	else					# Motorola(?) CPU
	     OUT="hpux-$CC"
	fi
	options="$options -D_REENTRANT" ;;
	options="$options -D_REENTRANT" ;;
  *-hpux)	OUT="hpux-parisc-$CC" ;;
  *-hpux)	OUT="hpux-parisc-$CC" ;;
  # these are all covered by the catchall below
  # these are all covered by the catchall below
+12 −0
Original line number Original line Diff line number Diff line
@@ -124,6 +124,18 @@ asm/sparcv8plus-gcc27.o: asm/sparcv8plus.S
	$(CC) $(ASFLAGS) -E asm/sparcv8plus.S | \
	$(CC) $(ASFLAGS) -E asm/sparcv8plus.S | \
		/usr/ccs/bin/as -xarch=v8plus - -o asm/sparcv8plus-gcc27.o
		/usr/ccs/bin/as -xarch=v8plus - -o asm/sparcv8plus-gcc27.o



asm/ia64.o:	asm/ia64.S

# Some compiler drivers (most notably HP-UX and Intel C++) don't
# understand .S extension:-( I wish I could pipe output from cc -E,
# but it's too compiler driver/ABI dependent to cover with a single
# rule...	<appro@fy.chalmers.se>
asm/ia64-cpp.o:	asm/ia64.S
	$(CC) $(ASFLAGS) -E asm/ia64.S > /tmp/ia64.$$$$.s &&	\
	$(CC) $(ASFLAGS) -c -o asm/ia64-cpp.o /tmp/ia64.$$$$.s;	\
	rm -f /tmp/ia64.$$$$.s

files:
files:
	$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
	$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO