xref: /freebsd/usr.bin/c89/c89.1 (revision fa9896e082a1046ff4fbc75fcba4d18d1f2efc19)
1bb17ac54SJoerg Wunsch.\"
2bb17ac54SJoerg Wunsch.\" Copyright (c) 1997 Joerg Wunsch
3bb17ac54SJoerg Wunsch.\"
4bb17ac54SJoerg Wunsch.\" All rights reserved.
5bb17ac54SJoerg Wunsch.\"
6bb17ac54SJoerg Wunsch.\" Redistribution and use in source and binary forms, with or without
7bb17ac54SJoerg Wunsch.\" modification, are permitted provided that the following conditions
8bb17ac54SJoerg Wunsch.\" are met:
9bb17ac54SJoerg Wunsch.\" 1. Redistributions of source code must retain the above copyright
10bb17ac54SJoerg Wunsch.\"    notice, this list of conditions and the following disclaimer.
11bb17ac54SJoerg Wunsch.\" 2. Redistributions in binary form must reproduce the above copyright
12bb17ac54SJoerg Wunsch.\"    notice, this list of conditions and the following disclaimer in the
13bb17ac54SJoerg Wunsch.\"    documentation and/or other materials provided with the distribution.
14bb17ac54SJoerg Wunsch.\"
15bb17ac54SJoerg Wunsch.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
16bb17ac54SJoerg Wunsch.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17bb17ac54SJoerg Wunsch.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18bb17ac54SJoerg Wunsch.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
19bb17ac54SJoerg Wunsch.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20bb17ac54SJoerg Wunsch.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21bb17ac54SJoerg Wunsch.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22bb17ac54SJoerg Wunsch.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23bb17ac54SJoerg Wunsch.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24bb17ac54SJoerg Wunsch.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25bb17ac54SJoerg Wunsch.\"
26bb17ac54SJoerg Wunsch.Dd September 17, 1997
27bb17ac54SJoerg Wunsch.Dt C89 1
28aa12cea2SUlrich Spörlein.Os
29bb17ac54SJoerg Wunsch.Sh NAME
30bb17ac54SJoerg Wunsch.Nm c89
31f12d6e12SRuslan Ermilov.Nd POSIX.2 C language compiler
32bb17ac54SJoerg Wunsch.Sh SYNOPSIS
338fe908efSRuslan Ermilov.Nm
34f682f10cSRuslan Ermilov.Op Fl cEgOs
35f682f10cSRuslan Ermilov.Oo Fl D Ar name Ns Oo = Ns Ar value Oc Oc ...
36f682f10cSRuslan Ermilov.Oo Fl I Ar directory Oc ...
37f682f10cSRuslan Ermilov.Oo Fl L Ar directory Oc ...
38bb17ac54SJoerg Wunsch.Op Fl o Ar outfile
39f682f10cSRuslan Ermilov.Oo Fl U Ar name Oc ...
40f12d6e12SRuslan Ermilov.Ar operand ...
41bb17ac54SJoerg Wunsch.Sh DESCRIPTION
42bb17ac54SJoerg WunschThis is the name of the C language compiler as required by the
4339cfe41bSPhilippe Charnier.St -p1003.2
44bb17ac54SJoerg Wunschstandard.
45bb17ac54SJoerg Wunsch.Pp
4616c9de07SJoerg WunschThe
47bb17ac54SJoerg Wunsch.Nm
4816c9de07SJoerg Wunschcompiler accepts the following options:
4939cfe41bSPhilippe Charnier.Bl -tag -width indent
5016c9de07SJoerg Wunsch.It Fl c
5116c9de07SJoerg WunschSuppress the link-edit phase of the compilation, and do not remove any
5216c9de07SJoerg Wunschobject files that are produced.
53f12d6e12SRuslan Ermilov.It Fl D Ar name Ns Op = Ns Ar value
5416c9de07SJoerg WunschDefine name as if by a C-language
55f12d6e12SRuslan Ermilov.Ic #define
566a3e8b0aSRuslan Ermilovdirective.
57bf78e6daSRuslan ErmilovIf no
58f12d6e12SRuslan Ermilov.Dq = Ns Ar value
59f12d6e12SRuslan Ermilovis given, a value of 1 will be used.
60f12d6e12SRuslan ErmilovNote that in order to request a
613f160897SJens Schweikhardttranslation as specified by
623f160897SJens Schweikhardt.St -p1003.2
633f160897SJens Schweikhardtyou need to define
643f160897SJens Schweikhardt.Dv _POSIX_SOURCE
656a3e8b0aSRuslan Ermiloveither in the source or using this option.
666a3e8b0aSRuslan ErmilovThe
6716c9de07SJoerg Wunsch.Fl D
6816c9de07SJoerg Wunschoption has lower precedence than the
6916c9de07SJoerg Wunsch.Fl U
706a3e8b0aSRuslan Ermilovoption.
716a3e8b0aSRuslan ErmilovThat is, if
7216c9de07SJoerg Wunsch.Ar name
7316c9de07SJoerg Wunschis used in both a
7416c9de07SJoerg Wunsch.Fl U
7516c9de07SJoerg Wunschand a
7616c9de07SJoerg Wunsch.Fl D
7716c9de07SJoerg Wunschoption,
7816c9de07SJoerg Wunsch.Ar name
796a3e8b0aSRuslan Ermilovwill be undefined regardless of the order of the options.
806a3e8b0aSRuslan ErmilovThe
8116c9de07SJoerg Wunsch.Fl D
8216c9de07SJoerg Wunschoption may be specified more than once.
8316c9de07SJoerg Wunsch.It Fl E
8416c9de07SJoerg WunschCopy C-language source files to the standard output, expanding all
8516c9de07SJoerg Wunschpreprocessor directives; no compilation will be performed.
8616c9de07SJoerg Wunsch.It Fl g
8716c9de07SJoerg WunschProduce symbolic information in the object or executable files.
8816c9de07SJoerg Wunsch.It Fl I Ar directory
8916c9de07SJoerg WunschChange the algorithm for searching for headers whose names are not
9016c9de07SJoerg Wunschabsolute pathnames to look in the directory named by the
9116c9de07SJoerg Wunsch.Ar directory
926a3e8b0aSRuslan Ermilovpathname before looking in the usual places.
936a3e8b0aSRuslan ErmilovThus, headers whose
94bf78e6daSRuslan Ermilovnames are enclosed in double-quotes
95*20a95cd6SUlrich Spörlein.Pq Qq
96bf78e6daSRuslan Ermilovwill be searched for first
9716c9de07SJoerg Wunschin the directory of the file with the
98f12d6e12SRuslan Ermilov.Ic #include
9916c9de07SJoerg Wunschline, then in
10016c9de07SJoerg Wunschdirectories named in
10116c9de07SJoerg Wunsch.Fl I
1026a3e8b0aSRuslan Ermilovoptions, and last in the usual places.
103bf78e6daSRuslan ErmilovFor headers whose names are enclosed in angle brackets
104*20a95cd6SUlrich Spörlein.Pq Aq ,
105bf78e6daSRuslan Ermilovthe header
10616c9de07SJoerg Wunschwill be searched for only in directories named in
10716c9de07SJoerg Wunsch.Fl I
1086a3e8b0aSRuslan Ermilovoptions and then in the usual places.
1096a3e8b0aSRuslan ErmilovDirectories named in
11016c9de07SJoerg Wunsch.Fl I
1116a3e8b0aSRuslan Ermilovoptions shall be searched in the order specified.
1126a3e8b0aSRuslan ErmilovThe
11316c9de07SJoerg Wunsch.Fl I
11416c9de07SJoerg Wunschoption may be specified more than once.
11516c9de07SJoerg Wunsch.It Fl L Ar directory
11616c9de07SJoerg WunschChange the algorithm of searching for the libraries named in the
11716c9de07SJoerg Wunsch.Fl l
11816c9de07SJoerg Wunschobjects to look in the directory named by the
11916c9de07SJoerg Wunsch.Ar directory
1206a3e8b0aSRuslan Ermilovpathname before looking in the usual places.
1216a3e8b0aSRuslan ErmilovDirectories named in
12216c9de07SJoerg Wunsch.Fl L
1236a3e8b0aSRuslan Ermilovoptions will be searched in the order specified.
1246a3e8b0aSRuslan ErmilovThe
12516c9de07SJoerg Wunsch.Fl L
12616c9de07SJoerg Wunschoption may be specified more than once.
12716c9de07SJoerg Wunsch.It Fl o Ar outfile
12816c9de07SJoerg WunschUse the pathname
12916c9de07SJoerg Wunsch.Ar outfile ,
13016c9de07SJoerg Wunschinstead of the default
13116c9de07SJoerg Wunsch.Pa a.out ,
13216c9de07SJoerg Wunschfor the executable file produced.
13316c9de07SJoerg Wunsch.It Fl O
13416c9de07SJoerg WunschOptimize the compilation.
13516c9de07SJoerg Wunsch.It Fl s
13616c9de07SJoerg WunschProduce object and/or executable files from which symbolic and other
13716c9de07SJoerg Wunschinformation not required for proper execution has been removed
13816c9de07SJoerg Wunsch(stripped).
13916c9de07SJoerg Wunsch.It Fl U Ar name
14016c9de07SJoerg WunschRemove any initial definition of
14116c9de07SJoerg Wunsch.Ar name .
14216c9de07SJoerg WunschThe
14316c9de07SJoerg Wunsch.Fl U
14416c9de07SJoerg Wunschoption may be specified more than once.
14516c9de07SJoerg Wunsch.El
146bb17ac54SJoerg Wunsch.Pp
14716c9de07SJoerg WunschAn operand is either in the form of a pathname or the form
14816c9de07SJoerg Wunsch.Fl l
1496a3e8b0aSRuslan Ermilovlibrary.
150bf78e6daSRuslan ErmilovAt least one operand of the pathname form needs to be specified.
1516a3e8b0aSRuslan ErmilovSupported operands are of the form:
152bf78e6daSRuslan Ermilov.Bl -tag -offset indent -width ".Fl l Ar library"
153f12d6e12SRuslan Ermilov.It Ar file Ns Pa .c
1546a3e8b0aSRuslan ErmilovA C-language source file to be compiled and optionally linked.
155bf78e6daSRuslan ErmilovThe operand must be of this form if the
15616c9de07SJoerg Wunsch.Fl c
15716c9de07SJoerg Wunschoption is used.
158f12d6e12SRuslan Ermilov.It Ar file Ns Pa .a
15916c9de07SJoerg WunschA library of object files, as produced by
16016c9de07SJoerg Wunsch.Xr ar 1 ,
16116c9de07SJoerg Wunschpassed directly to the link editor.
162f12d6e12SRuslan Ermilov.It Ar file Ns Pa .o
16316c9de07SJoerg WunschAn object file produced by
164f12d6e12SRuslan Ermilov.Nm Fl c ,
16516c9de07SJoerg Wunschand passed directly to the link editor.
166f12d6e12SRuslan Ermilov.It Fl l Ar library
16716c9de07SJoerg WunschSearch the library named
168f12d6e12SRuslan Ermilov.Pa lib Ns Ar library Ns Pa .a .
16916c9de07SJoerg WunschA library will be searched when its name is encountered, so the
17016c9de07SJoerg Wunschplacement of a
17116c9de07SJoerg Wunsch.Fl l
17216c9de07SJoerg Wunschoperand is significant.
17316c9de07SJoerg Wunsch.El
174bb17ac54SJoerg Wunsch.Sh SEE ALSO
17516c9de07SJoerg Wunsch.Xr ar 1 ,
176bf78e6daSRuslan Ermilov.Xr c99 1 ,
177bb17ac54SJoerg Wunsch.Xr cc 1
178bb17ac54SJoerg Wunsch.Sh STANDARDS
179bb17ac54SJoerg WunschThe
180bb17ac54SJoerg Wunsch.Nm
181bf78e6daSRuslan Ermilovutility is believed to comply with
182bb17ac54SJoerg Wunsch.St -p1003.2 .
183