File:  [MW Coherent from dump] / coherent / a / usr / man / ALL / cc
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Wed May 29 04:56:34 2019 UTC (7 years ago) by root
Branches: MarkWilliams, MAIN
CVS tags: relic, HEAD
coherent



cc                           Command                           cc




Compiler controller

cccc [_c_o_m_p_i_l_e_r _o_p_t_i_o_n_s] _f_i_l_e .... [_l_i_n_k_e_r _o_p_t_i_o_n_s]

cc is  the program that  controls compilation of  C programs.  It
guides files of source and object code through each phase of com-
pilation and linking.  cccc has  many options to assist in the com-
pilation of  C programs; in essence, however, all  you need to do
to  produce an  executable file  from your C  program is  type cccc
followed by the name of the file or files that hold your program.
It  checks whether  the file  names you  give it  are reasonable,
selects the  right phase for each file,  and performs other tasks
that ease the compilation of your programs.

***** File Names *****

cc  assumes that each  file name  that ends  in .c or  .h is  a C
program and passes it to the C compiler for compilation.

cc assumes  that each file  argument that ends  in .s is  in Mark
Williams assembly  language and  processes it with  the assembler
as.

cc also passes all files with  the suffixes .o or .a unchanged to
the linker ld.

***** How cc Works *****

cc normally works as follows: First, it compiles or assembles the
source files, naming  the resulting object files by replacing the
.cc or .ss suffixes with the  suffix .oo.  Then, it links the object
files  with the  C  runtime startup  routine and  the standard  C
library, and leaves the result  in file _f_i_l_e.  If only one object
file is created  during compilation, it is deleted after linking;
however, if more than one object file is created, or if an object
file of  the same name existed before you  began to compile, then
the object file or files are not deleted.

***** Options *****

The following lists  all of cccc's command-line options.  cc passes
some options  through to the  linker ld unchanged,  and correctly
interprets to it the options -oo and -uu.

A number  of the options  are esoteric and normally  are not used
when compiling a C  program.  The following are the most commonly
used options:


         -cc      Compile only; do not link
         -ff      Include floating-point pprriinnttff
         -ll_n_a_m_e  Pass library lliibb_n_a_m_e.aa to linker
         -oo _n_a_m_e Call output file _n_a_m_e
         -VV      Print verbose listing of cccc's action


COHERENT Lexicon                                           Page 1




cc                           Command                           cc





-AA  MicroEMACS option.  If an error occurs during compilation, cc
    automatically invokes the  MicroEMACS screen editor.  The er-
    ror or errors are displayed in one window and the source code
    file in the other, with the cursor set to the line number in-
    dicated by  the first error message.   Typing <ctrl-X>> moves
    to the next error, <ctrl-X>< moves to the previous error.  To
    recompile, close the  edited file with <ctrl-Z>.  Compilation
    will continue  either until the program  compiles without er-
    ror, or  until you  exit from  the editor by  typing <ctrl-U>
    followed by <ctrl-X><ctrl-C>.

-BB[_s_t_r_i_n_g]
    Backup option.   Use alternate  versions of the  compiler for
    cc0, cc1,  cc2, and cc3.  If string  is supplied, cc prepends
    it to  the names of  the phases of  the compiler to  form the
    pathnames where these  are found.  Otherwise, cc prepends the
    name of the current directory.  If a -t option was previously
    given, only the parts of the compiler specified by it are af-
    fected.  Any  number of -B  and -t options may  be used, with
    each -t  option specifying the passes  affected by the subse-
    quent -B option.  For example, the command

        cc -tp2 -Bnew hello.c

    compiles hheelllloo.cc using nneewwcccc22 in place of the ordinarily used
    /lliibb/cccc22, and  using nneewwccpppp in  place of the  ordinarily used
    /lliibb/ccpppp.

-cc  Compile option.  Suppress  linking and the removal of the ob-
    ject files.

-DD_n_a_m_e[=_v_a_l_u_e]
    Define  name to  the  preprocessor, as  if set  by a  #define
    directive.  If value is present, it is used to initialize the
    definition.

-EE  Expand option.  Run the C preprocessor ccpppp and write its out-
    put onto the standard output.

-ff  Floating point option.  Include library routines that perform
    floating-point   arithmetic.    Because  the   floating-point
    routines require approximately  five kilobytes of memory, the
    standard C library does not include them; the -ff option tells
    the  compiler to  include  them.  If  a  program is  compiled
    without the -ff option  but attempts to print a floating point
    number  during  execution by  using  the e,  f,  or g  format
    specifications to printf, the message

        You must compile with -f option for floating point

    will be printed and the program will exit.




COHERENT Lexicon                                           Page 2




cc                           Command                           cc



-II _n_a_m_e
    IInclude option.  Specify  a directory the preprocessor should
    search  for files  given  in #include  directives, using  the
    following criteria: If the #iinncclluuddee statement reads

        #include "file.h"

    cccc searches for ffiillee.hh first in the source directory, then in
    the directory named in  the -II_n_a_m_e option, and finally in the
    system's  default  directories.   If the  #iinncclluuddee  statement
    reads

        #include <file.h>

    cccc searches for ffiillee.hh  first in the directories named in the
    -II_n_a_m_e option, and  then in the system's default directories.
    Multiple -II_n_a_m_e options are executed in the order of their of
    appearance.

-KK  Keep  option.  Do not erase  the intermediate files generated
    during compilation.  Temporary files will be written into the
    current directory.

-ll _n_a_m_e
    llibrary option.   Pass the name  of a library  to the linker.
    cc  expands -lname  into /lliibb/lliibb_n_a_m_e.aa.   If  an alternative
    library prefix has been specified by the -tl and -Bstring op-
    tions,  then -lname  expands to  stringlliibbname.aa.   Note that
    this is a linker option, and so must appear at the end of the
    cc command line, or it will not be processed correctly.

-MM _s_t_r_i_n_g
    Machine option.  Use  an alternate version of cc0, cc1, cc1a,
    cc1b,  cc2, cc3,  as, lib*.a,  and  crts0.o, named  by fixing
    string  between the  directory  name and  the  pass and  file
    names.

-nn   Instruct the  linker  ld to  bind the  output with  separate
    shared  and private  segments, and which  each starting  on a
    separate  hardware-segment  boundary.   This  allows  several
    processes to  simultaneously use one copy  of the shared seg-
    ment.  Note that programs  linked with this option will run a
    little more slowly than  if they were not so linked; however,
    if a  program forks  (e.g., kkeerrmmiitt) or  will be used  by more
    than  one user  at a time  (e.g., MicroEMACS),  this slightly
    slower time  will be more than offset  by the program's being
    spared having to read an entire copy of itself from the disk.

-NN[pp00112233ssddllrrtt]_s_t_r_i_n_g
    Name option.  Rename a specified pass to string.  The letters
    p0123sdlrt refer,  respectively, to cpp, cc0,  cc1, cc2, cc3,
    the assembler, the linker, the libraries, the run-time start-
    up, and the temporary files.




COHERENT Lexicon                                           Page 3




cc                           Command                           cc



-oo _n_a_m_e
    Output option.   Rename the executable file  from the default
    to _n_a_m_e.  If this option  is not used, the executable will be
    named after the first .cc or .oo file on the command line.

-OO  Optimize  option.  Run the  code generated by  the C compiler
    through the  peephole optimizer.  The optimizer  pass is man-
    datory for  the i8086, Z8000, and  M68000 compilers, and need
    not be requested.  It is optional for the PDP11 compiler, but
    is recommended  for all files  except those that  consist en-
    tirely of initialized tables of data.

-qq[pp00112233ss]
    Quit  option.    Terminate  compilation  after   running  the
    specified pass.   The letters pp00112233ss  refer, respectively, to
    cpp, cc0, cc1, cc2,  cc3, and the assembler.  For example, to
    terminate compilation after running the parser cc0, type -qq00.

-QQ  Quiet option.  Suppress all messages.

-SS  Suppress  the object-writing and link  phases, and invoke the
    disassembler cc3.  This  option produces an assembly-language
    version of a C program for examination, for example if a com-
    piler  problem is  suspected.   The assembly-language  output
    file name replaces the .c suffix with .s.  This is equivalent
    to the -VVAASSMM option.

-tt[pp0011aabb2233ssddllrrtt]
    Take option.   Use alternate versions of  the compiler phases
    and  other files  specified in the  following string.   If no
    following string  is given, the cccc  uses alternate version of
    every phase of the compiler, except the preprocessor.  If the
    -tt option is followed by  a -BB option, cccc prepends the prefix
    string named  in the -BB option to the  phases and files named
    in the  -tt option; otherwise, the it  looks for the alternate
    forms in the current directory.

-UU _n_a_m_e
    Undefine symbol  name.  Use  this option to  undefine symbols
    that the preprocessor defines implicitly, such as the name of
    the native system or machine.

-VV  Verbose  option.  cccc prints onto the  standard output a step-
    by-step description of each action it takes.

VV_s_t_r_i_n_g
    Variant option.   Toggle (i.e., turn  on or off)  the variant
    _s_t_r_i_n_g during  the compilation.  Variants that  are marked oonn
    are turned  on by  default.  Options marked  SSttrriicctt: generate
    messages that warn  of the conditions in question.  cc recog-
    nizes the following variants:

-VVAASSMM
   Output assembly-language code.  Identical to -SS option, above.
   It can  be used with  the -VVLLIINNEESS option,  described below, to


COHERENT Lexicon                                           Page 4




cc                           Command                           cc



   generate a  line-numbered file of  assembly language.  Default
   is ooffff.

-VVCCOOMMMM
   Permit .ccoomm-style data items.  Default is oonn.

-VVFFLLOOAATT
   Include floating  point pprriinnttff  routines.  Same as  -f option,
   above.

-VVLLIINNEESS
   Generate line number information.  Can be used with the option
   -VVAASSMM, described  above, to generate  assembly language output
   that uses line numbers.  Default is ooffff.

-VVQQUUIIEETT
   Suppress all  messages.  Identical  to -Q option.   Default is
   ooffff.

-VVSSBBOOOOKK
   Strict: note  deviations from _T_h_e _C  _P_r_o_g_r_a_m_m_i_n_g _L_a_n_g_u_a_g_e, ed.
   1.  Default is ooffff.

-VVSSCCCCOONN
   Strict: note constant conditional.  Default is ooffff.

-VVSSIINNUU
   Implement  struct-in-union  rules  instead of  Berkeley-member
   resolution rules.   Default is  ooffff, i.e., Berkeley  rules are
   the default.

-VVSSLLCCOONN
   Strict:  iinntt constant  promoted to lloonngg  because value  is too
   big.  Default is oonn.

-VVSSMMEEMMBB
   Strict: check use  of structure/union members for adherence to
   standard rules of C.  Default is oonn.

-VVSSNNRREEGG
   Strict: register declaration reduced to auto.  Default is oonn.

-VVSSPPVVAALL
   Strict: pointer value truncated.  Default is ooffff.

-VVSSRRTTVVCC
   Strict: risky types in truth contexts.  Default is ooffff.

-VVSSTTAATT
   Give statistics on optimization.

-VVSS
   Turn on all strict checking.  Default is oonn.




COHERENT Lexicon                                           Page 5




cc                           Command                           cc



-VVSSUURREEGG
   Strict: note unused registers.  Default is ooffff.

-VVSSUUVVAARR
   Strict: note unused variables.  Default is oonn.

-VV33GGRRAAPPHH
   Translate ANSI trigraphs.  Default is ooffff.

***** See  Also *****  as, C language,  cc0, cc1, cc2,  cc3, com-
mands, cpp, ld
_T_h_e _C _L_a_n_g_u_a_g_e, tutorial













































COHERENT Lexicon                                           Page 6



unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.