CC.1
资源名称:os_source.zip [点击查看]
上传用户:datang2001
上传日期:2007-02-01
资源大小:53269k
文件大小:4k
源码类别:
操作系统开发
开发平台:
C/C++
- .TH CC 1
- .SH NAME
- cc - C compiler
- .SH SYNOPSIS
- fBccfR [fB-STOUfcimosfR]fR [fB-w[aos]fR] [fB-v[n]fR] [fB-DfInamefR]* [fB-IfIdirfR]* [fB-LfIdirfR]* fIfilefR+ [fB-lfInamefR]*fR
- .br
- .de FL
- .TP
- \fB\$1\fR
- \$2
- ..
- .de EX
- .TP 20
- \fB\$1\fR
- # \$2
- ..
- .SH OPTIONS
- .FL "-D" "The flag fB-DfIx[=y]fR defines a macro fIxfR with (optional) value fIyfR"
- .FL "-I" "fB-IfIdirfR searches fIdirfR for include files"
- .FL "-L" "fB-LfIdirfR searches fIdirfR for fB-lfInamefR libraries"
- .FL "-O" "Optimize the code"
- .FL "-S" "Produce an assembly code file, then stop"
- .FL "-T" "The flag fB-TfIdirfR tells fIccfR and fIasfR to use fIdirfR for temporary files"
- .FL "-U" "Undefine a macro"
- .FL "-E" "Preprocess to standard output"
- .FL "-c" "Compile only. Do not link"
- .FL "-f" "Link with floating point emulation library"
- .FL "-i" "Use separate I & D space (64K + 64K) (*(Mp only)"
- .FL "-l" "The flag fB-lfInamefR causes the library libfInamefR.a to be linked"
- .FL "-m" "Remove unnecessary prototypes after preprocessing (*(Mp only)"
- .FL "-o" "Put output on file named by next arg"
- .FL "-s" "Strip the symbol-table from executable file"
- .FL "-v" "Verbose; print pass names"
- .FL "-vn" "fRVerbose; print pass names but do not run them"
- .FL "-w" "fRSuppress warning messages"
- .FL "-ws" "fRSuppress strict messages"
- .FL "-wa" "fRSuppress all warning and strict messages"
- .FL "-wo" "fRSuppress messages about old-style"
- .FL "-.o" "Do not link the default run-time start-off"
- .SH EXAMPLES
- .EX "cc -c file.c" "Compile fIfile.cfR"
- .EX "cc -DFOO file.c" "Treat the symbol fIFOOfR as defined"
- .EX "cc -wo -o out file.c" "Compile old-style code; output to fIoutfR"
- .SH DESCRIPTION
- ." .if t .ta 0.9i 1.25i 2.75i 3.25i 3.75i
- ." .if n .ta 10 15 39
- .PP
- This is the C compiler.
- It has eight passes, as follows:
- .PP
- .if t .ta 1.4i 2.1i 2.8i
- .if n .ta 13 21 30
- fBProgram Input Output Operation performedfR
- .br
- lib/ncpp prog.c prog.i C preprocessor: #include, #define, #ifdef
- .br
- lib/irrel prog.i prog.i Removal of unnecessary prototypes
- .br
- lib/ncem prog.i prog.k Parsing and semantic analysis
- .br
- lib/nopt prog.k prog.m Optimization of the intermediate code
- .br
- lib/ncg prog.m prog.s Code generation
- .br
- bin/as prog.s prog.o Assembly
- .br
- lib/ld prog.o prog.out Linking
- .br
- lib/cv prog.out a.out Conversion to s-1MINIXs0 a.out format
- .PP
- In the 68000 versions of s-1MINIXs0 , the preprocessor is not called since the
- front-end contains the preprocessor. This increases compilation speed.
- .PP
- The main program,
- .I cc ,
- forks appropriately to call the passes, transmitting flags and arguments.
- The fB-vfR flag causes the passes to be listed as they are called, and
- the fB-vnfR flag causes the passes to be listed but not called.
- .PP
- The libraries should be made with fIaalfR (which is the same as fIarfR on the
- 68000 versions), and consist of .o files. The internal order of files
- inside the library is unimportant, but the order in which the libraries are
- specified is.
- .PP
- .PP
- When fB-TfR is used, the intermediate files end up in the directory
- specified. Otherwise,
- .B /tmp
- is used.
- When available memory is very limited (e.g., a 512K machine), it may be
- necessary to run
- .I chmem
- to reduce the sizes of the compiler passes that do not fit, typically
- .I ncem .
- .PP
- On the other hand,
- if the compiler (or, in fact, almost any program)
- begins acting strange, it is almost always due to its running
- out of space, either stack space or scratch file space.
- The relevant pass can be given more stack space using
- .I chmem .
- More space for scratch files can be obtained
- by removing other files on the device.
- .PP
- If the compiler runs out of memory, it may be necessary to use the
- fB-mfR flag. This causes
- .I irrel
- to be run, which removes unnecessary prototypes and thus frees up
- extra table space within the compiler.
- Beware, however,
- that running this pass may cause strictly conforming programs to become
- non-conforming and vice versa, so you should only run this pass as a last
- resort.
- .PP
- The compiler is derived from the ACK system (Tanenbaum et
- al., fICommunications of the ACMfR, Sept. 1983),
- not from the AT&T portable C compiler.
- It has been shoehorned onto the PC with some loss of performance.
- .SH "SEE ALSO"
- .BR make (1).