From ef92312b417869bd498e5e0a126afab41340b981 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Lutz=20J=C3=A4nicke?= Date: Fri, 14 Jun 2002 20:10:24 +0000 Subject: [PATCH] Initial support for hpux64-parisc-gcc Submitted by: ross.alexander@uk.neceur.com Reviewed by: PR: 96 --- Configure | 3 +++ TABLE | 24 ++++++++++++++++++++++++ config | 24 ++++++++++++++++++++++-- 3 files changed, 49 insertions(+), 2 deletions(-) diff --git a/Configure b/Configure index 9dc2945eec..7c82f4412f 100755 --- a/Configure +++ b/Configure @@ -256,6 +256,9 @@ my %table=( "hpux-parisc-cc-o4","cc:-Ae +O4 +ESlit -z -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY::::-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:+Z::.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)", +# 64bit PARISC for GCC without optimization, which seems to make problems. +# Submitted by +"hpux64-parisc-gcc","gcc:-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:-fpic::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", # IA-64 targets # I have no idea if this one actually works, feedback needed. diff --git a/TABLE b/TABLE index c474ff742d..f8b9467d12 100644 --- a/TABLE +++ b/TABLE @@ -2400,6 +2400,30 @@ $shared_ldflag = $shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +*** hpux64-parisc-gcc +$cc = gcc +$cflags = -DB_ENDIAN -DMD32_XARRAY +$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 = +$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 = -fpic +$shared_ldflag = +$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR) +$ranlib = + *** hpux64-parisc2-cc $cc = cc $cflags = +DD64 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY diff --git a/config b/config index 775344ecab..8c80670a08 100755 --- a/config +++ b/config @@ -403,7 +403,18 @@ else CC=cc fi GCCVER=${GCCVER:-0} - +if [ "$SYSTEM" = "HP-UX" ];then + # By default gcc is a ILP32 compiler (with long long == 64). + GCC_BITS="32" + if [ $GCCVER -ge 30 ]; then + # PA64 support only came in with gcc 3.0.x. + # We look for the preprocessor symbol __LP64__ indicating + # 64bit bit long and pointer. sizeof(int) == 32 on HPUX64. + if gcc -v -E -x c /dev/null 2>&1 | grep __LP64__ > /dev/null; then + GCC_BITS="64" + fi + fi +fi if [ "$SYSTEM" = "SunOS" ]; then if [ $GCCVER -ge 30 ]; then # 64-bit ABI isn't officially supported in gcc 3.0, but it appears @@ -661,7 +672,16 @@ EOF RM*-siemens-sysv4) OUT="ReliantUNIX" ;; *-siemens-sysv4) OUT="SINIX" ;; *-hpux1*) - OUT="hpux-parisc-$CC" + if [ $CC = "gcc" ]; + then + if [ $GCC_BITS = "64" ]; then + OUT="hpux64-parisc-gcc" + else + OUT="hpux-parisc-gcc" + fi + else + OUT="hpux-parisc-$CC" + fi KERNEL_BITS=`(getconf KERNEL_BITS) 2>/dev/null` KERNEL_BITS=${KERNEL_BITS:-32} CPU_VERSION=`(getconf CPU_VERSION) 2>/dev/null` -- 2.25.1