xref: /freebsd/usr.bin/c89/c89.1 (revision f12d6e12ec3b62b72d1c1f0b7af1e4e14d45bba1)
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.\"
26c3aac50fSPeter Wemm.\" $FreeBSD$
27bb17ac54SJoerg Wunsch.\" "
28bb17ac54SJoerg Wunsch.Dd September 17, 1997
29bb17ac54SJoerg Wunsch.Os
30bb17ac54SJoerg Wunsch.Dt C89 1
31bb17ac54SJoerg Wunsch.Sh NAME
32bb17ac54SJoerg Wunsch.Nm c89
33f12d6e12SRuslan Ermilov.Nd POSIX.2 C language compiler
34bb17ac54SJoerg Wunsch.Sh SYNOPSIS
358fe908efSRuslan Ermilov.Nm
36bb17ac54SJoerg Wunsch.Op Fl c
37f12d6e12SRuslan Ermilov.Op Fl D Ar name Ns Op = Ns Ar value
38f12d6e12SRuslan Ermilov.Ar ...
39bb17ac54SJoerg Wunsch.Op Fl E
40bb17ac54SJoerg Wunsch.Op Fl g
41f12d6e12SRuslan Ermilov.Op Fl I Ar directory ...
42f12d6e12SRuslan Ermilov.Op Fl L Ar directory ...
43bb17ac54SJoerg Wunsch.Op Fl o Ar outfile
44bb17ac54SJoerg Wunsch.Op Fl O
45bb17ac54SJoerg Wunsch.Op Fl s
46f12d6e12SRuslan Ermilov.Op Fl U Ar name ...
47f12d6e12SRuslan Ermilov.Ar operand ...
48bb17ac54SJoerg Wunsch.Sh DESCRIPTION
49bb17ac54SJoerg WunschThis is the name of the C language compiler as required by the
5039cfe41bSPhilippe Charnier.St -p1003.2
51bb17ac54SJoerg Wunschstandard.
52bb17ac54SJoerg Wunsch.Pp
5316c9de07SJoerg WunschThe
54bb17ac54SJoerg Wunsch.Nm
5516c9de07SJoerg Wunschcompiler accepts the following options:
5639cfe41bSPhilippe Charnier.Bl -tag -width indent
5716c9de07SJoerg Wunsch.It Fl c
5816c9de07SJoerg WunschSuppress the link-edit phase of the compilation, and do not remove any
5916c9de07SJoerg Wunschobject files that are produced.
60f12d6e12SRuslan Ermilov.It Fl D Ar name Ns Op = Ns Ar value
6116c9de07SJoerg WunschDefine name as if by a C-language
62f12d6e12SRuslan Ermilov.Ic #define
6316c9de07SJoerg Wunschdirective.  If
6416c9de07SJoerg Wunschno
65f12d6e12SRuslan Ermilov.Dq = Ns Ar value
66f12d6e12SRuslan Ermilovis given, a value of 1 will be used.
67f12d6e12SRuslan ErmilovNote that in order to request a
683f160897SJens Schweikhardttranslation as specified by
693f160897SJens Schweikhardt.St -p1003.2
703f160897SJens Schweikhardtyou need to define
713f160897SJens Schweikhardt.Dv _POSIX_SOURCE
723f160897SJens Schweikhardteither in the source or using this option.  The
7316c9de07SJoerg Wunsch.Fl D
7416c9de07SJoerg Wunschoption has lower precedence than the
7516c9de07SJoerg Wunsch.Fl U
7616c9de07SJoerg Wunschoption.  That is, if
7716c9de07SJoerg Wunsch.Ar name
7816c9de07SJoerg Wunschis used in both a
7916c9de07SJoerg Wunsch.Fl U
8016c9de07SJoerg Wunschand a
8116c9de07SJoerg Wunsch.Fl D
8216c9de07SJoerg Wunschoption,
8316c9de07SJoerg Wunsch.Ar name
8416c9de07SJoerg Wunschwill be undefined regardless of the order of the options.  The
8516c9de07SJoerg Wunsch.Fl D
8616c9de07SJoerg Wunschoption may be specified more than once.
8716c9de07SJoerg Wunsch.It Fl E
8816c9de07SJoerg WunschCopy C-language source files to the standard output, expanding all
8916c9de07SJoerg Wunschpreprocessor directives; no compilation will be performed.
9016c9de07SJoerg Wunsch.It Fl g
9116c9de07SJoerg WunschProduce symbolic information in the object or executable files.
9216c9de07SJoerg Wunsch.It Fl I Ar directory
9316c9de07SJoerg WunschChange the algorithm for searching for headers whose names are not
9416c9de07SJoerg Wunschabsolute pathnames to look in the directory named by the
9516c9de07SJoerg Wunsch.Ar directory
9616c9de07SJoerg Wunschpathname before looking in the usual places.  Thus, headers whose
97f12d6e12SRuslan Ermilovnames are enclosed in double-quotes ("") will be searched for first
9816c9de07SJoerg Wunschin the directory of the file with the
99f12d6e12SRuslan Ermilov.Ic #include
10016c9de07SJoerg Wunschline, then in
10116c9de07SJoerg Wunschdirectories named in
10216c9de07SJoerg Wunsch.Fl I
10316c9de07SJoerg Wunschoptions, and last in the usual places.  For
10416c9de07SJoerg Wunschheaders whose names are enclosed in angle brackets (<>), the header
10516c9de07SJoerg Wunschwill be searched for only in directories named in
10616c9de07SJoerg Wunsch.Fl I
10716c9de07SJoerg Wunschoptions and then in the usual places.  Directories named in
10816c9de07SJoerg Wunsch.Fl I
10916c9de07SJoerg Wunschoptions shall be searched in the order specified.  The
11016c9de07SJoerg Wunsch.Fl I
11116c9de07SJoerg Wunschoption may be specified more than once.
11216c9de07SJoerg Wunsch.It Fl L Ar directory
11316c9de07SJoerg WunschChange the algorithm of searching for the libraries named in the
11416c9de07SJoerg Wunsch.Fl l
11516c9de07SJoerg Wunschobjects to look in the directory named by the
11616c9de07SJoerg Wunsch.Ar directory
11716c9de07SJoerg Wunschpathname before looking in the usual places.  Directories named in
11816c9de07SJoerg Wunsch.Fl L
11916c9de07SJoerg Wunschoptions will be searched in the order specified.  The
12016c9de07SJoerg Wunsch.Fl L
12116c9de07SJoerg Wunschoption may be specified more than once.
12216c9de07SJoerg Wunsch.It Fl o Ar outfile
12316c9de07SJoerg WunschUse the pathname
12416c9de07SJoerg Wunsch.Ar outfile ,
12516c9de07SJoerg Wunschinstead of the default
12616c9de07SJoerg Wunsch.Pa a.out ,
12716c9de07SJoerg Wunschfor the executable file produced.
12816c9de07SJoerg Wunsch.It Fl O
12916c9de07SJoerg WunschOptimize the compilation.
13016c9de07SJoerg Wunsch.It Fl s
13116c9de07SJoerg WunschProduce object and/or executable files from which symbolic and other
13216c9de07SJoerg Wunschinformation not required for proper execution has been removed
13316c9de07SJoerg Wunsch(stripped).
13416c9de07SJoerg Wunsch.It Fl U Ar name
13516c9de07SJoerg WunschRemove any initial definition of
13616c9de07SJoerg Wunsch.Ar name .
13716c9de07SJoerg WunschThe
13816c9de07SJoerg Wunsch.Fl U
13916c9de07SJoerg Wunschoption may be specified more than once.
14016c9de07SJoerg Wunsch.El
141bb17ac54SJoerg Wunsch.Pp
14216c9de07SJoerg WunschAn operand is either in the form of a pathname or the form
14316c9de07SJoerg Wunsch.Fl l
14416c9de07SJoerg Wunschlibrary.  At least one operand of the pathname form needs to be
14516c9de07SJoerg Wunschspecified.  Supported operands are of the form:
14616c9de07SJoerg Wunsch.Bl -tag -offset indent -width "-l library"
147f12d6e12SRuslan Ermilov.It Ar file Ns Pa .c
14816c9de07SJoerg WunschA C-language source file to be compiled and optionally linked.  The
14916c9de07SJoerg Wunschoperand must be of this form if the
15016c9de07SJoerg Wunsch.Fl c
15116c9de07SJoerg Wunschoption is used.
152f12d6e12SRuslan Ermilov.It Ar file Ns Pa .a
15316c9de07SJoerg WunschA library of object files, as produced by
15416c9de07SJoerg Wunsch.Xr ar 1 ,
15516c9de07SJoerg Wunschpassed directly to the link editor.
156f12d6e12SRuslan Ermilov.It Ar file Ns Pa .o
15716c9de07SJoerg WunschAn object file produced by
158f12d6e12SRuslan Ermilov.Nm Fl c ,
15916c9de07SJoerg Wunschand passed directly to the link editor.
160f12d6e12SRuslan Ermilov.It Fl l Ar library
16116c9de07SJoerg WunschSearch the library named
162f12d6e12SRuslan Ermilov.Pa lib Ns Ar library Ns Pa .a .
16316c9de07SJoerg WunschA library will be searched when its name is encountered, so the
16416c9de07SJoerg Wunschplacement of a
16516c9de07SJoerg Wunsch.Fl l
16616c9de07SJoerg Wunschoperand is significant.
16716c9de07SJoerg Wunsch.El
168bb17ac54SJoerg Wunsch.Sh SEE ALSO
16916c9de07SJoerg Wunsch.Xr ar 1 ,
170bb17ac54SJoerg Wunsch.Xr cc 1
171bb17ac54SJoerg Wunsch.Sh STANDARDS
172bb17ac54SJoerg WunschThe
173bb17ac54SJoerg Wunsch.Nm
174bb17ac54SJoerg Wunschcommand is believed to comply with
175bb17ac54SJoerg Wunsch.St -p1003.2 .
176