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. 64If 65no 66.Dq = Ns Ar value 67is given, a value of 1 will be used. 68Note that in order to request a 69translation as specified by 70.St -p1003.2 71you need to define 72.Dv _POSIX_SOURCE 73either in the source or using this option. 74The 75.Fl D 76option has lower precedence than the 77.Fl U 78option. 79That is, if 80.Ar name 81is used in both a 82.Fl U 83and a 84.Fl D 85option, 86.Ar name 87will be undefined regardless of the order of the options. 88The 89.Fl D 90option may be specified more than once. 91.It Fl E 92Copy C-language source files to the standard output, expanding all 93preprocessor directives; no compilation will be performed. 94.It Fl g 95Produce symbolic information in the object or executable files. 96.It Fl I Ar directory 97Change the algorithm for searching for headers whose names are not 98absolute pathnames to look in the directory named by the 99.Ar directory 100pathname before looking in the usual places. 101Thus, headers whose 102names are enclosed in double-quotes ("") will be searched for first 103in the directory of the file with the 104.Ic #include 105line, then in 106directories named in 107.Fl I 108options, and last in the usual places. 109For 110headers whose names are enclosed in angle brackets (<>), the header 111will be searched for only in directories named in 112.Fl I 113options and then in the usual places. 114Directories named in 115.Fl I 116options shall be searched in the order specified. 117The 118.Fl I 119option may be specified more than once. 120.It Fl L Ar directory 121Change the algorithm of searching for the libraries named in the 122.Fl l 123objects to look in the directory named by the 124.Ar directory 125pathname before looking in the usual places. 126Directories named in 127.Fl L 128options will be searched in the order specified. 129The 130.Fl L 131option may be specified more than once. 132.It Fl o Ar outfile 133Use the pathname 134.Ar outfile , 135instead of the default 136.Pa a.out , 137for the executable file produced. 138.It Fl O 139Optimize the compilation. 140.It Fl s 141Produce object and/or executable files from which symbolic and other 142information not required for proper execution has been removed 143(stripped). 144.It Fl U Ar name 145Remove any initial definition of 146.Ar name . 147The 148.Fl U 149option may be specified more than once. 150.El 151.Pp 152An operand is either in the form of a pathname or the form 153.Fl l 154library. 155At least one operand of the pathname form needs to be 156specified. 157Supported operands are of the form: 158.Bl -tag -offset indent -width "-l library" 159.It Ar file Ns Pa .c 160A C-language source file to be compiled and optionally linked. 161The 162operand must be of this form if the 163.Fl c 164option is used. 165.It Ar file Ns Pa .a 166A library of object files, as produced by 167.Xr ar 1 , 168passed directly to the link editor. 169.It Ar file Ns Pa .o 170An object file produced by 171.Nm Fl c , 172and passed directly to the link editor. 173.It Fl l Ar library 174Search the library named 175.Pa lib Ns Ar library Ns Pa .a . 176A library will be searched when its name is encountered, so the 177placement of a 178.Fl l 179operand is significant. 180.El 181.Sh SEE ALSO 182.Xr ar 1 , 183.Xr cc 1 184.Sh STANDARDS 185The 186.Nm 187command is believed to comply with 188.St -p1003.2 . 189