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