Print this page
cw: don't shadow pure pre-processing
cw(1onbld): --shadow not --secondary

Split Close
Expand all
Collapse all
          --- old/usr/src/tools/cw/cw.1onbld.man.txt
          +++ new/usr/src/tools/cw/cw.1onbld.man.txt
↓ open down ↓ 9 lines elided ↑ open up ↑
  10   10  DESCRIPTION
  11   11       cw is a facility for invoking one or more compilers, providing
  12   12       translation from Sun style arguments as appropriate.  This allows the use
  13   13       of arbitrary compilers without the need to alter large numbers of
  14   14       makefiles.  A mode called shadow compilation invokes multiple compilers
  15   15       so that warnings and errors may be obtained from both.  See SHADOW
  16   16       COMPILATION for details.  This version of cw supports compilers with both
  17   17       Sun Studio 12 and GCC-style command lines.
  18   18  
  19   19  ARGUMENTS
  20      -     Both the --primary and --secondary parameters take a compiler
  21      -     specification.  This is a comma-separated list of the form
  22      -     name,executable,style Where name is a name for the compiler, executable
  23      -     is the full path to the compiler executable, and style is the style of
  24      -     command-line options the compiler expects, either sun or gnu.
       20 +     Both the --primary and --shadow parameters take a compiler specification.
       21 +     This is a comma-separated list of the form name,executable,style Where
       22 +     name is a name for the compiler, executable is the full path to the
       23 +     compiler executable, and style is the style of command-line options the
       24 +     compiler expects, either sun or gnu.
  25   25  
  26   26       --primary compiler
  27   27               Specify the compiler to be used primarily (that which is used for
  28   28               link-editing and pre-processing, and whos objects we deliver).
  29   29  
  30   30       --shadow compiler
  31   31               Specify a shadow compiler, which builds sources for the sake of
  32   32               checking code quality and compatibility, but has its output
  33   33               discarded.
  34   34  
↓ open down ↓ 22 lines elided ↑ open up ↑
  57   57               such that a style of sun may use the flag -_cc= and a style of
  58   58               gnu may use the flag -_gcc=, and when the -C option is given and
  59   59               C++ is in use the style of sun may use the flag -_CC= and the
  60   60               style of gnu may use the flag -_g++=.
  61   61  
  62   62  SHADOW COMPILATION
  63   63       If --shadow compilers are specified cw will invoke shadow compiler, with
  64   64       the outputs modified (as well as any translation for compiler style) as
  65   65       follows:
  66   66  
  67      -     1.   If none of -c, -E, -P, or -S appears in the argument list (that is,
  68      -          linking is attempted), the shadow compilers will not be invoked.
  69      -          This is because the objects built with that compiler which would be
  70      -          linked have been previously discarded.
       67 +     1.   If neither of -c, -S appears in the argument list (that is, linking
       68 +          is attempted or only the pre-processor is invoked), the shadow
       69 +          compilers will not be invoked.
  71   70  
  72   71       2.   If the -o filename option was provided, with or without a separating
  73   72            space, it will be replaced with -o tempfile
  74   73  
  75   74       3.   If the option -o was not provided, -o tempfile will be added to the
  76   75            end of the argument list used to invoke the shadow compilers.
  77   76       When shadow compilation is in effect, cw writes to standard error each
  78   77       compiler's standard error output following its argument list.  Messages
  79   78       from the compilers will not be interleaved.  If cw is used to invoke the
  80   79       preprocessor and no output location is specified, cw will write to
  81      -     standard output the primary compiler's standard output, and the secondary
  82      -     compiler's standard output will be discarded.
       80 +     standard output the primary compiler's standard output.
  83   81  
  84   82       Because the Sun compilers write intermediate objects to fixed filenames
  85   83       in the current directory when instructed to compile and link multiple
  86   84       source files via a single command line, it would be unsafe to invoke more
  87   85       than one compiler in this fashion.  Therefore cw does not accept multiple
  88   86       source files unless the preprocessor is to be invoked.  An attempt to
  89   87       invoke cw in this manner will result in an error.
  90   88  
  91   89  ARGUMENT TRANSLATION
  92   90       If the compiler to be invoked is a GNU-style C or C++ compiler, a set of
↓ open down ↓ 39 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX