diff options
Diffstat (limited to 'src/lib/libssl/src/config')
-rw-r--r-- | src/lib/libssl/src/config | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/src/lib/libssl/src/config b/src/lib/libssl/src/config index 3d443da6fb..972cdb70a3 100644 --- a/src/lib/libssl/src/config +++ b/src/lib/libssl/src/config | |||
@@ -390,18 +390,30 @@ exit 0 | |||
390 | 390 | ||
391 | # figure out if gcc is available and if so we use it otherwise | 391 | # figure out if gcc is available and if so we use it otherwise |
392 | # we fallback to whatever cc does on the system | 392 | # we fallback to whatever cc does on the system |
393 | GCCVER=`(gcc --version) 2>/dev/null` | 393 | GCCVER=`(gcc -dumpversion) 2>/dev/null` |
394 | if [ "$GCCVER" != "" ]; then | 394 | if [ "$GCCVER" != "" ]; then |
395 | CC=gcc | 395 | CC=gcc |
396 | # then strip off whatever prefix Cygnus prepends the number with... | 396 | # Since gcc 3.1 gcc --version behaviour has changed. gcc -dumpversion |
397 | GCCVER=`echo $GCCVER | sed 's/^[a-z]*\-//'` | 397 | # does give us what we want though, so we use that. We just just the |
398 | # major and minor version numbers. | ||
398 | # peak single digit before and after first dot, e.g. 2.95.1 gives 29 | 399 | # peak single digit before and after first dot, e.g. 2.95.1 gives 29 |
399 | GCCVER=`echo $GCCVER | sed 's/\([0-9]\)\.\([0-9]\).*/\1\2/'` | 400 | GCCVER=`echo $GCCVER | sed 's/\([0-9]\)\.\([0-9]\).*/\1\2/'` |
400 | else | 401 | else |
401 | CC=cc | 402 | CC=cc |
402 | fi | 403 | fi |
403 | GCCVER=${GCCVER:-0} | 404 | GCCVER=${GCCVER:-0} |
404 | 405 | if [ "$SYSTEM" = "HP-UX" ];then | |
406 | # By default gcc is a ILP32 compiler (with long long == 64). | ||
407 | GCC_BITS="32" | ||
408 | if [ $GCCVER -ge 30 ]; then | ||
409 | # PA64 support only came in with gcc 3.0.x. | ||
410 | # We look for the preprocessor symbol __LP64__ indicating | ||
411 | # 64bit bit long and pointer. sizeof(int) == 32 on HPUX64. | ||
412 | if gcc -v -E -x c /dev/null 2>&1 | grep __LP64__ > /dev/null; then | ||
413 | GCC_BITS="64" | ||
414 | fi | ||
415 | fi | ||
416 | fi | ||
405 | if [ "$SYSTEM" = "SunOS" ]; then | 417 | if [ "$SYSTEM" = "SunOS" ]; then |
406 | if [ $GCCVER -ge 30 ]; then | 418 | if [ $GCCVER -ge 30 ]; then |
407 | # 64-bit ABI isn't officially supported in gcc 3.0, but it appears | 419 | # 64-bit ABI isn't officially supported in gcc 3.0, but it appears |
@@ -659,7 +671,16 @@ EOF | |||
659 | RM*-siemens-sysv4) OUT="ReliantUNIX" ;; | 671 | RM*-siemens-sysv4) OUT="ReliantUNIX" ;; |
660 | *-siemens-sysv4) OUT="SINIX" ;; | 672 | *-siemens-sysv4) OUT="SINIX" ;; |
661 | *-hpux1*) | 673 | *-hpux1*) |
662 | OUT="hpux-parisc-$CC" | 674 | if [ $CC = "gcc" ]; |
675 | then | ||
676 | if [ $GCC_BITS = "64" ]; then | ||
677 | OUT="hpux64-parisc-gcc" | ||
678 | else | ||
679 | OUT="hpux-parisc-gcc" | ||
680 | fi | ||
681 | else | ||
682 | OUT="hpux-parisc-$CC" | ||
683 | fi | ||
663 | KERNEL_BITS=`(getconf KERNEL_BITS) 2>/dev/null` | 684 | KERNEL_BITS=`(getconf KERNEL_BITS) 2>/dev/null` |
664 | KERNEL_BITS=${KERNEL_BITS:-32} | 685 | KERNEL_BITS=${KERNEL_BITS:-32} |
665 | CPU_VERSION=`(getconf CPU_VERSION) 2>/dev/null` | 686 | CPU_VERSION=`(getconf CPU_VERSION) 2>/dev/null` |