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