xref: /dragonfly/usr.bin/c99/c99.1 (revision d4ef6694)
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.\" $FreeBSD: src/usr.bin/c99/c99.1,v 1.5 2007/03/10 07:11:20 ru Exp $
28.\"
29.Dd October 7, 2002
30.Dt C99 1
31.Os
32.Sh NAME
33.Nm c99
34.Nd standard C language compiler
35.Sh SYNOPSIS
36.Nm
37.Op Fl cEgs
38.Oo Fl D Ar name Ns Oo = Ns Ar value Oc Oc ...
39.Oo Fl I Ar directory Oc ...
40.Oo Fl L Ar directory Oc ...
41.Op Fl o Ar outfile
42.Op Fl O Ar optlevel
43.Oo Fl U Ar name Oc ...
44.Ar operand ...
45.Sh DESCRIPTION
46This is the name of the C language compiler as required by the
47.St -p1003.1-2001
48standard.
49.Pp
50The
51.Nm
52compiler accepts the following options:
53.Bl -tag -width indent
54.It Fl c
55Suppress the link-edit phase of the compilation, and do not remove any
56object files that are produced.
57.It Fl D Ar name Ns Op = Ns Ar value
58Define name as if by a C-language
59.Ic #define
60directive.
61If no
62.Dq = Ns Ar value
63is given, a value of 1 will be used.
64Note that in order to request a
65translation as specified by
66.St -p1003.1-2001 ,
67you need to define
68.Dv _POSIX_C_SOURCE=200112L
69either in the source or using this option.
70The
71.Fl D
72option has lower precedence than the
73.Fl U
74option.
75That is, if
76.Ar name
77is used in both a
78.Fl U
79and a
80.Fl D
81option,
82.Ar name
83will be undefined regardless of the order of the options.
84The
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.
97Thus, headers whose
98names are enclosed in double-quotes
99.Pq Qq
100will be searched for first
101in the directory of the file with the
102.Ic #include
103line, then in
104directories named in
105.Fl I
106options, and last in the usual places.
107For headers whose names are enclosed in angle brackets
108.Pq Aq ,
109the header
110will be searched for only in directories named in
111.Fl I
112options and then in the usual places.
113Directories named in
114.Fl I
115options shall be searched in the order specified.
116The
117.Fl I
118option may be specified more than once.
119.It Fl L Ar directory
120Change the algorithm of searching for the libraries named in the
121.Fl l
122objects to look in the directory named by the
123.Ar directory
124pathname before looking in the usual places.
125Directories named in
126.Fl L
127options will be searched in the order specified.
128The
129.Fl L
130option may be specified more than once.
131.It Fl o Ar outfile
132Use the pathname
133.Ar outfile ,
134instead of the default
135.Pa a.out ,
136for the executable file produced.
137.It Fl O Ar optlevel
138If
139.Ar optlevel
140is zero, disable all optimizations.
141Otherwise, enable optimizations at the specified level.
142.It Fl s
143Produce object and/or executable files from which symbolic and other
144information not required for proper execution has been removed
145(stripped).
146.It Fl U Ar name
147Remove any initial definition of
148.Ar name .
149The
150.Fl U
151option may be specified more than once.
152.El
153.Pp
154An operand is either in the form of a pathname or the form
155.Fl l
156library.
157At least one operand of the pathname form needs to be specified.
158Supported operands are of the form:
159.Bl -tag -offset indent -width ".Fl l Ar library"
160.It Ar file Ns Pa .c
161A C-language source file to be compiled and optionally linked.
162The operand 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 c89 1 ,
184.Xr cc 1
185.Sh STANDARDS
186The
187.Nm
188utility interface conforms to
189.St -p1003.1-2001 .
190Since it is a wrapper around
191.Tn GCC ,
192it is limited to the
193.Tn C99
194features that
195.Tn GCC
196actually implements.
197See
198.Pa http://gcc.gnu.org/gcc-3.4/c99status.html .
199