Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ cc — Apollo

Media Vault

Software Library

Restoration Projects

Artifacts Sought

CC                                  Aegis                                   CC




NAME
     cc - compile a C program

SYNOPSIS
      cc source_file [-align|-nalign] [-b [file] |-nb]
                              [-comchk|-ncomchk] [-cond|-ncond]
                              [-cpu id]
                              [-db|-dba|-dbs|-ndb]
                              [-def name[=value]
                              [-es|-esf [pathname]]
                              [-exp|-nexp] [-frnd]
                              [-idir pathname] [-indexl|-nindexl]
                              [-l|-nl [file]] [-map|-nmap]
                              [-mgbl|-nmgbl] [-opt [n]]
                              [-std|-nstd] [-systype type]
                              [-uline|-nuline] [-warn|-nwarn]

     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.
                    If the pathname ends with ".c",  you  need  not  specify
                    this suffix.    If  it  is  absent,  the  compiler
                    automatically appends ".c" to the pathname before  it
                    searches  for  the file.    This  argument  must precede
                    any options specified (except for .  -version, which does
                    not take a pathname).

OPTIONS
     Default options are indicated by "(D)".

     -align (D)     Aligns  data  on longword boundaries, which makes programs
                    execute  faster  on  DN460/660  nodes  (increases  size
                    of generated code slightly).

     -nalign        No longword alignment.

     -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 in
                    place 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.

     -comchk        Check for balanced comments and warn if not.

     -ncomchk (D)   Suppress comment checking.

     -cond          Compile lines prefixed with "#debug".

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

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

                    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.

                    any (D)        Generate  code  which  uses  only the basic
                                   instructions supported by the M68000.

                    fpa1           Directs the compiler to produce optimized
                                   code for the Floating-Point Accelerator
                                   (FPA) board that is available with DN4000
                                   workstations. Use of this switch can
                                   produce substantially faster code.  Do not
                                   use this switch, however, if the target
                                   machine does not have an FPA board.

                    fpx            Generate  code   for   the   Floating-Point
                                   Accelerator (FPX) unit.

                    peb            Generate code for a Performance Enhancement
                                   Board.

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

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

     -dbs           Generate  full  runtime debug tables with symbol table.

     -ndb           Suppress runtime debug tables.

     -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.

     -es            Write the pre-processed expanded source to standard
                    output.

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

     -exp           Generate expanded code listing (implies -l).

     -nexp (D)      Suppress expanded code listing.

     -frnd          Forces the compiler to write all floating-point operands
                    to memory and then fetch the memory contents before
                    evaluating  the  expression.  This  ensures that each
                    operand will have the same amount of precision so that
                    floating-point comparisons will  produce  correct
                    results.   If  you  do  not compile  with  -frnd,
                    floating-point operands may be kept in registers, which
                    support more accuracy than memory.  Consequently, when a
                    register  operand  is compared  with a memory operand, the
                    result may not be what is expected.  This is particularly
                    true of equality comparisons.

     -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 is:

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


     -indexl        Use 32 bit indexing for all array references.

     -nindexl (D)   Indexing based on dimension information.

     -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.

     -map           Generate symbol table map (implies -l).

     -nmap (D)      Suppress symbol table map.

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

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

     -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.

     -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.

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

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

     -systype type  Set UNIX system type.  Valid types are:

                                         sys5
                                         sys5.3
                                         bsd4.2
                                         bsd4.3
                                         any

                    When  specified,  this  option   sets   the   systype
                    and compilesystype  environment  variables for the life of
                    this compilation.

     -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.
                     .TP 1.5i -warn (D) Display warning messages.

     -nwarn         Suppress warning messages.

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