xref: /freebsd/usr.bin/c99/c99.1 (revision 2e3f49888ec8851bafb22011533217487764fdb0)
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.\" From FreeBSD: src/usr.bin/c89/c89.1,v 1.11 2007/03/10 07:10:01 ru Exp
27.\"
28.Dd July 13, 2015
29.Dt C99 1
30.Os
31.Sh NAME
32.Nm c99
33.Nd standard C language compiler
34.Sh SYNOPSIS
35.Nm
36.Op Fl cEgs
37.Oo Fl D Ar name Ns Oo = Ns Ar value Oc Oc ...
38.Oo Fl I Ar directory Oc ...
39.Oo Fl L Ar directory Oc ...
40.Op Fl o Ar outfile
41.Op Fl O Ar optlevel
42.Oo Fl U Ar name Oc ...
43.Ar operand ...
44.Sh DESCRIPTION
45This is the name of the C language compiler as required by the
46.St -p1003.1-2001
47standard.
48.Pp
49The
50.Nm
51compiler accepts the following options:
52.Bl -tag -width indent
53.It Fl c
54Suppress the link-edit phase of the compilation, and do not remove any
55object files that are produced.
56.It Fl D Ar name Ns Op = Ns Ar value
57Define name as if by a C-language
58.Ic #define
59directive.
60If no
61.Dq = Ns Ar value
62is given, a value of 1 will be used.
63Note that in order to request a
64translation as specified by
65.St -p1003.1-2001 ,
66you need to define
67.Dv _POSIX_C_SOURCE=200112L
68either in the source or using this option.
69The
70.Fl D
71option has lower precedence than the
72.Fl U
73option.
74That is, if
75.Ar name
76is used in both a
77.Fl U
78and a
79.Fl D
80option,
81.Ar name
82will be undefined regardless of the order of the options.
83The
84.Fl D
85option may be specified more than once.
86.It Fl E
87Copy C-language source files to the standard output, expanding all
88preprocessor directives; no compilation will be performed.
89.It Fl g
90Produce symbolic information in the object or executable files.
91.It Fl I Ar directory
92Change the algorithm for searching for headers whose names are not
93absolute pathnames to look in the directory named by the
94.Ar directory
95pathname before looking in the usual places.
96Thus, headers whose
97names are enclosed in double-quotes
98.Pq Qq
99will be searched for first
100in the directory of the file with the
101.Ic #include
102line, then in
103directories named in
104.Fl I
105options, and last in the usual places.
106For headers whose names are enclosed in angle brackets
107.Pq Aq ,
108the header
109will be searched for only in directories named in
110.Fl I
111options and then in the usual places.
112Directories named in
113.Fl I
114options shall be searched in the order specified.
115The
116.Fl I
117option may be specified more than once.
118.It Fl L Ar directory
119Change the algorithm of searching for the libraries named in the
120.Fl l
121objects to look in the directory named by the
122.Ar directory
123pathname before looking in the usual places.
124Directories named in
125.Fl L
126options will be searched in the order specified.
127The
128.Fl L
129option may be specified more than once.
130.It Fl o Ar outfile
131Use the pathname
132.Ar outfile ,
133instead of the default
134.Pa a.out ,
135for the executable file produced.
136.It Fl O Ar optlevel
137If
138.Ar optlevel
139is zero, disable all optimizations.
140Otherwise, enable optimizations at the specified level.
141.It Fl s
142Produce object and/or executable files from which symbolic and other
143information not required for proper execution has been removed
144(stripped).
145.It Fl U Ar name
146Remove any initial definition of
147.Ar name .
148The
149.Fl U
150option may be specified more than once.
151.El
152.Pp
153An operand is either in the form of a pathname or the form
154.Fl l
155library.
156At least one operand of the pathname form needs to be specified.
157Supported operands are of the form:
158.Bl -tag -offset indent -width ".Fl l Ar library"
159.It Ar file Ns Pa .c
160A C-language source file to be compiled and optionally linked.
161The operand must be of this form if the
162.Fl c
163option is used.
164.It Ar file Ns Pa .a
165A library of object files, as produced by
166.Xr ar 1 ,
167passed directly to the link editor.
168.It Ar file Ns Pa .o
169An object file produced by
170.Nm Fl c ,
171and passed directly to the link editor.
172.It Fl l Ar library
173Search the library named
174.Pa lib Ns Ar library Ns Pa .a .
175A library will be searched when its name is encountered, so the
176placement of a
177.Fl l
178operand is significant.
179.El
180.Sh SEE ALSO
181.Xr ar 1 ,
182.Xr c89 1 ,
183.Xr cc 1 ,
184.Xr c99 7
185.Sh STANDARDS
186The
187.Nm
188utility interface conforms to
189.St -p1003.1-2001 .
190