xref: /dragonfly/usr.bin/c99/c99.1 (revision b7367ef6)
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.\" $DragonFly: src/usr.bin/c99/c99.1,v 1.2 2007/09/22 21:26:24 pavalos 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.Oo Fl D Ar name Ns Oo = Ns Ar value Oc Oc ...
40.Oo Fl I Ar directory Oc ...
41.Oo Fl L Ar directory Oc ...
42.Op Fl o Ar outfile
43.Op Fl O Ar optlevel
44.Oo Fl U Ar name Oc ...
45.Ar operand ...
46.Sh DESCRIPTION
47This is the name of the C language compiler as required by the
48.St -p1003.1-2001
49standard.
50.Pp
51The
52.Nm
53compiler accepts the following options:
54.Bl -tag -width indent
55.It Fl c
56Suppress the link-edit phase of the compilation, and do not remove any
57object files that are produced.
58.It Fl D Ar name Ns Op = Ns Ar value
59Define name as if by a C-language
60.Ic #define
61directive.
62If no
63.Dq = Ns Ar value
64is given, a value of 1 will be used.
65Note that in order to request a
66translation as specified by
67.St -p1003.1-2001 ,
68you need to define
69.Dv _POSIX_C_SOURCE=200112L
70either in the source or using this option.
71The
72.Fl D
73option has lower precedence than the
74.Fl U
75option.
76That 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.
85The
86.Fl D
87option may be specified more than once.
88.It Fl E
89Copy C-language source files to the standard output, expanding all
90preprocessor directives; no compilation will be performed.
91.It Fl g
92Produce symbolic information in the object or executable files.
93.It Fl I Ar directory
94Change the algorithm for searching for headers whose names are not
95absolute pathnames to look in the directory named by the
96.Ar directory
97pathname before looking in the usual places.
98Thus, headers whose
99names are enclosed in double-quotes
100.Pq Qq
101will be searched for first
102in the directory of the file with the
103.Ic #include
104line, then in
105directories named in
106.Fl I
107options, and last in the usual places.
108For headers whose names are enclosed in angle brackets
109.Pq Aq ,
110the 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 Ar optlevel
139If
140.Ar optlevel
141is zero, disable all optimizations.
142Otherwise, enable optimizations at the specified level.
143.It Fl s
144Produce object and/or executable files from which symbolic and other
145information not required for proper execution has been removed
146(stripped).
147.It Fl U Ar name
148Remove any initial definition of
149.Ar name .
150The
151.Fl U
152option may be specified more than once.
153.El
154.Pp
155An operand is either in the form of a pathname or the form
156.Fl l
157library.
158At least one operand of the pathname form needs to be specified.
159Supported operands are of the form:
160.Bl -tag -offset indent -width ".Fl l Ar library"
161.It Ar file Ns Pa .c
162A C-language source file to be compiled and optionally linked.
163The operand must be of this form if the
164.Fl c
165option is used.
166.It Ar file Ns Pa .a
167A library of object files, as produced by
168.Xr ar 1 ,
169passed directly to the link editor.
170.It Ar file Ns Pa .o
171An object file produced by
172.Nm Fl c ,
173and passed directly to the link editor.
174.It Fl l Ar library
175Search the library named
176.Pa lib Ns Ar library Ns Pa .a .
177A library will be searched when its name is encountered, so the
178placement of a
179.Fl l
180operand is significant.
181.El
182.Sh SEE ALSO
183.Xr ar 1 ,
184.Xr c89 1 ,
185.Xr cc 1
186.Sh STANDARDS
187The
188.Nm
189utility interface conforms to
190.St -p1003.1-2001 .
191Since it is a wrapper around
192.Tn GCC ,
193it is limited to the
194.Tn C99
195features that
196.Tn GCC
197actually implements.
198See
199.Pa http://gcc.gnu.org/gcc-3.4/c99status.html .
200