Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ cc — Apollo

Media Vault

Software Library

Restoration Projects

Artifacts Sought

4.65;cc (c_compiler), revision 4.65, 86/12/04
CC (C_COMPILER) -- Compile a C program.
usage:  CC source_file [-NL|-L [file]] [-B [file] |-NB] [-NMAP|-MAP]
                                        [-NSTD|-STD] [-NEXP|-EXP]
                                        [-DB|-DBS|-DBA|-NDB] [-NCOND|-COND]
                                        [-MGBL|-NMGBL] [-NINDEXL|-INDEXL] [-OPT
                                        [n]] [-CPU id] [-WARN|-NWARN] [-DEF
                                        name[=value]] [-IDIR pathname] [-ES|-ESF
                                        [pathname]] [-NULINE|-ULINE]
                                        [-NCOMCHK|-COMCHK] [-NALIGN|-ALIGN]
                                        [-SYSTYPE type]


FORMAT

  CC source_file [options]


  The C compiler translates a C source module into a binary object module, which
  can be executed or used as input to the binder.  Source files may be a maximum
  of 32000 lines long.  For more information on the C compiler, see the DOMAIN C
  Language Reference.

  NOTE: There is a homonymous DM command: CC (CREATE_COPY) -- Create a  copy  of
        an existing window.  Type "HELP CC_DM" for details.


ARGUMENTS

  source_file
  (required)          Specify  the  pathname  of the source file to be compiled.
                     The pathname must end with ".C", but you need  not  specify
                     this   component.      If   it   is  absent,  the  compiler
                     automatically  appends  ".C"  to  the  pathname  before  it
                     searches  for  the  file.    This argument must preceed any
                     options specified.


OPTIONS

  Default options are indicated by "(D)."

  -L [file]          Generate compilation listing.  If no pathname is specified,
                     the  listing is written to a file with the same name as the
                     source file, but with the suffix .LST replacing .C.

  -NL          (D)   Suppress compilation listing.

  -B [file]    (D)   Generate binary file.  The optional  pathname  specifies  a
                     name  for  the  output  file. If you omit the pathname, the
                     compiler appends .BIN to the source file's name instead  of
                     .C, and writes the binary to that file.  If the compilation
                     fails due to a fatal error in the source  code,  no  binary
                     file  (file.BIN)  is produced, and any existing binary file
                     is renamed file.BIN.BAK.  The .BAK version is deleted  upon
                     successful  compilation.   This prevents a corrupted binary
                     from overwriting a previous working version.

  -NB                Suppress binary file.

  -MAP               Generate symbol table map (implies -L).

  -NMAP        (D)   Suppress symbol table map.

  -STD               Flag usage of non-standard features with warnings.

  -NSTD        (D)   No warnings for usage of non-standard features.

  -EXP               Generate expanded code listing (implies -L).

  -NEXP        (D)   Suppress expanded code listing.

  -DB          (D)   Generate runtime debug tables without symbol table.

  -DBS               Generate full runtime debug tables with  symbol  table.  If
                     this  option  is  specified,  -OPT 3 is also set.  (You may
                     override this by specifying -OPT 0.)

  -DBA               Identical to -DBS except that no optimization is  performed
                     (i.e.,  -OPT  0  is  set).   This prevails even if you also
                     specify -OPT.

  -NDB               Suppress runtime debug tables.

  -COND              Compile lines prefixed with "#debug".

  -NCOND       (D)   Ignore lines prefixed with "#debug".

  -MGBL        (D)   Map globals names on output to maintain case sensitivity.

  -NMGBL             Do not map global names; output all names in upper case.

  -INDEXL            Use 32 bit indexing for all array references.

  -NINDEXL     (D)   Indexing based on dimension information.

  -OPT [n]     (D)   Perform global optimization. 'n' is a single digit  integer
                     in  the  range 0 to 4, indicating the level of optimization
                     performed. -OPT 0  is  identical  to  the  obsolete  switch
                     -NOPT.    If  'n'  is  omitted,  3  is  the  default level.
                     Increasing  the  optimization  level  results   in   faster
                     execution  of  your  program,  at  the  expense  of  longer
                     compilation time.  See  the  DOMAIN  C  Language  Reference
                     manual for details.

                     NOTE: At SR9.5, -OPT 3 and -OPT 4 are equivalent.

  -NOPT              Suppress global optimization. Obsolete switch. Use -OPT 0.

  -PEB                Generate  inline  code  for Performance Enhancement Board.
                     Obsolete switch.  Use -CPU PEB.

  -NPEB        (D)   No inline code for Performance Enhancement Board.  Obsolete
                     switch.  Use -CPU ANY.

  -CPU id            Generate code for a particular class of processors.  Values
                     for id are

                     ANY      (D)    Generate code which  uses  only  the  basic
                                     instructions supported by the M68000.
                     160,460,660     Generate  code  which  uses  the additional
                                     instructions supported by DNx60 (except the
                                     DN560) and DSP160 processors.
                     90, 330, 560, 570, 580, 3000
                                     Generate code  which  uses  the  additional
                                     instructions supported by the DSP90, DN330,
                                     DN560, DN570, DN580, and DN3000 processors.
                     PEB             Generate code for a Performance Enhancement
                                     Board.

  -WARN        (D)   Display warning messages.

  -NWARN             Suppress warning messages.

  -DEF name[=value]
                     Define  a  name,  with   an   optional   value,   for   the
                     preprocessor.    The default value is 1. Spaces may be used
                     in the definition only if the entire definition is enclosed
                     in quotes.  Up to 128 -DEF options may be given.

  -IDIR pathname
                     Add a pathname to the search hierarchy of  directories  for
                     include  file  names.    The hierarchy applies only to file
                     name string which do NOT begin with begin with '.', '~', or
                     '/'.    Up to 63 -IDIR options may be given.  The hierarchy
                     is:

                     "quoted_file" ----->  |  the working directory;
                     <bracketed_file> -->  |  -IDIR directories, if any;
                                           V  /usr/include/

  -ES                Write the pre-processed expanded source to standard output

  -ESF [pathname]
                     Write the pre-processed expanded source to a file.

  -ULINE       (D)   Recognize "#line" preprocessor options for source file line
                     numbering.  The compiler will report errors in terms of the
                     line  numbers set by this option.  The debugger line number
                     table will be built with these line numbers.

  -NULINE            Ignore "#line" preprocessor options.

  -COMCHK            Check for balanced comments and warn if not.

  -NCOMCHK     (D)   Suppress comment checking.

  -ALIGN       (D)   Makes program execute faster on DN460/660 nodes  (increases
                     size of generated code slightly).

  -NALIGN            No longword alignment.

  -SYSTYPE type
                     Set DOMAIN/IX system type.  Valid types are:

                     sys3
                     sys5
                     bsd4.1
                     bsd4.2
                     any

                     When  specified,  this  option   sets   the   SYSTYPE   and
                     COMPILESYSTYPE  environment  variables for the life of this
                     compilation.    Consult  the  DOMAIN/IX  User's  Guide  for
                     additional information.


EXAMPLES

  If  there  were  no  errors  in  the source code and the compilation proceeded
  normally, the C compiler outputs an object module file and an optional listing
  file.    Unless  you specify otherwise (with the -B switch), the object module
  file has the same name as the source file, except that .BIN replaces .C as the
  suffix.    Similarly,  .LST  replaces  .C  in the listing file name.  Thus, in
  response to the command:

    $ CC plot_data -L

  the C compiler reads the file PLOT_DATA.C, and produces an object module  file
  named  PLOT_DATA.BIN  and a listing file named PLOT_DATA.LST.  If errors occur
  during compilation, the compiler writes diagnostic messages  to  error  output
  and flags the incorrect statements in the listing file.

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026