Print this page
9128 cw(1onbld) should be able to run multiple shadows
9129 file-locking tests shouldn't build multiple source files in one compiler invocation
9130 DTrace tst.gcc.d isn't useful
9132 cw(1onbld) shouldn't shadow pure preprocessing
Reviewed by: Andy Fiddaman <omnios@citrus-it.net>

@@ -23,11 +23,11 @@
 # Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
 # Copyright (c) 2012 by Delphix. All rights reserved.
 # Copyright 2014 Garrett D'Amore <garrett@damore.org>
 # Copyright 2015 OmniTI Computer Consulting, Inc. All rights reserved.
 # Copyright 2016 Toomas Soome <tsoome@me.com>
-# Copyright 2017 Joyent, Inc.
+# Copyright 2018 Joyent, Inc.
 # Copyright 2018 OmniOS Community Edition (OmniOSce) Association.
 #
 
 #
 # Makefile for system source

@@ -235,51 +235,16 @@
 cscope.out tags: FRC
         $(XREF) -f -x $@
 
 FRC:
 
-#
-# Targets for reporting compiler versions; nightly uses these.
-#
-
+# used by nightly
 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                     \
                 $(ECHO) $(JAVAC);                       \
                 $(JAVA_ROOT)/bin/java -fullversion 2>&1 | head -1;      \