xref: /freebsd/usr.bin/c99/c99.1 (revision 71fe318b852b8dfb3e799cb12ef184750f7f8eac)
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$
28.\"
29.Dd October 7, 2002
30.Os
31.Dt C99 1
32.Sh NAME
33.Nm c99
34.Nd standard C language compiler
35.Sh SYNOPSIS
36.Nm
37.Op Fl cEgs
38.Op Fl D Ar name Ns Op = Ns Ar value
39.Ar ...
40.Op Fl I Ar directory ...
41.Op Fl L Ar directory ...
42.Op Fl o Ar outfile
43.Op Fl O Ar optlevel
44.Op Fl U Ar name ...
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.  If
62no
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.  The
71.Fl D
72option has lower precedence than the
73.Fl U
74option.  That 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.  The
83.Fl D
84option may be specified more than once.
85.It Fl E
86Copy C-language source files to the standard output, expanding all
87preprocessor directives; no compilation will be performed.
88.It Fl g
89Produce symbolic information in the object or executable files.
90.It Fl I Ar directory
91Change the algorithm for searching for headers whose names are not
92absolute pathnames to look in the directory named by the
93.Ar directory
94pathname before looking in the usual places.  Thus, headers whose
95names are enclosed in double-quotes ("") will be searched for first
96in the directory of the file with the
97.Ic #include
98line, then in
99directories named in
100.Fl I
101options, and last in the usual places.  For
102headers whose names are enclosed in angle brackets (<>), the header
103will be searched for only in directories named in
104.Fl I
105options and then in the usual places.  Directories named in
106.Fl I
107options shall be searched in the order specified.  The
108.Fl I
109option may be specified more than once.
110.It Fl L Ar directory
111Change the algorithm of searching for the libraries named in the
112.Fl l
113objects to look in the directory named by the
114.Ar directory
115pathname before looking in the usual places.  Directories named in
116.Fl L
117options will be searched in the order specified.  The
118.Fl L
119option may be specified more than once.
120.It Fl o Ar outfile
121Use the pathname
122.Ar outfile ,
123instead of the default
124.Pa a.out ,
125for the executable file produced.
126.It Fl O Ar optlevel
127If
128.Ar optlevel
129is zero, disable all optimizations. Otherwise, enable optimizations at
130the specified level.
131.It Fl s
132Produce object and/or executable files from which symbolic and other
133information not required for proper execution has been removed
134(stripped).
135.It Fl U Ar name
136Remove any initial definition of
137.Ar name .
138The
139.Fl U
140option may be specified more than once.
141.El
142.Pp
143An operand is either in the form of a pathname or the form
144.Fl l
145library.  At least one operand of the pathname form needs to be
146specified.  Supported operands are of the form:
147.Bl -tag -offset indent -width "-l library"
148.It Ar file Ns Pa .c
149A C-language source file to be compiled and optionally linked.  The
150operand must be of this form if the
151.Fl c
152option is used.
153.It Ar file Ns Pa .a
154A library of object files, as produced by
155.Xr ar 1 ,
156passed directly to the link editor.
157.It Ar file Ns Pa .o
158An object file produced by
159.Nm Fl c ,
160and passed directly to the link editor.
161.It Fl l Ar library
162Search the library named
163.Pa lib Ns Ar library Ns Pa .a .
164A library will be searched when its name is encountered, so the
165placement of a
166.Fl l
167operand is significant.
168.El
169.Sh SEE ALSO
170.Xr ar 1 ,
171.Xr c89 1 ,
172.Xr cc 1
173.Sh STANDARDS
174The
175.Nm
176utility interface conforms to
177.St -p1003.1-2001 .
178Since it is a wrapper around
179.Tn GCC ,
180it is limited to the C99 features that GCC actually implements.
181See
182.Em http://gcc.gnu.org/gcc-3.1/c99status.html .
183