1.\" 2.\" Copyright (c) 1997 Joerg Wunsch 3.\" 4.\" All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright 10.\" notice, this list of conditions and the following disclaimer. 11.\" 2. Redistributions in binary form must reproduce the above copyright 12.\" notice, this list of conditions and the following disclaimer in the 13.\" documentation and/or other materials provided with the distribution. 14.\" 15.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR 16.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, 19.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25.\" 26.\" $FreeBSD$ 27.\" " 28.Dd September 17, 1997 29.Os 30.Dt C89 1 31.Sh NAME 32.Nm c89 33.Nd POSIX.2 C language compiler 34.Sh SYNOPSIS 35.Nm 36.Op Fl c 37.Op Fl D Ar name Ns Op = Ns Ar value 38.Ar ... 39.Op Fl E 40.Op Fl g 41.Op Fl I Ar directory ... 42.Op Fl L Ar directory ... 43.Op Fl o Ar outfile 44.Op Fl O 45.Op Fl s 46.Op Fl U Ar name ... 47.Ar operand ... 48.Sh DESCRIPTION 49This is the name of the C language compiler as required by the 50.St -p1003.2 51standard. 52.Pp 53The 54.Nm 55compiler accepts the following options: 56.Bl -tag -width indent 57.It Fl c 58Suppress the link-edit phase of the compilation, and do not remove any 59object files that are produced. 60.It Fl D Ar name Ns Op = Ns Ar value 61Define name as if by a C-language 62.Ic #define 63directive. If 64no 65.Dq = Ns Ar value 66is given, a value of 1 will be used. 67Note that in order to request a 68translation as specified by 69.St -p1003.2 70you need to define 71.Dv _POSIX_SOURCE 72either in the source or using this option. The 73.Fl D 74option has lower precedence than the 75.Fl U 76option. That is, if 77.Ar name 78is used in both a 79.Fl U 80and a 81.Fl D 82option, 83.Ar name 84will be undefined regardless of the order of the options. The 85.Fl D 86option may be specified more than once. 87.It Fl E 88Copy C-language source files to the standard output, expanding all 89preprocessor directives; no compilation will be performed. 90.It Fl g 91Produce symbolic information in the object or executable files. 92.It Fl I Ar directory 93Change the algorithm for searching for headers whose names are not 94absolute pathnames to look in the directory named by the 95.Ar directory 96pathname before looking in the usual places. Thus, headers whose 97names are enclosed in double-quotes ("") will be searched for first 98in the directory of the file with the 99.Ic #include 100line, then in 101directories named in 102.Fl I 103options, and last in the usual places. For 104headers whose names are enclosed in angle brackets (<>), the header 105will be searched for only in directories named in 106.Fl I 107options and then in the usual places. Directories named in 108.Fl I 109options shall be searched in the order specified. The 110.Fl I 111option may be specified more than once. 112.It Fl L Ar directory 113Change the algorithm of searching for the libraries named in the 114.Fl l 115objects to look in the directory named by the 116.Ar directory 117pathname before looking in the usual places. Directories named in 118.Fl L 119options will be searched in the order specified. The 120.Fl L 121option may be specified more than once. 122.It Fl o Ar outfile 123Use the pathname 124.Ar outfile , 125instead of the default 126.Pa a.out , 127for the executable file produced. 128.It Fl O 129Optimize the compilation. 130.It Fl s 131Produce object and/or executable files from which symbolic and other 132information not required for proper execution has been removed 133(stripped). 134.It Fl U Ar name 135Remove any initial definition of 136.Ar name . 137The 138.Fl U 139option may be specified more than once. 140.El 141.Pp 142An operand is either in the form of a pathname or the form 143.Fl l 144library. At least one operand of the pathname form needs to be 145specified. Supported operands are of the form: 146.Bl -tag -offset indent -width "-l library" 147.It Ar file Ns Pa .c 148A C-language source file to be compiled and optionally linked. The 149operand must be of this form if the 150.Fl c 151option is used. 152.It Ar file Ns Pa .a 153A library of object files, as produced by 154.Xr ar 1 , 155passed directly to the link editor. 156.It Ar file Ns Pa .o 157An object file produced by 158.Nm Fl c , 159and passed directly to the link editor. 160.It Fl l Ar library 161Search the library named 162.Pa lib Ns Ar library Ns Pa .a . 163A library will be searched when its name is encountered, so the 164placement of a 165.Fl l 166operand is significant. 167.El 168.Sh SEE ALSO 169.Xr ar 1 , 170.Xr cc 1 171.Sh STANDARDS 172The 173.Nm 174command is believed to comply with 175.St -p1003.2 . 176