From 5975dd996768c9bd4c8d1f03186c470eceff6e62 Mon Sep 17 00:00:00 2001 From: Andy Fiddaman Date: Fri, 19 Jul 2019 11:09:10 +0000 Subject: [PATCH] Update .env file to include smatch as a shadow compiler from r151031 --- etc/template-gcc4.env | 2 +- etc/template-gcc7.env | 16 ++++++++-------- setup | 4 ++++ 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/etc/template-gcc4.env b/etc/template-gcc4.env index 5bdde0d..eb2db21 100644 --- a/etc/template-gcc4.env +++ b/etc/template-gcc4.env @@ -30,11 +30,11 @@ export SUNW_NO_UPDATE_NOTIFY='1' export UT_NO_USAGE_TRACKING='1' export BUILD_TOOLS='/opt' export SPRO_ROOT='/opt/sunstudio12.1' -export GNUC_ROOT=/opt/gcc-4.4.4/ export ONLY_LINT_DEFS=-I${SPRO_ROOT}/sunstudio12.1/prod/include/lint export ONBLD_BIN='/opt/onbld/bin' export __GNUC= +export GNUC_ROOT=/opt/gcc-4.4.4/ export PRIMARY_CC=gcc4,/opt/gcc-4.4.4/bin/gcc,gnu export PRIMARY_CCC=gcc4,/opt/gcc-4.4.4/bin/g++,gnu export SHADOW_CCS=gcc7,/opt/gcc-7/bin/gcc,gnu diff --git a/etc/template-gcc7.env b/etc/template-gcc7.env index 5f525e8..4f4f11e 100644 --- a/etc/template-gcc7.env +++ b/etc/template-gcc7.env @@ -29,15 +29,15 @@ export MAKEFLAGS='k' export SUNW_NO_UPDATE_NOTIFY='1' export UT_NO_USAGE_TRACKING='1' export BUILD_TOOLS='/opt' -export GNUC_ROOT=/opt/gcc-7/ export ONBLD_BIN='/opt/onbld/bin' -export __GNUC= -export PRIMARY_CC=gcc7,/opt/gcc-7/bin/gcc,gnu -export PRIMARY_CCC=gcc7,/opt/gcc-7/bin/g++,gnu -export SHADOW_CCS=gcc4,/opt/gcc-4.4.4/bin/gcc,gnu -export SHADOW_CCCS=gcc4,/opt/gcc-4.4.4/bin/g++,gnu +SMATCHBIN=$CODEMGR_WS/usr/src/tools/proto/root_$MACH-nd +SMATCHBIN+=/opt/onbld/bin/$MACH/smatch -#export SMATCHBIN=$CODEMGR_WS$PARENT_TOOLS_ROOT/opt/onbld/bin/$MACH/smatch -#SHADOW_CCS+=" smatch,$SMATCHBIN,smatch" +GNUC_ROOT="/opt/gcc-7/" +PRIMARY_CC="gcc7,/opt/gcc-7/bin/gcc,gnu" +PRIMARY_CCC="gcc7,/opt/gcc-7/bin/g++,gnu" +SHADOW_CCS="gcc4,/opt/gcc-4.4.4/bin/gcc,gnu smatch,$SMATCHBIN,smatch" +SHADOW_CCCS="gcc4,/opt/gcc-4.4.4/bin/g++,gnu" +export GNUC_ROOT PRIMARY_CC PRIMARY_CCC SHADOW_CCS SHADOW_CCCS diff --git a/setup b/setup index 4c58f8a..92767f4 100755 --- a/setup +++ b/setup @@ -172,6 +172,10 @@ install_env() if [ $relnum -lt 151027 ]; then sed -i 's/GNUC_ROOT/GCC_ROOT/g' "$wd/omnios.env" fi + # Enable the shadow compiler from r151029 + if [ $relnum -lt 151029 ]; then + sed -i '/CW_NO_SHADOW/d' "$wd/omnios.env" + fi } install_site()