From 1fb2e0f940fa77b3b62544a7ce2f589e5cc05826 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Fri, 14 Oct 2011 17:28:10 +0000 Subject: [PATCH 1/1] Allow override of GCCVER and noexecstack checking from environment. Vxworks support. --- Configure | 2 ++ config | 17 ++++++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/Configure b/Configure index 29068b0b50..76aedb68ec 100755 --- a/Configure +++ b/Configure @@ -598,6 +598,8 @@ my %table=( "vxworks-ppc750-debug","ccppc:-ansi -nostdinc -DPPC750 -D_REENTRANT -fvolatile -fno-builtin -fno-for-scope -fsigned-char -Wall -msoft-float -mlongcall -DCPU=PPC604 -I\$(WIND_BASE)/target/h -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DDEBUG -g:::VXWORKS:-r:::::", "vxworks-ppc860","ccppc:-nostdinc -msoft-float -DCPU=PPC860 -DNO_STRINGS_H -I\$(WIND_BASE)/target/h:::VXWORKS:-r:::::", "vxworks-mipsle","ccmips:-B\$(WIND_BASE)/host/\$(WIND_HOST_TYPE)/lib/gcc-lib/ -DL_ENDIAN -EL -Wl,-EL -mips2 -mno-branch-likely -G 0 -fno-builtin -msoft-float -DCPU=MIPS32 -DMIPSEL -DNO_STRINGS_H -I\$(WIND_BASE)/target/h:::VXWORKS:-r::${no_asm}::::::ranlibmips:", +"vxworks-simlinux","ccpentium:-B\$(WIND_BASE)/host/\$(WIND_HOST_TYPE)/lib/gcc-lib/ -D_VSB_CONFIG_FILE=\"\$(WIND_BASE)/target/lib/h/config/vsbConfig.h\" -DL_ENDIAN -DCPU=SIMLINUX -DTOOL_FAMILY=gnu -DTOOL=gnu -fno-builtin -fno-defer-pop -DNO_STRINGS_H -I\$(WIND_BASE)/target/h -I\$(WIND_BASE)/target/h/wrn/coreip -DOPENSSL_NO_HW_PADLOCK:::VXWORKS:-r::${no_asm}::::::ranlibpentium:", +"vxworks-mips","ccmips:-B\$(WIND_BASE)/host/\$(WIND_HOST_TYPE)/lib/gcc-lib/ -D_VSB_CONFIG_FILE=\"\$(WIND_BASE)/target/lib/h/config/vsbConfig.h\" -DB_ENDIAN -DCPU=MIPS32 -G 0 -mips2 -EB -Wl,-EB -msoft-float -mno-branch-likely -DTOOL_FAMILY=gnu -DTOOL=gnu -fno-builtin -fno-defer-pop -DNO_STRINGS_H -I\$(WIND_BASE)/target/h -I\$(WIND_BASE)/target/h/wrn/coreip:::VXWORKS:-r::${no_asm}::::::ranlibmips:", ##### Compaq Non-Stop Kernel (Tandem) "tandem-c89","c89:-Ww -D__TANDEM -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1 -D_TANDEM_SOURCE -DB_ENDIAN::(unknown):::THIRTY_TWO_BIT:::", diff --git a/config b/config index 06bebb8aaf..7a40df5774 100755 --- a/config +++ b/config @@ -411,7 +411,9 @@ exit 0 # this is where the translation occurs into SSLeay terms # --------------------------------------------------------------------------- -GCCVER=`(gcc -dumpversion) 2>/dev/null` +if [ -z "$GCCVER" ]; then + GCCVER=`(gcc -dumpversion) 2>/dev/null` +fi if [ "$GCCVER" != "" ]; then # then strip off whatever prefix egcs prepends the number with... # Hopefully, this will work for any future prefixes as well. @@ -589,6 +591,9 @@ case "$GUESSOS" in ppc-*-linux2) OUT="linux-ppc" ;; ppc60x-*-vxworks*) OUT="vxworks-ppc60x" ;; ppcgen-*-vxworks*) OUT="vxworks-ppcgen" ;; + pentium-*-vxworks*) OUT="vxworks-pentium" ;; + simlinux-*-vxworks*) OUT="vxworks-simlinux" ;; + mips-*-vxworks*) OUT="vxworks-mips";; ia64-*-linux?) OUT="linux-ia64" ;; sparc64-*-linux2) echo "WARNING! If you *know* that your GNU C supports 64-bit/V9 ABI" @@ -841,10 +846,16 @@ esac # options="$options -DATALLA" #fi -! expr "$options" : '.*no\-asm' > /dev/null && \ -($CC -Wa,--help -c -o /dev/null -x assembler /dev/null 2>&1 | \ +if [ -n "$CONFIG_OPTIONS" ]; then + options="$options $CONFIG_OPTIONS" +fi + +if [ -z "$CONFIG_SKIP_NOEXECSTACK" ]; then + ! expr "$options" : '.*no\-asm' > /dev/null && \ + ($CC -Wa,--help -c -o /dev/null -x assembler /dev/null 2>&1 | \ grep \\--noexecstack) 2>&1 > /dev/null && \ options="$options -Wa,--noexecstack" +fi # gcc < 2.8 does not support -march=ultrasparc if [ "$OUT" = solaris-sparcv9-gcc -a $GCCVER -lt 28 ] -- 2.34.1