summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Mustacchi <rm@joyent.com>2018-07-28 15:48:38 +0000
committerRobert Mustacchi <rm@joyent.com>2018-08-27 15:12:59 +0000
commit7ed546340881b42865171ddfa1a6167b289faae3 (patch)
tree8f1606f9894d19639239a4e587da17a237986ff6
parentc6fe8850c7ff4c85074c93430743b146d8133436 (diff)
downloadillumos-joyent-7ed546340881b42865171ddfa1a6167b289faae3.tar.gz
9684 Transform GCC_ROOT->GNUC_ROOT
Reviewed by: Toomas Some <tsoome@me.com> Reviewed by: Yuri Pankov <yuripv@yuripv.net> Reviewed by: John Levon <john.levon@joyent.com> Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r--usr/src/Makefile.master8
-rw-r--r--usr/src/boot/sys/boot/efi/boot1/Makefile2
-rw-r--r--usr/src/boot/sys/boot/efi/libefi/Makefile2
-rw-r--r--usr/src/boot/sys/boot/efi/loader/Makefile2
-rw-r--r--usr/src/boot/sys/boot/ficl/Makefile.inc2
-rw-r--r--usr/src/boot/sys/boot/i386/btx/btx/Makefile2
-rw-r--r--usr/src/boot/sys/boot/i386/btx/btxldr/Makefile2
-rw-r--r--usr/src/boot/sys/boot/i386/btx/lib/Makefile2
-rw-r--r--usr/src/boot/sys/boot/i386/cdboot/Makefile2
-rw-r--r--usr/src/boot/sys/boot/i386/gptzfsboot/Makefile2
-rw-r--r--usr/src/boot/sys/boot/i386/libi386/Makefile2
-rw-r--r--usr/src/boot/sys/boot/i386/loader/Makefile2
-rw-r--r--usr/src/boot/sys/boot/i386/pxeldr/Makefile2
-rw-r--r--usr/src/boot/sys/boot/libstand/Makefile.com2
-rw-r--r--usr/src/boot/sys/boot/zfs/Makefile.com2
-rw-r--r--usr/src/grub/grub-0.97/Makefile.solaris.defs6
-rw-r--r--usr/src/psm/stand/bootblks/ufs/i386/Makefile4
-rw-r--r--usr/src/tools/cw/Makefile8
-rw-r--r--usr/src/tools/cw/cw.1onbld18
-rw-r--r--usr/src/tools/cw/cw.c2
-rw-r--r--usr/src/tools/scripts/bldenv.sh10
-rw-r--r--usr/src/tools/scripts/nightly.sh10
-rw-r--r--usr/src/tools/scripts/ws.sh10
23 files changed, 69 insertions, 35 deletions
diff --git a/usr/src/Makefile.master b/usr/src/Makefile.master
index a264148c67..1cada73cd5 100644
--- a/usr/src/Makefile.master
+++ b/usr/src/Makefile.master
@@ -125,9 +125,9 @@ JAVA_ROOT= /usr/java
BLD_JAVA_6= $(POUND_SIGN)
BLD_JAVA_8= $(POUND_SIGN)
-GCC_ROOT= /opt/gcc/4.4.4
-GCCLIBDIR= $(GCC_ROOT)/lib
-GCCLIBDIR64= $(GCC_ROOT)/lib/$(MACH64)
+GNUC_ROOT= /opt/gcc/4.4.4
+GCCLIBDIR= $(GNUC_ROOT)/lib
+GCCLIBDIR64= $(GNUC_ROOT)/lib/$(MACH64)
DOCBOOK_XSL_ROOT= /usr/share/sgml/docbook/xsl-stylesheets
@@ -172,7 +172,7 @@ LEX= /usr/ccs/bin/lex
FLEX= /usr/bin/flex
YACC= /usr/ccs/bin/yacc
CPP= /usr/lib/cpp
-ANSI_CPP= $(GCC_ROOT)/bin/cpp
+ANSI_CPP= $(GNUC_ROOT)/bin/cpp
JAVAC= $(JAVA_ROOT)/bin/javac
JAVAH= $(JAVA_ROOT)/bin/javah
JAVADOC= $(JAVA_ROOT)/bin/javadoc
diff --git a/usr/src/boot/sys/boot/efi/boot1/Makefile b/usr/src/boot/sys/boot/efi/boot1/Makefile
index 9c0f56d75e..29014c6136 100644
--- a/usr/src/boot/sys/boot/efi/boot1/Makefile
+++ b/usr/src/boot/sys/boot/efi/boot1/Makefile
@@ -17,7 +17,7 @@
include $(SRC)/Makefile.master
include $(SRC)/boot/Makefile.version
-CC= $(GCC_ROOT)/bin/gcc
+CC= $(GNUC_ROOT)/bin/gcc
LD= $(GNU_ROOT)/bin/gld
OBJCOPY= $(GNU_ROOT)/bin/gobjcopy
OBJDUMP= $(GNU_ROOT)/bin/gobjdump
diff --git a/usr/src/boot/sys/boot/efi/libefi/Makefile b/usr/src/boot/sys/boot/efi/libefi/Makefile
index 0886f0f352..768c792817 100644
--- a/usr/src/boot/sys/boot/efi/libefi/Makefile
+++ b/usr/src/boot/sys/boot/efi/libefi/Makefile
@@ -16,7 +16,7 @@
include $(SRC)/Makefile.master
-CC= $(GCC_ROOT)/bin/gcc
+CC= $(GNUC_ROOT)/bin/gcc
LIB= efi
diff --git a/usr/src/boot/sys/boot/efi/loader/Makefile b/usr/src/boot/sys/boot/efi/loader/Makefile
index 0ae2ebbe3b..40b1198998 100644
--- a/usr/src/boot/sys/boot/efi/loader/Makefile
+++ b/usr/src/boot/sys/boot/efi/loader/Makefile
@@ -17,7 +17,7 @@
include $(SRC)/Makefile.master
include $(SRC)/boot/Makefile.version
-CC= $(GCC_ROOT)/bin/gcc
+CC= $(GNUC_ROOT)/bin/gcc
LD= $(GNU_ROOT)/bin/gld
OBJCOPY= $(GNU_ROOT)/bin/gobjcopy
OBJDUMP= $(GNU_ROOT)/bin/gobjdump
diff --git a/usr/src/boot/sys/boot/ficl/Makefile.inc b/usr/src/boot/sys/boot/ficl/Makefile.inc
index 98f9671c00..0213ace089 100644
--- a/usr/src/boot/sys/boot/ficl/Makefile.inc
+++ b/usr/src/boot/sys/boot/ficl/Makefile.inc
@@ -15,7 +15,7 @@
#
-CC= $(GCC_ROOT)/bin/gcc
+CC= $(GNUC_ROOT)/bin/gcc
FICLDIR= $(SRC)/common/ficl
all: lib
diff --git a/usr/src/boot/sys/boot/i386/btx/btx/Makefile b/usr/src/boot/sys/boot/i386/btx/btx/Makefile
index d31f59f0f9..3642e6e962 100644
--- a/usr/src/boot/sys/boot/i386/btx/btx/Makefile
+++ b/usr/src/boot/sys/boot/i386/btx/btx/Makefile
@@ -21,7 +21,7 @@ OBJS= btx.o
AS= $(GNU_ROOT)/bin/gas
LD= $(GNU_ROOT)/bin/gld
-CC= $(GCC_ROOT)/bin/gcc
+CC= $(GNUC_ROOT)/bin/gcc
#.if defined(BOOT_BTX_NOHANG)
#BOOT_BTX_FLAGS=0x1
diff --git a/usr/src/boot/sys/boot/i386/btx/btxldr/Makefile b/usr/src/boot/sys/boot/i386/btx/btxldr/Makefile
index 338bf63ea0..4792ee0e16 100644
--- a/usr/src/boot/sys/boot/i386/btx/btxldr/Makefile
+++ b/usr/src/boot/sys/boot/i386/btx/btxldr/Makefile
@@ -21,7 +21,7 @@ OBJS= btxldr.o
AS= $(GNU_ROOT)/bin/gas
LD= $(GNU_ROOT)/bin/gld
-CC= $(GCC_ROOT)/bin/gcc
+CC= $(GNUC_ROOT)/bin/gcc
LOADER_ADDRESS=0x200000
CPPFLAGS=
diff --git a/usr/src/boot/sys/boot/i386/btx/lib/Makefile b/usr/src/boot/sys/boot/i386/btx/lib/Makefile
index a627021b66..68dd201f26 100644
--- a/usr/src/boot/sys/boot/i386/btx/lib/Makefile
+++ b/usr/src/boot/sys/boot/i386/btx/lib/Makefile
@@ -17,7 +17,7 @@ include $(SRC)/Makefile.master
AS= $(GNU_ROOT)/bin/gas
LD= $(GNU_ROOT)/bin/gld
-CC= $(GCC_ROOT)/bin/gcc
+CC= $(GNUC_ROOT)/bin/gcc
CPPFLAGS= -I./../../common
CFLAGS= -O2 -march=i386 -ffreestanding -mno-mmx -mno-3dnow -mno-sse -mno-sse2
diff --git a/usr/src/boot/sys/boot/i386/cdboot/Makefile b/usr/src/boot/sys/boot/i386/cdboot/Makefile
index 37d06f9fab..a292046516 100644
--- a/usr/src/boot/sys/boot/i386/cdboot/Makefile
+++ b/usr/src/boot/sys/boot/i386/cdboot/Makefile
@@ -18,7 +18,7 @@ include $(SRC)/Makefile.master
ROOT_BOOT = $(ROOT)/boot
LD= $(GNU_ROOT)/bin/gld
-CC= $(GCC_ROOT)/bin/gcc
+CC= $(GNUC_ROOT)/bin/gcc
CFLAGS = -O2 -I../common -march=i386 -ffreestanding -mno-mmx -mno-3dnow
CFLAGS += -mno-sse -mno-sse2 -mno-sse3 -msoft-float -std=gnu99 -m32
diff --git a/usr/src/boot/sys/boot/i386/gptzfsboot/Makefile b/usr/src/boot/sys/boot/i386/gptzfsboot/Makefile
index 0a8793a0d8..97eb446b90 100644
--- a/usr/src/boot/sys/boot/i386/gptzfsboot/Makefile
+++ b/usr/src/boot/sys/boot/i386/gptzfsboot/Makefile
@@ -21,7 +21,7 @@ include $(SRC)/boot/Makefile.version
AS= $(GNU_ROOT)/bin/gas
LD= $(GNU_ROOT)/bin/gld
-CC= $(GCC_ROOT)/bin/gcc
+CC= $(GNUC_ROOT)/bin/gcc
OBJCOPY= $(GNU_ROOT)/bin/gobjcopy
PROG= gptzfsboot
diff --git a/usr/src/boot/sys/boot/i386/libi386/Makefile b/usr/src/boot/sys/boot/i386/libi386/Makefile
index 439d3c63fa..8b0d0bfc05 100644
--- a/usr/src/boot/sys/boot/i386/libi386/Makefile
+++ b/usr/src/boot/sys/boot/i386/libi386/Makefile
@@ -26,7 +26,7 @@ clobber:
$(RM) machine x86 $(OBJS) libi386.a
AS= $(GNU_ROOT)/bin/gas
-CC= $(GCC_ROOT)/bin/gcc
+CC= $(GNUC_ROOT)/bin/gcc
OBJCOPY= $(GNU_ROOT)/bin/gobjcopy
AS_FLAGS=--32
ASFLAGS=-m32
diff --git a/usr/src/boot/sys/boot/i386/loader/Makefile b/usr/src/boot/sys/boot/i386/loader/Makefile
index 304900d32b..e38284da08 100644
--- a/usr/src/boot/sys/boot/i386/loader/Makefile
+++ b/usr/src/boot/sys/boot/i386/loader/Makefile
@@ -32,7 +32,7 @@ LIBI386= ../libi386/libi386.a
# loader.help build needs better awk
AWK= /usr/xpg4/bin/awk
LD= $(GNU_ROOT)/bin/gld
-CC= $(GCC_ROOT)/bin/gcc
+CC= $(GNUC_ROOT)/bin/gcc
OBJCOPY= $(GNU_ROOT)/bin/gobjcopy
GSTRIP= $(GNU_ROOT)/bin/gstrip
ROOT_BOOT= $(ROOT)/boot
diff --git a/usr/src/boot/sys/boot/i386/pxeldr/Makefile b/usr/src/boot/sys/boot/i386/pxeldr/Makefile
index fef1bcdb51..29324fc40b 100644
--- a/usr/src/boot/sys/boot/i386/pxeldr/Makefile
+++ b/usr/src/boot/sys/boot/i386/pxeldr/Makefile
@@ -17,7 +17,7 @@ include $(SRC)/Makefile.master
ROOT_BOOT = $(ROOT)/boot
-CC= $(GCC_ROOT)/bin/gcc
+CC= $(GNUC_ROOT)/bin/gcc
LD= $(GNU_ROOT)/bin/gld
DD= /usr/bin/dd
CFLAGS= -O2 -I../../..
diff --git a/usr/src/boot/sys/boot/libstand/Makefile.com b/usr/src/boot/sys/boot/libstand/Makefile.com
index 4db8ff77bf..fe4b002e7e 100644
--- a/usr/src/boot/sys/boot/libstand/Makefile.com
+++ b/usr/src/boot/sys/boot/libstand/Makefile.com
@@ -18,7 +18,7 @@ include $(SRC)/Makefile.master
AS= $(GNU_ROOT)/bin/gas
LD= $(GNU_ROOT)/bin/gld
-CC= $(GCC_ROOT)/bin/gcc
+CC= $(GNUC_ROOT)/bin/gcc
LIBRARY= libstand.a
diff --git a/usr/src/boot/sys/boot/zfs/Makefile.com b/usr/src/boot/sys/boot/zfs/Makefile.com
index ee5c8ac1b8..7ece715f1d 100644
--- a/usr/src/boot/sys/boot/zfs/Makefile.com
+++ b/usr/src/boot/sys/boot/zfs/Makefile.com
@@ -25,7 +25,7 @@ clean: clobber
clobber:
$(RM) machine x86 $(OBJS) libzfsboot.a
-CC= $(GCC_ROOT)/bin/gcc
+CC= $(GNUC_ROOT)/bin/gcc
CPPFLAGS=
SRCS += ../zfs.c ../gzip.c
diff --git a/usr/src/grub/grub-0.97/Makefile.solaris.defs b/usr/src/grub/grub-0.97/Makefile.solaris.defs
index a7e68a5239..faf41925c6 100644
--- a/usr/src/grub/grub-0.97/Makefile.solaris.defs
+++ b/usr/src/grub/grub-0.97/Makefile.solaris.defs
@@ -43,11 +43,11 @@ OPTION_DOCS = $(POUND_SIGN)
OPTION_FS = $(POUND_SIGN)
-BASE_CFLAGS = -B$(GCC_ROOT)/bin/ -g $(CPPFLAGS) $(OPTFLAGS) -std=gnu89
-BASE_CCASFLAGS = -B$(GCC_ROOT)/bin/ -g $(CPPFLAGS) $(OPTFLAGS)
+BASE_CFLAGS = -B$(GNUC_ROOT)/bin/ -g $(CPPFLAGS) $(OPTFLAGS) -std=gnu89
+BASE_CCASFLAGS = -B$(GNUC_ROOT)/bin/ -g $(CPPFLAGS) $(OPTFLAGS)
BASE_LDFLAGS =
-CC = $(GCC_ROOT)/bin/gcc
+CC = $(GNUC_ROOT)/bin/gcc
CFLAGS = $(BASE_CFLAGS)
CCDEPMODE = depmode=none
diff --git a/usr/src/psm/stand/bootblks/ufs/i386/Makefile b/usr/src/psm/stand/bootblks/ufs/i386/Makefile
index 25e39431c7..0d5b74fda8 100644
--- a/usr/src/psm/stand/bootblks/ufs/i386/Makefile
+++ b/usr/src/psm/stand/bootblks/ufs/i386/Makefile
@@ -32,8 +32,8 @@ BASEDIR = ../..
include $(BASEDIR)/ufs/Makefile.ufs
-CC = $(GCC_ROOT)/bin/gcc
-ASFLAGS = -B$(GCC_ROOT)/bin/ -fno-builtin -nostdinc
+CC = $(GNUC_ROOT)/bin/gcc
+ASFLAGS = -B$(GNUC_ROOT)/bin/ -fno-builtin -nostdinc
CPPFLAGS =
LD = $(GNU_ROOT)/bin/gld
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