X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=config;h=2e149ded7cffbf4421cc73d1d9b38198ef1fadc8;hp=1f2f7450d1263466f4d917e2d6f20547b8a4703b;hb=5ea8afd368498101531c7e628507a17d1e0e122c;hpb=3d328a445c2ad0eff2e9e843c384711be58a7c2f diff --git a/config b/config index 1f2f7450d1..2e149ded7c 100755 --- a/config +++ b/config @@ -1,7 +1,7 @@ #!/bin/sh -# Copyright 1998-2017 The OpenSSL Project Authors. All Rights Reserved. +# Copyright 1998-2020 The OpenSSL Project Authors. All Rights Reserved. # -# Licensed under the OpenSSL license (the "License"). You may not use +# Licensed under the Apache License 2.0 (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy # in the file LICENSE in the source distribution or at # https://www.openssl.org/source/license.html @@ -19,7 +19,7 @@ THERE=`dirname $0` # pick up any command line args to config for i do -case "$i" in +case "$i" in -d*) options=$options" --debug";; -t*) DRYRUN="true" VERBOSE="true";; -v*) VERBOSE="true";; @@ -59,7 +59,7 @@ __CNF_LDLIBS= # Now test for ISC and SCO, since it is has a braindamaged uname. # -# We need to work around FreeBSD 1.1.5.1 +# We need to work around FreeBSD 1.1.5.1 ( XREL=`uname -X 2>/dev/null | grep "^Release" | awk '{print $3}'` if [ "x$XREL" != "x" ]; then @@ -240,21 +240,6 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in esac ;; - QNX:*) - case "$RELEASE" in - 4*) - echo "${MACHINE}-whatever-qnx4" - ;; - 6*) - echo "${MACHINE}-whatever-qnx6" - ;; - *) - echo "${MACHINE}-whatever-qnx" - ;; - esac - exit 0 - ;; - Paragon*:*:*:*) echo "i860-intel-osf1"; exit 0 ;; @@ -364,21 +349,10 @@ if [ -d /usr/apollo ]; then exit 0 fi -# Now NeXT -ISNEXT=`hostinfo 2>/dev/null` -case "$ISNEXT" in - *'NeXT Mach 3.3'*) - echo "whatever-next-nextstep3.3"; exit 0 - ;; - *NeXT*) - echo "whatever-next-nextstep"; exit 0 - ;; -esac - # At this point we gone through all the one's # we know of: Punt -echo "${MACHINE}-whatever-${SYSTEM}" +echo "${MACHINE}-whatever-${SYSTEM}" exit 0 ) 2>/dev/null | ( @@ -448,7 +422,7 @@ fi CCVER=${CCVER:-0} -# read the output of the embedded GuessOS +# read the output of the embedded GuessOS read GUESSOS echo Operating system: $GUESSOS @@ -513,21 +487,18 @@ case "$GUESSOS" in OUT="darwin64-x86_64-cc" fi ;; armv6+7-*-iphoneos) - __CNF_CFLAGS="$__CNF_CFLAGS -arch%20armv6 -arch%20armv7" - __CNF_CXXFLAGS="$__CNF_CXXFLAGS -arch%20armv6 -arch%20armv7" + __CNF_CFLAGS="$__CNF_CFLAGS -arch armv6 -arch armv7" + __CNF_CXXFLAGS="$__CNF_CXXFLAGS -arch armv6 -arch armv7" OUT="iphoneos-cross" ;; *-*-iphoneos) - __CNF_CFLAGS="$__CNF_CFLAGS -arch%20${MACHINE}" - __CNF_CXXFLAGS="$__CNF_CXXFLAGS -arch%20${MACHINE}" + __CNF_CFLAGS="$__CNF_CFLAGS -arch ${MACHINE}" + __CNF_CXXFLAGS="$__CNF_CXXFLAGS -arch ${MACHINE}" OUT="iphoneos-cross" ;; arm64-*-iphoneos|*-*-ios64) OUT="ios64-cross" ;; alpha-*-linux2) ISA=`awk '/cpu model/{print$4;exit(0);}' /proc/cpuinfo` - case ${ISA:-generic} in - *[678]) OUT="linux-alpha+bwx-$CC" ;; - *) OUT="linux-alpha-$CC" ;; - esac + OUT="linux-alpha-$CC" if [ "$CC" = "gcc" ]; then case ${ISA:-generic} in EV5|EV45) __CNF_CFLAGS="$__CNF_CFLAGS -mcpu=ev5" @@ -577,6 +548,7 @@ case "$GUESSOS" in pentium-*-vxworks*) OUT="vxworks-pentium" ;; simlinux-*-vxworks*) OUT="vxworks-simlinux" ;; mips-*-vxworks*) OUT="vxworks-mips";; + e2k-*-linux*) OUT="linux-generic64 -DL_ENDIAN" ;; ia64-*-linux?) OUT="linux-ia64" ;; sparc64-*-linux2) echo "WARNING! If you *know* that your GNU C supports 64-bit/V9 ABI" @@ -747,7 +719,7 @@ case "$GUESSOS" in *-*-[Uu]nix[Ww]are7) if [ "$CC" = "gcc" ]; then OUT="unixware-7-gcc" ; options="$options no-sse2" - else + else OUT="unixware-7" ; options="$options no-sse2" __CNF_CPPFLAGS="$__CNF_CPPFLAGS -D__i386__" fi @@ -775,7 +747,11 @@ case "$GUESSOS" in OUT="hpux-ia64-cc" fi elif [ $CPU_VERSION -ge 532 ]; then # PA-RISC 2.x CPU - OUT=${OUT:-"hpux-parisc2-${CC}"} + # PA-RISC 2.0 is no longer supported as separate 32-bit + # target. This is compensated for by run-time detection + # in most critical assembly modules and taking advantage + # of 2.0 architecture in PA-RISC 1.1 build. + OUT=${OUT:-"hpux-parisc1_1-${CC}"} 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 '$THERE/Configure hpux64-parisc2-cc' *manually*." @@ -784,11 +760,6 @@ case "$GUESSOS" in (trap "stty `stty -g`; exit 0" 2 0; stty -icanon min 0 time 50; read waste) <&1 fi fi - # PA-RISC 2.0 is no longer supported as separate 32-bit - # target. This is compensated for by run-time detection - # in most critical assembly modules and taking advantage - # of 2.0 architecture in PA-RISC 1.1 build. - OUT="hpux-parisc1_1-${CC}" elif [ $CPU_VERSION -ge 528 ]; then # PA-RISC 1.1+ CPU OUT="hpux-parisc1_1-${CC}" elif [ $CPU_VERSION -ge 523 ]; then # PA-RISC 1.0 CPU @@ -809,7 +780,7 @@ case "$GUESSOS" in OUT="aix64-gcc" fi elif [ $OBJECT_MODE -eq 64 ]; then - echo 'Your $OBJECT_MODE was found to be set to 64' + echo 'Your $OBJECT_MODE was found to be set to 64' OUT="aix64-cc" else OUT="aix-cc" @@ -831,8 +802,6 @@ case "$GUESSOS" in # these are all covered by the catchall below i[3456]86-*-cygwin) OUT="Cygwin-x86" ;; *-*-cygwin) OUT="Cygwin-${MACHINE}" ;; - x86pc-*-qnx6) OUT="QNX6-i386" ;; - *-*-qnx6) OUT="QNX6" ;; x86-*-android|i?86-*-android) OUT="android-x86" ;; armv[7-9]*-*-android) OUT="android-armeabi" @@ -858,14 +827,6 @@ if [ -n "$CONFIG_OPTIONS" ]; then options="$options $CONFIG_OPTIONS" fi -if expr "$options" : '.*no\-asm' > /dev/null; then :; else - if sh -c "$CROSS_COMPILE${CC:-gcc} -Wa,--help -c -o /tmp/null.$$.o -x assembler /dev/null && rm /tmp/null.$$.o" 2>&1 | \ - grep \\--noexecstack >/dev/null; then - __CNF_CFLAGS="$__CNF_CFLAGS -Wa,--noexecstack" - __CNF_CXXFLAGS="$__CNF_CXXFLAGS -Wa,--noexecstack" - fi -fi - # gcc < 2.8 does not support -march=ultrasparc if [ "$OUT" = solaris-sparcv9-gcc -a $GCCVER -lt 28 ] then @@ -886,14 +847,6 @@ case "$GUESSOS" in i386-*) options="$options 386" ;; esac -for i in aes aria bf camellia cast des dh dsa ec hmac idea md2 md5 mdc2 rc2 rc4 rc5 ripemd rsa seed sha sm2 sm3 sm4 -do - if [ ! -d $THERE/crypto/$i ] - then - options="$options no-$i" - fi -done - if [ -z "$OUT" ]; then OUT="$CC" fi @@ -923,7 +876,7 @@ if [ ".$PERL" = . ] ; then exit 1 fi -# run Configure to check to see if we need to specify the +# run Configure to check to see if we need to specify the # compiler for the platform ... in which case we add it on # the end ... otherwise we leave it off @@ -934,8 +887,12 @@ fi OUT="$OUT" -$PERL $THERE/Configure LIST | grep "$OUT" > /dev/null -if [ $? = "0" ]; then +if [ "$OUT" = "darwin64-x86_64-cc" ]; then + echo "WARNING! If you wish to build 32-bit libraries, then you have to" + echo " invoke 'KERNEL_BITS=32 $THERE/config $options'." +fi + +if $PERL $THERE/Configure LIST | grep "$OUT" > /dev/null; then if [ "$VERBOSE" = "true" ]; then echo /usr/bin/env \ __CNF_CPPDEFINES="'$__CNF_CPPDEFINES'" \ @@ -946,7 +903,7 @@ if [ $? = "0" ]; then __CNF_LDFLAGS="'$__CNF_LDFLAGS'" \ __CNF_LDLIBS="'$__CNF_LDLIBS'" \ $PERL $THERE/Configure $OUT $options - fi + fi if [ "$DRYRUN" = "false" ]; then # eval to make sure quoted options, possibly with spaces inside, # are treated right @@ -965,8 +922,5 @@ else exit 1 fi -if [ "$OUT" = "darwin64-x86_64-cc" ]; then - echo "WARNING! If you wish to build 32-bit libraries, then you have to" - echo " invoke 'KERNEL_BITS=32 $THERE/config $options'." -fi +# Do not add anothing from here on, so we don't lose the Configure exit code )