diff options
Diffstat (limited to 'usr/src/tools')
-rw-r--r-- | usr/src/tools/cw/Makefile | 8 | ||||
-rw-r--r-- | usr/src/tools/cw/cw.1onbld | 18 | ||||
-rw-r--r-- | usr/src/tools/cw/cw.c | 2 | ||||
-rw-r--r-- | usr/src/tools/scripts/bldenv.sh | 10 | ||||
-rw-r--r-- | usr/src/tools/scripts/nightly.sh | 10 | ||||
-rw-r--r-- | usr/src/tools/scripts/ws.sh | 10 |
6 files changed, 46 insertions, 12 deletions
diff --git a/usr/src/tools/cw/Makefile b/usr/src/tools/cw/Makefile index 6c9057a6ff..8764d1cd18 100644 --- a/usr/src/tools/cw/Makefile +++ b/usr/src/tools/cw/Makefile @@ -32,8 +32,8 @@ include ../Makefile.tools # Bootstrap problem -- we have to build cw before we can use it i386_CC= $(SPRO_VROOT)/bin/cc sparc_CC= $(SPRO_VROOT)/bin/cc -$(__GNUC)i386_CC= $(GCC_ROOT)/bin/gcc -$(__GNUC)sparc_CC= $(GCC_ROOT)/bin/gcc +$(__GNUC)i386_CC= $(GNUC_ROOT)/bin/gcc +$(__GNUC)sparc_CC= $(GNUC_ROOT)/bin/gcc CFLAGS += $(CCVERBOSE) @@ -48,9 +48,9 @@ $(__GNUC)LDLIBS += -lc $(__GNUC)LDFLAGS= $(MAPFILE.NES:%=-Wl,-M%) CPPFLAGS += -DDEFAULT_CC_DIR='"$(SPRO_VROOT)/bin"' -CPPFLAGS += -DDEFAULT_GCC_DIR='"$(GCC_ROOT)/bin"' +CPPFLAGS += -DDEFAULT_GCC_DIR='"$(GNUC_ROOT)/bin"' CPPFLAGS += -DDEFAULT_CPLUSPLUS_DIR='"$(SPRO_VROOT)/bin"' -CPPFLAGS += -DDEFAULT_GPLUSPLUS_DIR='"$(GCC_ROOT)/bin"' +CPPFLAGS += -DDEFAULT_GPLUSPLUS_DIR='"$(GNUC_ROOT)/bin"' $(ROOTONBLDMAN1ONBLDFILES) := FILEMODE= 644 diff --git a/usr/src/tools/cw/cw.1onbld b/usr/src/tools/cw/cw.1onbld index e6651bd853..86923029d2 100644 --- a/usr/src/tools/cw/cw.1onbld +++ b/usr/src/tools/cw/cw.1onbld @@ -21,7 +21,7 @@ .\" Copyright 2010 Sun Microsystems, Inc. All rights reserved. .\" Use is subject to license terms. .\" -.TH CW 1ONBLD "Mar 22, 2010" +.TH CW 1ONBLD "August 16, 2018" .SH NAME .I cw \- invoke one or more compilers with argument translation @@ -197,18 +197,22 @@ will be used. If these variables are set in the environment, they specify the full pathname for the GNU C and C++ compilers, respectively. .TP 4 -.B CW_GCC_DIR, CW_GPLUSPLUS_DIR, GNU_ROOT +.B CW_GCC_DIR, CW_GPLUSPLUS_DIR, GNUC_ROOT If CW_GCC or CW_GPLUSPLUS are not set, these variables alter the search path for GNU compilers in a manner similar to that described above for the Studio compilers. Specifically: -.B +.LP If CW_GCC_DIR is set, the GNU C compiler in \fI$CW_GCC_DIR\fP will be used. Likewise, if CW_GPLUSPLUS_DIR is set, the GNU C++ compiler in \fI$CW_GPLUSPLUS_DIR\fP will be used. -Otherwise, if GNU_ROOT is set, the GNU C and C++ compilers -in \fI$GCC_ROOT/bin\fP will be used. -Otherwise, the GNU compilers in a predefined default location -will be used. +Otherwise, if GNUC_ROOT is set, the GNU C and C++ compilers +in \fI$GNUC_ROOT/bin\fP will be used. Previously \fI$GCC_ROOT\fP was +used to in place of \fI$GNUC_ROOT\fP; however, because that environment +variable has special meaning to gcc, if it is encountered in bldenv or +nightly(1ONBLD), it will be translated to \fI$GNUC_ROOT\fP. +.LP +If none of the aforementioned environment variables are set, the GNU +compilers in a predefined default location will be used. .SH EXIT STATUS .LP The following exit status values are returned: diff --git a/usr/src/tools/cw/cw.c b/usr/src/tools/cw/cw.c index 40613c11b5..33a23ddee8 100644 --- a/usr/src/tools/cw/cw.c +++ b/usr/src/tools/cw/cw.c @@ -1836,7 +1836,7 @@ main(int argc, char **argv) "%s/SUNWspro/SS12/bin", dir); } - if ((dir = getenv("GCC_ROOT")) != NULL) { + if ((dir = getenv("GNUC_ROOT")) != NULL) { (void) snprintf(default_dir[CW_C_GCC], MAXPATHLEN, "%s/bin", dir); } diff --git a/usr/src/tools/scripts/bldenv.sh b/usr/src/tools/scripts/bldenv.sh index ff098329f8..d0a6887a06 100644 --- a/usr/src/tools/scripts/bldenv.sh +++ b/usr/src/tools/scripts/bldenv.sh @@ -302,6 +302,16 @@ fi export DMAKE_MODE=${DMAKE_MODE:-parallel} +# +# Work around folks who have historically used GCC_ROOT and convert it to +# GNUC_ROOT. We leave GCC_ROOT in the environment for now (though this could +# mess up the case where multiple different gcc versions are being used to +# shadow). +# +if [[ -n "${GCC_ROOT}" ]]; then + export GNUC_ROOT=${GCC_ROOT} +fi + DEF_STRIPFLAG="-s" TMPDIR="/tmp" diff --git a/usr/src/tools/scripts/nightly.sh b/usr/src/tools/scripts/nightly.sh index cec1849ff0..dc7edfcebf 100644 --- a/usr/src/tools/scripts/nightly.sh +++ b/usr/src/tools/scripts/nightly.sh @@ -957,6 +957,16 @@ mkdir -p $TMPDIR || exit 1 chmod 777 $TMPDIR # +# Work around folks who have historically used GCC_ROOT and convert it to +# GNUC_ROOT. We leave GCC_ROOT in the environment for now (though this could +# mess up the case where multiple different gcc versions are being used to +# shadow). +# +if [[ -n "${GCC_ROOT}" ]]; then + export GNUC_ROOT=${GCC_ROOT} +fi + +# # Tools should only be built non-DEBUG. Keep track of the tools proto # area path relative to $TOOLS, because the latter changes in an # export build. diff --git a/usr/src/tools/scripts/ws.sh b/usr/src/tools/scripts/ws.sh index 3d9084c428..d887d20df5 100644 --- a/usr/src/tools/scripts/ws.sh +++ b/usr/src/tools/scripts/ws.sh @@ -328,6 +328,16 @@ ENVLDLIBS1= ENVLDLIBS2= ENVLDLIBS3= +# +# Work around folks who have historically used GCC_ROOT and convert it to +# GNUC_ROOT. We leave GCC_ROOT in the environment for now (though this could +# mess up the case where multiple different gcc versions are being used to +# shadow). +# +if [[ -n "${GCC_ROOT}" ]]; then + export GNUC_ROOT=${GCC_ROOT} +fi + PROTO1=`check_proto $PROTO1` if [[ -n "$PROTO1" ]]; then # first proto area specifed ROOT=$PROTO1 |