CEM(1L)

NAME
cem - ACK C compiler

SYNOPSIS
cem [ option ] ... file ...

DESCRIPTION
Cem is a cc (1)-like C compiler that uses the C front-end compiler cemcom (1) of the Amsterdam Compiler Kit. Cem interprets its arguments not starting with a '-' as source files, to be compiled by the various parts of the compilation process, which are listed below. File arguments whose names end with .character are interpreted as follows:

.[ao]
    object file.

.[ci]
    C source code

.e  EM assembler source file.

.k  compact EM file, not yet optimized by the EM peephole optimizer.

.m  compact EM file, already optimized by the peephole optimizer.

.s  assembler file.

The actions to be taken by cem are directed by the type of file argument and the various options that are presented to it.

The following set of options, which is a mixture of options interpreted by cc (1) and ack (?) are interpreted by cem . (The options not specified here are passed to the loader.)

-Bname
    Use name as front-end compiler instead of the default cemcom (1).
    Same as "-Rcem=name".

-C  Run C preprocessor /lib/cpp only and prevent it from eliding comments.

-Dname=def
    Define the name to the preprocessor, as if by "#define".

-Dname
    Same as "-Dname=1".

-E  Run only the macro preprocessor on the named files and send the result to standard output.

-Idir
    "#include" files whose names do not begin with '/' are always sought first in the directory of the file argument, then in directories in -I options, then in directories on a standard list (which in fact consists of "/usr/include").

-Ldir
    Use dir as library-containing directory instead of the default.

-Nc Only effective if ACK pipeline is used. This option causes some default actions and options to be suppressed, according to c :

    c   do not convert from EM a.out to local a.out format (i.e., skip the cv pass.)

    l   do not pass the default loader flags to the ld pass.

-P  Same as -E, but sending the result of input file file.[ceis] to file.i.

-R  Passed to cemcom(1) in order to parse the named C programs according to the C language as described in [K&R] (also called Restricted C).

-Rprog=name
    Use name as program for phase prog of the compilation instead of the default. Prog is one of the following names:

    cpp macro preprocessor

    cem front-end compiler

    opt EM peephole optimizer

    decode
        EM compact to EM assembler translator

    encode
        EM assembler to EM compact translator

    be  EM compact code to target-machine assembly code compiler

    cg  same as be

    as  assembler

    ld  linker/loader

    cv  a.out format converting program (only if ACK pipeline is used)

-Rprog-option
    Pass -option to the compilation phase indicated by prog.

-S  Same as -c.s.

-Uname
    Remove any initial definition of name.

-Vcm.n, -Vcm.ncm.n ...
    Set the size and alignment requirements of the C constructs of the named C input files. The letter c indicates the simple type, which is one of s(short), i(int), l(long), f(float), d(double) or p(pointer). The m parameter can be used to specify the length of the type (in bytes) and the n parameter for the alignment of that type. Absence of m or n causes the default value to be retained. To specify that the bitfields should be right adjusted instead of the default left adjustment, specify r as c parameter without parameters.
    This option is passed directly to cemcom(1).

-c  Same as -c.o.

-c.e
    Produce human-readable EM assembly code on file.e for the named files file.[cikm]

-c.k
    Compile C source file.[ci] or encode human-readable EM assembly code from file.e into non-optimized compact EM code and write the result on file.k

-c.m
    Compile C source file.[ci], translate non-optimized EM code from file.k or encode EM assembly code from file.e into optimized compact EM code and write the result on file.m

-c.o
    Suppress the loading phase of the compilation, and force an object file to be produced even if only one program is compiled

-c.s
    Compile the named file.[ceikm] input files, and leave the assembly language output on corresponding files suffixed ".s".

-k  Same as -c.k.

-lname
    Append the library libname.a to the list of files that should be loaded and linked into the final output file. The library is searched for in the library directory.

-m  Same as -c.m.

-o output
    Name the final output file output. If this option is used, the default "a.out" will be left undisturbed.

-p  Produce EM profiling code (fil and lin instructions to enable an interpreter to keep track of the current location in the source code)

-t  Keep the intermediate files, produced during the various phases of the compilation. The produced files are named file.character where character indicates the type of the file as listed before.

-v  Verbose. Print the commands before they are executed.

-vn Do not really execute (for debugging purposes only).

-vd Print some additional information (for debugging purposes only).

--anything
    Equivalent to -Rcem--anything. The options --C , --E and --P all have the same effect as respectively -C , -E and -P except for the fact that the macro preprocessor is taken to be the built-in preprocessor of the cem phase. Most "--" options are used by cemcom (1) to set some internal debug switches.

SEE ALSO
cemcom(1), cc(1), ack(?), as(1), ld(1)

[K&R]
    B.W. Kernighan and D.M. Ritchie, The C Programming Language, Prentice-Hall, 1978.

DIAGNOSTICS
Cem reports any failure of its components.

BUGS

•   All intermediate files are placed in the current working directory which causes files with the same name as the intermediate files to be overwritten.

•   Cem only accepts a limited number of arguments to be passed to the components. (e.g., 256).

•   Please report suggestions and other bugs to erikb@vu44.uucp