diff options
Diffstat (limited to 'src/lib/libssl/src/config')
| -rw-r--r-- | src/lib/libssl/src/config | 102 |
1 files changed, 68 insertions, 34 deletions
diff --git a/src/lib/libssl/src/config b/src/lib/libssl/src/config index cf64ec563e..88b9bc69da 100644 --- a/src/lib/libssl/src/config +++ b/src/lib/libssl/src/config | |||
| @@ -370,6 +370,10 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in | |||
| 370 | NONSTOP_KERNEL*) | 370 | NONSTOP_KERNEL*) |
| 371 | echo "nsr-tandem-nsk"; exit 0; | 371 | echo "nsr-tandem-nsk"; exit 0; |
| 372 | ;; | 372 | ;; |
| 373 | |||
| 374 | vxworks*) | ||
| 375 | echo "${MACHINE}-whatever-vxworks"; exit 0; | ||
| 376 | ;; | ||
| 373 | esac | 377 | esac |
| 374 | 378 | ||
| 375 | # | 379 | # |
| @@ -407,23 +411,18 @@ exit 0 | |||
| 407 | # this is where the translation occurs into SSLeay terms | 411 | # this is where the translation occurs into SSLeay terms |
| 408 | # --------------------------------------------------------------------------- | 412 | # --------------------------------------------------------------------------- |
| 409 | 413 | ||
| 410 | GCCVER=`(gcc -dumpversion) 2>/dev/null` | ||
| 411 | if [ "$GCCVER" != "" ]; then | ||
| 412 | # then strip off whatever prefix egcs prepends the number with... | ||
| 413 | # Hopefully, this will work for any future prefixes as well. | ||
| 414 | GCCVER=`echo $GCCVER | LC_ALL=C sed 's/^[a-zA-Z]*\-//'` | ||
| 415 | # Since gcc 3.1 gcc --version behaviour has changed. gcc -dumpversion | ||
| 416 | # does give us what we want though, so we use that. We just just the | ||
| 417 | # major and minor version numbers. | ||
| 418 | # peak single digit before and after first dot, e.g. 2.95.1 gives 29 | ||
| 419 | GCCVER=`echo $GCCVER | sed 's/\([0-9]\)\.\([0-9]\).*/\1\2/'` | ||
| 420 | fi | ||
| 421 | |||
| 422 | # Only set CC if not supplied already | 414 | # Only set CC if not supplied already |
| 423 | if [ -z "$CC" ]; then | 415 | if [ -z "$CROSS_COMPILE$CC" ]; then |
| 424 | # figure out if gcc is available and if so we use it otherwise | 416 | GCCVER=`sh -c "gcc -dumpversion" 2>/dev/null` |
| 425 | # we fallback to whatever cc does on the system | ||
| 426 | if [ "$GCCVER" != "" ]; then | 417 | if [ "$GCCVER" != "" ]; then |
| 418 | # then strip off whatever prefix egcs prepends the number with... | ||
| 419 | # Hopefully, this will work for any future prefixes as well. | ||
| 420 | GCCVER=`echo $GCCVER | LC_ALL=C sed 's/^[a-zA-Z]*\-//'` | ||
| 421 | # Since gcc 3.1 gcc --version behaviour has changed. gcc -dumpversion | ||
| 422 | # does give us what we want though, so we use that. We just just the | ||
| 423 | # major and minor version numbers. | ||
| 424 | # peak single digit before and after first dot, e.g. 2.95.1 gives 29 | ||
| 425 | GCCVER=`echo $GCCVER | sed 's/\([0-9]\)\.\([0-9]\).*/\1\2/'` | ||
| 427 | CC=gcc | 426 | CC=gcc |
| 428 | else | 427 | else |
| 429 | CC=cc | 428 | CC=cc |
| @@ -539,7 +538,7 @@ case "$GUESSOS" in | |||
| 539 | ppc-apple-rhapsody) OUT="rhapsody-ppc-cc" ;; | 538 | ppc-apple-rhapsody) OUT="rhapsody-ppc-cc" ;; |
| 540 | ppc-apple-darwin*) | 539 | ppc-apple-darwin*) |
| 541 | ISA64=`(sysctl -n hw.optional.64bitops) 2>/dev/null` | 540 | ISA64=`(sysctl -n hw.optional.64bitops) 2>/dev/null` |
| 542 | if [ "$ISA64" = "1" ]; then | 541 | if [ "$ISA64" = "1" -a -z "$KERNEL_BITS" ]; then |
| 543 | echo "WARNING! If you wish to build 64-bit library, then you have to" | 542 | echo "WARNING! If you wish to build 64-bit library, then you have to" |
| 544 | echo " invoke './Configure darwin64-ppc-cc' *manually*." | 543 | echo " invoke './Configure darwin64-ppc-cc' *manually*." |
| 545 | if [ "$TEST" = "false" -a -t 1 ]; then | 544 | if [ "$TEST" = "false" -a -t 1 ]; then |
| @@ -547,10 +546,14 @@ case "$GUESSOS" in | |||
| 547 | (trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1 | 546 | (trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1 |
| 548 | fi | 547 | fi |
| 549 | fi | 548 | fi |
| 550 | OUT="darwin-ppc-cc" ;; | 549 | if [ "$ISA64" = "1" -a "$KERNEL_BITS" = "64" ]; then |
| 550 | OUT="darwin64-ppc-cc" | ||
| 551 | else | ||
| 552 | OUT="darwin-ppc-cc" | ||
| 553 | fi ;; | ||
| 551 | i?86-apple-darwin*) | 554 | i?86-apple-darwin*) |
| 552 | ISA64=`(sysctl -n hw.optional.x86_64) 2>/dev/null` | 555 | ISA64=`(sysctl -n hw.optional.x86_64) 2>/dev/null` |
| 553 | if [ "$ISA64" = "1" ]; then | 556 | if [ "$ISA64" = "1" -a -z "$KERNEL_BITS" ]; then |
| 554 | echo "WARNING! If you wish to build 64-bit library, then you have to" | 557 | echo "WARNING! If you wish to build 64-bit library, then you have to" |
| 555 | echo " invoke './Configure darwin64-x86_64-cc' *manually*." | 558 | echo " invoke './Configure darwin64-x86_64-cc' *manually*." |
| 556 | if [ "$TEST" = "false" -a -t 1 ]; then | 559 | if [ "$TEST" = "false" -a -t 1 ]; then |
| @@ -558,7 +561,17 @@ case "$GUESSOS" in | |||
| 558 | (trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1 | 561 | (trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1 |
| 559 | fi | 562 | fi |
| 560 | fi | 563 | fi |
| 561 | OUT="darwin-i386-cc" ;; | 564 | if [ "$ISA64" = "1" -a "$KERNEL_BITS" = "64" ]; then |
| 565 | OUT="darwin64-x86_64-cc" | ||
| 566 | else | ||
| 567 | OUT="darwin-i386-cc" | ||
| 568 | fi ;; | ||
| 569 | armv6+7-*-iphoneos) | ||
| 570 | options="$options -arch%20armv6 -arch%20armv7" | ||
| 571 | OUT="iphoneos-cross" ;; | ||
| 572 | *-*-iphoneos) | ||
| 573 | options="$options -arch%20${MACHINE}" | ||
| 574 | OUT="iphoneos-cross" ;; | ||
| 562 | alpha-*-linux2) | 575 | alpha-*-linux2) |
| 563 | ISA=`awk '/cpu model/{print$4;exit(0);}' /proc/cpuinfo` | 576 | ISA=`awk '/cpu model/{print$4;exit(0);}' /proc/cpuinfo` |
| 564 | case ${ISA:-generic} in | 577 | case ${ISA:-generic} in |
| @@ -583,6 +596,11 @@ case "$GUESSOS" in | |||
| 583 | OUT="linux-ppc" | 596 | OUT="linux-ppc" |
| 584 | ;; | 597 | ;; |
| 585 | ppc-*-linux2) OUT="linux-ppc" ;; | 598 | ppc-*-linux2) OUT="linux-ppc" ;; |
| 599 | ppc60x-*-vxworks*) OUT="vxworks-ppc60x" ;; | ||
| 600 | ppcgen-*-vxworks*) OUT="vxworks-ppcgen" ;; | ||
| 601 | pentium-*-vxworks*) OUT="vxworks-pentium" ;; | ||
| 602 | simlinux-*-vxworks*) OUT="vxworks-simlinux" ;; | ||
| 603 | mips-*-vxworks*) OUT="vxworks-mips";; | ||
| 586 | ia64-*-linux?) OUT="linux-ia64" ;; | 604 | ia64-*-linux?) OUT="linux-ia64" ;; |
| 587 | sparc64-*-linux2) | 605 | sparc64-*-linux2) |
| 588 | echo "WARNING! If you *know* that your GNU C supports 64-bit/V9 ABI" | 606 | echo "WARNING! If you *know* that your GNU C supports 64-bit/V9 ABI" |
| @@ -624,12 +642,24 @@ case "$GUESSOS" in | |||
| 624 | options="$options -DB_ENDIAN -mschedule=$CPUSCHEDULE -march=$CPUARCH" | 642 | options="$options -DB_ENDIAN -mschedule=$CPUSCHEDULE -march=$CPUARCH" |
| 625 | OUT="linux-generic32" ;; | 643 | OUT="linux-generic32" ;; |
| 626 | armv[1-3]*-*-linux2) OUT="linux-generic32" ;; | 644 | armv[1-3]*-*-linux2) OUT="linux-generic32" ;; |
| 645 | armv[7-9]*-*-linux2) OUT="linux-armv4"; options="$options -march=armv7-a" ;; | ||
| 627 | arm*-*-linux2) OUT="linux-armv4" ;; | 646 | arm*-*-linux2) OUT="linux-armv4" ;; |
| 628 | sh*b-*-linux2) OUT="linux-generic32"; options="$options -DB_ENDIAN" ;; | 647 | sh*b-*-linux2) OUT="linux-generic32"; options="$options -DB_ENDIAN" ;; |
| 629 | sh*-*-linux2) OUT="linux-generic32"; options="$options -DL_ENDIAN" ;; | 648 | sh*-*-linux2) OUT="linux-generic32"; options="$options -DL_ENDIAN" ;; |
| 630 | m68k*-*-linux2) OUT="linux-generic32"; options="$options -DB_ENDIAN" ;; | 649 | m68k*-*-linux2) OUT="linux-generic32"; options="$options -DB_ENDIAN" ;; |
| 631 | s390-*-linux2) OUT="linux-generic32"; options="$options -DB_ENDIAN" ;; | 650 | s390-*-linux2) OUT="linux-generic32"; options="$options -DB_ENDIAN" ;; |
| 632 | s390x-*-linux2) OUT="linux-s390x" ;; | 651 | s390x-*-linux2) |
| 652 | # To be uncommented when glibc bug is fixed, see Configure... | ||
| 653 | #if egrep -e '^features.* highgprs' /proc/cpuinfo >/dev/null ; then | ||
| 654 | # echo "WARNING! If you wish to build \"highgprs\" 32-bit library, then you" | ||
| 655 | # echo " have to invoke './Configure linux32-s390x' *manually*." | ||
| 656 | # if [ "$TEST" = "false" -a -t -1 ]; then | ||
| 657 | # echo " You have about 5 seconds to press Ctrl-C to abort." | ||
| 658 | # (trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1 | ||
| 659 | # fi | ||
| 660 | #fi | ||
| 661 | OUT="linux64-s390x" | ||
| 662 | ;; | ||
| 633 | x86_64-*-linux?) OUT="linux-x86_64" ;; | 663 | x86_64-*-linux?) OUT="linux-x86_64" ;; |
| 634 | *86-*-linux2) OUT="linux-elf" | 664 | *86-*-linux2) OUT="linux-elf" |
| 635 | if [ "$GCCVER" -gt 28 ]; then | 665 | if [ "$GCCVER" -gt 28 ]; then |
| @@ -648,7 +678,7 @@ case "$GUESSOS" in | |||
| 648 | sun4[uv]*-*-solaris2) | 678 | sun4[uv]*-*-solaris2) |
| 649 | OUT="solaris-sparcv9-$CC" | 679 | OUT="solaris-sparcv9-$CC" |
| 650 | ISA64=`(isalist) 2>/dev/null | grep sparcv9` | 680 | ISA64=`(isalist) 2>/dev/null | grep sparcv9` |
| 651 | if [ "$ISA64" != "" ]; then | 681 | if [ "$ISA64" != "" -a "$KERNEL_BITS" = "" ]; then |
| 652 | if [ "$CC" = "cc" -a $CCVER -ge 50 ]; then | 682 | if [ "$CC" = "cc" -a $CCVER -ge 50 ]; then |
| 653 | echo "WARNING! If you wish to build 64-bit library, then you have to" | 683 | echo "WARNING! If you wish to build 64-bit library, then you have to" |
| 654 | echo " invoke './Configure solaris64-sparcv9-cc' *manually*." | 684 | echo " invoke './Configure solaris64-sparcv9-cc' *manually*." |
| @@ -678,13 +708,16 @@ case "$GUESSOS" in | |||
| 678 | fi | 708 | fi |
| 679 | fi | 709 | fi |
| 680 | fi | 710 | fi |
| 711 | if [ "$ISA64" != "" -a "$KERNEL_BITS" = "64" ]; then | ||
| 712 | OUT="solaris64-sparcv9-$CC" | ||
| 713 | fi | ||
| 681 | ;; | 714 | ;; |
| 682 | sun4m-*-solaris2) OUT="solaris-sparcv8-$CC" ;; | 715 | sun4m-*-solaris2) OUT="solaris-sparcv8-$CC" ;; |
| 683 | sun4d-*-solaris2) OUT="solaris-sparcv8-$CC" ;; | 716 | sun4d-*-solaris2) OUT="solaris-sparcv8-$CC" ;; |
| 684 | sun4*-*-solaris2) OUT="solaris-sparcv7-$CC" ;; | 717 | sun4*-*-solaris2) OUT="solaris-sparcv7-$CC" ;; |
| 685 | *86*-*-solaris2) | 718 | *86*-*-solaris2) |
| 686 | ISA64=`(isalist) 2>/dev/null | grep amd64` | 719 | ISA64=`(isalist) 2>/dev/null | grep amd64` |
| 687 | if [ "$ISA64" != "" ]; then | 720 | if [ "$ISA64" != "" -a ${KERNEL_BITS:-64} -eq 64 ]; then |
| 688 | OUT="solaris64-x86_64-$CC" | 721 | OUT="solaris64-x86_64-$CC" |
| 689 | else | 722 | else |
| 690 | OUT="solaris-x86-$CC" | 723 | OUT="solaris-x86-$CC" |
| @@ -736,20 +769,17 @@ case "$GUESSOS" in | |||
| 736 | if [ $CC = "gcc" -a $GCC_BITS = "64" ]; then | 769 | if [ $CC = "gcc" -a $GCC_BITS = "64" ]; then |
| 737 | OUT="hpux64-parisc2-gcc" | 770 | OUT="hpux64-parisc2-gcc" |
| 738 | fi | 771 | fi |
| 739 | KERNEL_BITS=`(getconf KERNEL_BITS) 2>/dev/null` | 772 | [ "$KERNEL_BITS" ] || KERNEL_BITS=`(getconf KERNEL_BITS) 2>/dev/null` |
| 740 | KERNEL_BITS=${KERNEL_BITS:-32} | 773 | KERNEL_BITS=${KERNEL_BITS:-32} |
| 741 | CPU_VERSION=`(getconf CPU_VERSION) 2>/dev/null` | 774 | CPU_VERSION=`(getconf CPU_VERSION) 2>/dev/null` |
| 742 | CPU_VERSION=${CPU_VERSION:-0} | 775 | CPU_VERSION=${CPU_VERSION:-0} |
| 743 | # See <sys/unistd.h> for further info on CPU_VERSION. | 776 | # See <sys/unistd.h> for further info on CPU_VERSION. |
| 744 | if [ $CPU_VERSION -ge 768 ]; then # IA-64 CPU | 777 | if [ $CPU_VERSION -ge 768 ]; then # IA-64 CPU |
| 745 | echo "WARNING! 64-bit ABI is the default configured ABI on HP-UXi." | 778 | if [ $KERNEL_BITS -eq 64 -a "$CC" = "cc" ]; then |
| 746 | echo " If you wish to build 32-bit library, the you have to" | 779 | OUT="hpux64-ia64-cc" |
| 747 | echo " invoke './Configure hpux-ia64-cc' *manually*." | 780 | else |
| 748 | if [ "$TEST" = "false" -a -t 1 ]; then | 781 | OUT="hpux-ia64-cc" |
| 749 | echo " You have about 5 seconds to press Ctrl-C to abort." | 782 | fi |
| 750 | (trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1 | ||
| 751 | fi | ||
| 752 | OUT="hpux64-ia64-cc" | ||
| 753 | elif [ $CPU_VERSION -ge 532 ]; then # PA-RISC 2.x CPU | 783 | elif [ $CPU_VERSION -ge 532 ]; then # PA-RISC 2.x CPU |
| 754 | OUT=${OUT:-"hpux-parisc2-${CC}"} | 784 | OUT=${OUT:-"hpux-parisc2-${CC}"} |
| 755 | if [ $KERNEL_BITS -eq 64 -a "$CC" = "cc" ]; then | 785 | if [ $KERNEL_BITS -eq 64 -a "$CC" = "cc" ]; then |
| @@ -770,7 +800,7 @@ case "$GUESSOS" in | |||
| 770 | options="$options -D_REENTRANT" ;; | 800 | options="$options -D_REENTRANT" ;; |
| 771 | *-hpux) OUT="hpux-parisc-$CC" ;; | 801 | *-hpux) OUT="hpux-parisc-$CC" ;; |
| 772 | *-aix) | 802 | *-aix) |
| 773 | KERNEL_BITS=`(getconf KERNEL_BITMODE) 2>/dev/null` | 803 | [ "$KERNEL_BITS" ] || KERNEL_BITS=`(getconf KERNEL_BITMODE) 2>/dev/null` |
| 774 | KERNEL_BITS=${KERNEL_BITS:-32} | 804 | KERNEL_BITS=${KERNEL_BITS:-32} |
| 775 | OBJECT_MODE=${OBJECT_MODE:-32} | 805 | OBJECT_MODE=${OBJECT_MODE:-32} |
| 776 | if [ "$CC" = "gcc" ]; then | 806 | if [ "$CC" = "gcc" ]; then |
| @@ -810,6 +840,8 @@ case "$GUESSOS" in | |||
| 810 | beos-*) OUT="$GUESSOS" ;; | 840 | beos-*) OUT="$GUESSOS" ;; |
| 811 | x86pc-*-qnx6) OUT="QNX6-i386" ;; | 841 | x86pc-*-qnx6) OUT="QNX6-i386" ;; |
| 812 | *-*-qnx6) OUT="QNX6" ;; | 842 | *-*-qnx6) OUT="QNX6" ;; |
| 843 | x86-*-android|i?86-*-android) OUT="android-x86" ;; | ||
| 844 | armv[7-9]*-*-android) OUT="android-armv7" ;; | ||
| 813 | *) OUT=`echo $GUESSOS | awk -F- '{print $3}'`;; | 845 | *) OUT=`echo $GUESSOS | awk -F- '{print $3}'`;; |
| 814 | esac | 846 | esac |
| 815 | 847 | ||
| @@ -825,9 +857,11 @@ esac | |||
| 825 | # options="$options -DATALLA" | 857 | # options="$options -DATALLA" |
| 826 | #fi | 858 | #fi |
| 827 | 859 | ||
| 828 | ($CC -Wa,--help -c -o /dev/null -x assembler /dev/null 2>&1 | \ | 860 | if expr "$options" : '.*no\-asm' > /dev/null; then :; else |
| 829 | grep \\--noexecstack) 2>&1 > /dev/null && \ | 861 | sh -c "$CROSS_COMPILE${CC:-gcc} -Wa,--help -c -o /tmp/null.$$.o -x assembler /dev/null && rm /tmp/null.$$.o" 2>&1 | \ |
| 862 | grep \\--noexecstack >/dev/null && \ | ||
| 830 | options="$options -Wa,--noexecstack" | 863 | options="$options -Wa,--noexecstack" |
| 864 | fi | ||
| 831 | 865 | ||
| 832 | # gcc < 2.8 does not support -march=ultrasparc | 866 | # gcc < 2.8 does not support -march=ultrasparc |
| 833 | if [ "$OUT" = solaris-sparcv9-gcc -a $GCCVER -lt 28 ] | 867 | if [ "$OUT" = solaris-sparcv9-gcc -a $GCCVER -lt 28 ] |
