summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr/src/Makefile36
-rw-r--r--usr/src/Makefile.master79
-rw-r--r--usr/src/Makefile.master.643
3 files changed, 35 insertions, 83 deletions
diff --git a/usr/src/Makefile b/usr/src/Makefile
index f833888..caa40e8 100644
--- a/usr/src/Makefile
+++ b/usr/src/Makefile
@@ -188,42 +188,10 @@ FRC:
#
cc-version:
- @if $($(MACH)_CC) -_versions >/dev/null 2>/dev/null; then \
- $(ECHO) 32-bit compiler; \
- $(ECHO) $($(MACH)_CC); \
- $($(MACH)_CC) -_versions 2>&1 | \
- $(EGREP) '^(cw|cc|gcc|primary|shadow)'; \
- else \
- __COMPILER=`$($(MACH)_CC) -_compiler 2>/dev/null || $(TRUE)`;\
- if [ -z "$$__COMPILER" ]; then \
- $(ECHO) No 32-bit compiler found; \
- exit 1; \
- else \
- $(ECHO) 32-bit compiler; \
- $(ECHO) $($(MACH)_CC); \
- $(ECHO) $$__COMPILER; \
- $($(MACH)_CC) -V 2>&1 | head -1; \
- fi; \
- fi
+ @$(CW) --versions $(CW_CC_COMPILERS) 2>&1
+# for older nightlies
cc64-version:
- @if $($(MACH64)_CC) -_versions >/dev/null 2>/dev/null; then \
- $(ECHO) 64-bit compiler; \
- $(ECHO) $($(MACH64)_CC); \
- $($(MACH64)_CC) -_versions 2>&1 | \
- $(EGREP) '^(cw|cc|gcc|primary|shadow)'; \
- else \
- __COMPILER=`$($(MACH64)_CC) -_compiler 2>/dev/null || $(TRUE)`;\
- if [ -z "$$__COMPILER" ]; then \
- $(ECHO) No 64-bit compiler found; \
- exit 1; \
- else \
- $(ECHO) 64-bit compiler; \
- $(ECHO) $($(MACH64)_CC); \
- $(ECHO) $$__COMPILER; \
- $($(MACH64)_CC) -V 2>&1 | head -1; \
- fi; \
- fi
java-version:
@if [ -x "$(JAVAC)" ]; then \
diff --git a/usr/src/Makefile.master b/usr/src/Makefile.master
index ce9e1fa..397e684 100644
--- a/usr/src/Makefile.master
+++ b/usr/src/Makefile.master
@@ -110,9 +110,9 @@ ONBLD_TOOLS= $(BUILD_TOOLS)/onbld
JAVA_ROOT= /usr/java
-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
@@ -462,15 +462,13 @@ CTF_FLAGS = $(CTF_FLAGS_32)
#
# Flags used with genoffsets
#
-GOFLAGS = -_noecho \
- $(CALLSYMS) \
- $(CDWARFSTR)
+GOFLAGS = $(CALLSYMS) $(CDWARFSTR)
OFFSETS_CREATE = $(GENOFFSETS) -s $(CTFSTABS) -r $(CTFCONVERT) \
- $(CC) $(GOFLAGS) $(CFLAGS) $(CPPFLAGS)
+ $(CW) --noecho $(CW_CC_COMPILERS) -- $(GOFLAGS) $(CFLAGS) $(CPPFLAGS)
OFFSETS_CREATE64 = $(GENOFFSETS) -s $(CTFSTABS) -r $(CTFCONVERT) \
- $(CC) $(GOFLAGS) $(CFLAGS64) $(CPPFLAGS)
+ $(CW) --noecho $(CW_CC_COMPILERS) -- $(GOFLAGS) $(CFLAGS64) $(CPPFLAGS)
#
# tradeoff time for space (smaller is better)
@@ -759,6 +757,14 @@ SPRO_ROOT= $(BUILD_TOOLS)/SUNWspro
SPRO_VROOT= $(SPRO_ROOT)/SS12
GNU_ROOT= /usr
+
+$(__GNUC)PRIMARY_CC= gcc4,$(GNUC_ROOT)/bin/gcc,gnu
+$(__SUNC)PRIMARY_CC= studio12,$(SPRO_VROOT)/bin/cc,sun
+$(__GNUC)PRIMARY_CCC= gcc4,$(GNUC_ROOT)/bin/g++,gnu
+$(__SUNC)PRIMARY_CCC= studio12,$(SPRO_VROOT)/bin/CC,sun
+CW_CC_COMPILERS= $(PRIMARY_CC:%=--primary %) $(SHADOW_CCS:%=--shadow %)
+CW_CCC_COMPILERS= $(PRIMARY_CCC:%=--primary %) $(SHADOW_CCCS:%=--shadow %)
+
# Till SS12u1 formally becomes the NV CBE, LINT is hard
# coded to be picked up from the $SPRO_ROOT/sunstudio12.1/
# location. Impacted variables are sparc_LINT, sparcv9_LINT,
@@ -769,42 +775,29 @@ GNU_ROOT= /usr
# Specify platform compiler versions for languages
# that we use (currently only c and c++).
#
-sparc_CC= $(ONBLD_TOOLS)/bin/$(MACH)/cw -_cc
-$(__GNUC)sparc_CC= $(ONBLD_TOOLS)/bin/$(MACH)/cw -_gcc
-sparc_CCC= $(ONBLD_TOOLS)/bin/$(MACH)/cw -_CC
-$(__GNUC)sparc_CCC= $(ONBLD_TOOLS)/bin/$(MACH)/cw -_g++
-sparc_CPP= /usr/ccs/lib/cpp
+CW= $(ONBLD_TOOLS)/bin/$(MACH)/cw
+BUILD_CC= $(CW) $(CW_CC_COMPILERS) --
+BUILD_CCC= $(CW) -C $(CW_CCC_COMPILERS) --
+BUILD_CPP= /usr/ccs/lib/cpp
+BUILD_LD= /usr/ccs/bin/ld
+BUILD_LINT= $(SPRO_ROOT)/sunstudio12.1/bin/lint
+$(MACH)_CC= $(BUILD_CC)
+$(MACH)_CCC= $(BUILD_CCC)
+$(MACH)_CPP= $(BUILD_CPP)
+$(MACH)_LD= $(BUILD_LD)
+$(MACH)_LINT= $(BUILD_LINT)
+$(MACH64)_CC= $(BUILD_CC)
+$(MACH64)_CCC= $(BUILD_CCC)
+$(MACH64)_CPP= $(BUILD_CPP)
+$(MACH64)_LD= $(BUILD_LD)
+$(MACH64)_LINT= $(BUILD_LINT)
+
sparc_AS= /usr/ccs/bin/as -xregsym=no
-sparc_LD= /usr/ccs/bin/ld
-sparc_LINT= $(SPRO_ROOT)/sunstudio12.1/bin/lint
-
-sparcv9_CC= $(ONBLD_TOOLS)/bin/$(MACH)/cw -_cc
-$(__GNUC64)sparcv9_CC= $(ONBLD_TOOLS)/bin/$(MACH)/cw -_gcc
-sparcv9_CCC= $(ONBLD_TOOLS)/bin/$(MACH)/cw -_CC
-$(__GNUC64)sparcv9_CCC= $(ONBLD_TOOLS)/bin/$(MACH)/cw -_g++
-sparcv9_CPP= /usr/ccs/lib/cpp
-sparcv9_AS= /usr/ccs/bin/as -xregsym=no
-sparcv9_LD= /usr/ccs/bin/ld
-sparcv9_LINT= $(SPRO_ROOT)/sunstudio12.1/bin/lint
-
-i386_CC= $(ONBLD_TOOLS)/bin/$(MACH)/cw -_cc
-$(__GNUC)i386_CC= $(ONBLD_TOOLS)/bin/$(MACH)/cw -_gcc
-i386_CCC= $(ONBLD_TOOLS)/bin/$(MACH)/cw -_CC
-$(__GNUC)i386_CCC= $(ONBLD_TOOLS)/bin/$(MACH)/cw -_g++
-i386_CPP= /usr/ccs/lib/cpp
+sparcv9_AS= $($(MACH)_AS)
+
i386_AS= /usr/ccs/bin/as
$(__GNUC)i386_AS= $(ONBLD_TOOLS)/bin/$(MACH)/aw
-i386_LD= /usr/ccs/bin/ld
-i386_LINT= $(SPRO_ROOT)/sunstudio12.1/bin/lint
-
-amd64_CC= $(ONBLD_TOOLS)/bin/$(MACH)/cw -_cc
-$(__GNUC64)amd64_CC= $(ONBLD_TOOLS)/bin/$(MACH)/cw -_gcc
-amd64_CCC= $(ONBLD_TOOLS)/bin/$(MACH)/cw -_CC
-$(__GNUC64)amd64_CCC= $(ONBLD_TOOLS)/bin/$(MACH)/cw -_g++
-amd64_CPP= /usr/ccs/lib/cpp
amd64_AS= $(ONBLD_TOOLS)/bin/$(MACH)/aw
-amd64_LD= /usr/ccs/bin/ld
-amd64_LINT= $(SPRO_ROOT)/sunstudio12.1/bin/lint
NATIVECC= $($(NATIVE_MACH)_CC)
NATIVECCC= $($(NATIVE_MACH)_CCC)
@@ -823,12 +816,6 @@ AS= $(NATIVEAS)
LD= $(NATIVELD)
LINT= $(NATIVELINT)
-# The real compilers used for this build
-CW_CC_CMD= $(CC) -_compiler
-CW_CCC_CMD= $(CCC) -_compiler
-REAL_CC= $(CW_CC_CMD:sh)
-REAL_CCC= $(CW_CCC_CMD:sh)
-
# Pass -Y flag to cpp (method of which is release-dependent)
CCYFLAG= -Y I,
diff --git a/usr/src/Makefile.master.64 b/usr/src/Makefile.master.64
index f671406..a06525b 100644
--- a/usr/src/Makefile.master.64
+++ b/usr/src/Makefile.master.64
@@ -63,9 +63,6 @@ AS= $($(MACH64)_AS)
LD= $($(MACH64)_LD)
LINT= $($(MACH64)_LINT)
-REAL_CC= $(CW_CC_CMD:sh)
-REAL_CCC= $(CW_CCC_CMD:sh)
-
BUILD.SO= $(CC) $(CFLAGS) -o $@ $(GSHARED) $(DYNFLAGS) \
$(PICS) $(EXTPICS) -L $(ROOTLIBDIR64) $(LDLIBS)