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

CC(l) USER COMMAI\1DS CC(l) 0 NAME cc - C compiler SYNOPSIS cc [ -c ] [ -g] [ -go] [ -w] [ -p] [ -pg] [ -O[optftags]] I -Aasmftags] [ -R] [ -fslngle ] [ -fsky ] [ -S ] [ -E ] [ -C ] [ -o output ] [ -D name=de/] [ -D name] [ -U name] [ -I dir] [ -8 string] [ -t [pOU]] file DESCRIPTION Cc is the UNIX C compiler which translates programs written in the C programming language into executable load modules, or into relocatable binary programs for subsequent loading with the ld(I) linker. OPTIONS The following options are interpreted by cc. See ld(l) for load-time options. -c Compile only:

suppress the loading phase of the compilation, and force an object file to be produced even if only one program is compiled. -1 Have the compiler produce additional symbol table information for dbx(l). Also pass the -lg flag to /d(l ). -10 Have the compiler produce additional symbol table information in an older format which is used by the adb(l) debugger. Also, pass the -lg flag to /d(l). -w Suppress warning messages. -p Produce profiling code to count the number of times each routine is called. If loading takes place, replace the standard startup routine by one that automatically calls moni- 0 tor(3) and use a special profiling library in lieu of the standard C library.

When the program is run, the file man.out is created. An execution profile can then be generated by use of pro/(1 ). -pg Produce profiling code in the manner of -p, but invokes a run-time recording mechan- ism that keeps more extensive statistics and produces a gmon.out file at normal termi- nation. gpro/(1) generates an execution profile. -0 [optftags] Use the object code optimizer to improve the generated code. If optftags appears, it is included in the command line used to run the optimizer. This can be used to pass it option flags. -Aasmftags Pass asmftags to as in its command line.

For example, -A-J can be used to pass the -J option, which causes the assembler to use short PC-relative instructions for subrou- tine calls. -R Passed on to as, making initialized variables shared and read-only. -fslngle Use single-precision arithmetic in computations involving only float numbers - that is, do not convert everything to double which is the default. Note that floating-point parameters are still converted to double-precision, and functions which return values still return double-precision values. Certain programs run much faster using this option, but be aware that some significance can be lost due to lower precision intermediate values.

-fsky Generate code which assumes the presence of a SKY floating-point processor board. Programs compiled with this option can only be run in systems that have a SKY board installed. Programs compiled without the -fsky option will use the SKY board if it is present, but won't run as fast as they would if the -fsky option were used. If any part of a program is compiled using the -fsky option, you must also use this option when 0 Sun Release 1.4 Last change: 15 August 1984 33