Sun Microsystems Sun Workstation — Sun Workstation 1.4 Manual: Release Notes, Installation, Troubleshooting

CC(l) USER COMMANDS CC(l) linking with the cc command, since a different set of startup routines is used. 0 -S Compile the named C programs, and leave the assembler-language output on corresponding files suffixed '.s'. -E Run only the C preprocessor on the named C programs, and send the result to the stan- dard output. -C Prevent the C preprocessor from removing comments. -o output Name the final output file output. If this option is used, the file a.out is left undis- turbed. -Dname=de/ -Dname Define name to the preprocessor, as if by '#define'. If no definition is given, the name is defined as "l". -Uname Remove any initial definition of name.

-Idir '#include' files whose names do not begin with '/' are always sought first in the direc- tory of the file argument, then in directories named in -I options, then in the /usr/include directory. -Bstring Find substitute compiler passes in the files named string with the suffixes cpp, ccom and c2. If string is empty, use a standard backup version. -t[pOUJ 0 Find only the designated compiler passes in the files whose names are constructed by a -B option. In the absence of a -B option, the string is taken to be / usr/ new/. The letter /number combinations that can be specified for the -t option have the meanings: p cpp - the C preprocessor.

0 ccom - both phases of the C compiler, but not the optimizer. 1 Ignored in this system - this option would be for the second phase of a two-phase compiler but in the Sun system, ccom includes both phases. 2 c2 - the object code optimizer. In addition to the many options, cc accepts several types of files. Files whose names end with .c are taken to be C source programs; they are compiled, and each resulting object program is left in the current directory, with the same name as the source file, except that the .c suffix is replaced by .o. In the same way, files whose names end with .s are taken to be assembly source programs and are assembled, producing a .o file.

Other arguments are taken to be loader option arguments, object programs, or libraries of object programs. Unless -c, -S, or -E is specified, these programs and libraries, together with the results of any compilations or assemblies specified, are loaded (in the order given) to produce an executable program named a.out. The name a.out can be overridden with the loader's -oname option. Ir a single C program is compiled and loaded all at once, the intermediate .o file is deleted. Fll,ES file.c file.s file.o file.a a.out C source file assember source file object file library of object files executable output file 0 34 Last change: 15 August Hl84 Sun Release 1.4