1997-09-17 20:44:54 +00:00
|
|
|
.\"
|
|
|
|
.\" Copyright (c) 1997 Joerg Wunsch
|
|
|
|
.\"
|
|
|
|
.\" All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
|
|
|
|
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
|
|
.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
|
|
.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
|
|
.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
|
|
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
|
|
.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
|
|
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
|
|
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
.\"
|
1999-08-28 01:08:13 +00:00
|
|
|
.\" $FreeBSD$
|
1997-09-17 20:44:54 +00:00
|
|
|
.\" "
|
|
|
|
.Dd September 17, 1997
|
|
|
|
.Os
|
|
|
|
.Dt C89 1
|
|
|
|
.Sh NAME
|
|
|
|
.Nm c89
|
2001-05-10 07:29:35 +00:00
|
|
|
.Nd POSIX.2 C language compiler
|
1997-09-17 20:44:54 +00:00
|
|
|
.Sh SYNOPSIS
|
2000-11-20 19:21:22 +00:00
|
|
|
.Nm
|
2005-05-21 09:55:10 +00:00
|
|
|
.Op Fl cEgOs
|
|
|
|
.Oo Fl D Ar name Ns Oo = Ns Ar value Oc Oc ...
|
|
|
|
.Oo Fl I Ar directory Oc ...
|
|
|
|
.Oo Fl L Ar directory Oc ...
|
1997-09-17 20:44:54 +00:00
|
|
|
.Op Fl o Ar outfile
|
2005-05-21 09:55:10 +00:00
|
|
|
.Oo Fl U Ar name Oc ...
|
2001-05-10 07:29:35 +00:00
|
|
|
.Ar operand ...
|
1997-09-17 20:44:54 +00:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
This is the name of the C language compiler as required by the
|
1999-12-05 20:01:28 +00:00
|
|
|
.St -p1003.2
|
1997-09-17 20:44:54 +00:00
|
|
|
standard.
|
|
|
|
.Pp
|
1997-09-18 20:55:50 +00:00
|
|
|
The
|
1997-09-17 20:44:54 +00:00
|
|
|
.Nm
|
1997-09-18 20:55:50 +00:00
|
|
|
compiler accepts the following options:
|
1999-12-05 20:01:28 +00:00
|
|
|
.Bl -tag -width indent
|
1997-09-18 20:55:50 +00:00
|
|
|
.It Fl c
|
|
|
|
Suppress the link-edit phase of the compilation, and do not remove any
|
|
|
|
object files that are produced.
|
2001-05-10 07:29:35 +00:00
|
|
|
.It Fl D Ar name Ns Op = Ns Ar value
|
1997-09-18 20:55:50 +00:00
|
|
|
Define name as if by a C-language
|
2001-05-10 07:29:35 +00:00
|
|
|
.Ic #define
|
2004-07-02 22:22:35 +00:00
|
|
|
directive.
|
|
|
|
If
|
1997-09-18 20:55:50 +00:00
|
|
|
no
|
2001-05-10 07:29:35 +00:00
|
|
|
.Dq = Ns Ar value
|
|
|
|
is given, a value of 1 will be used.
|
|
|
|
Note that in order to request a
|
2001-05-08 19:47:01 +00:00
|
|
|
translation as specified by
|
|
|
|
.St -p1003.2
|
|
|
|
you need to define
|
|
|
|
.Dv _POSIX_SOURCE
|
2004-07-02 22:22:35 +00:00
|
|
|
either in the source or using this option.
|
|
|
|
The
|
1997-09-18 20:55:50 +00:00
|
|
|
.Fl D
|
|
|
|
option has lower precedence than the
|
|
|
|
.Fl U
|
2004-07-02 22:22:35 +00:00
|
|
|
option.
|
|
|
|
That is, if
|
1997-09-18 20:55:50 +00:00
|
|
|
.Ar name
|
|
|
|
is used in both a
|
|
|
|
.Fl U
|
|
|
|
and a
|
|
|
|
.Fl D
|
|
|
|
option,
|
|
|
|
.Ar name
|
2004-07-02 22:22:35 +00:00
|
|
|
will be undefined regardless of the order of the options.
|
|
|
|
The
|
1997-09-18 20:55:50 +00:00
|
|
|
.Fl D
|
|
|
|
option may be specified more than once.
|
|
|
|
.It Fl E
|
|
|
|
Copy C-language source files to the standard output, expanding all
|
|
|
|
preprocessor directives; no compilation will be performed.
|
|
|
|
.It Fl g
|
|
|
|
Produce symbolic information in the object or executable files.
|
|
|
|
.It Fl I Ar directory
|
|
|
|
Change the algorithm for searching for headers whose names are not
|
|
|
|
absolute pathnames to look in the directory named by the
|
|
|
|
.Ar directory
|
2004-07-02 22:22:35 +00:00
|
|
|
pathname before looking in the usual places.
|
|
|
|
Thus, headers whose
|
2001-05-10 07:29:35 +00:00
|
|
|
names are enclosed in double-quotes ("") will be searched for first
|
1997-09-18 20:55:50 +00:00
|
|
|
in the directory of the file with the
|
2001-05-10 07:29:35 +00:00
|
|
|
.Ic #include
|
1997-09-18 20:55:50 +00:00
|
|
|
line, then in
|
|
|
|
directories named in
|
|
|
|
.Fl I
|
2004-07-02 22:22:35 +00:00
|
|
|
options, and last in the usual places.
|
|
|
|
For
|
1997-09-18 20:55:50 +00:00
|
|
|
headers whose names are enclosed in angle brackets (<>), the header
|
|
|
|
will be searched for only in directories named in
|
|
|
|
.Fl I
|
2004-07-02 22:22:35 +00:00
|
|
|
options and then in the usual places.
|
|
|
|
Directories named in
|
1997-09-18 20:55:50 +00:00
|
|
|
.Fl I
|
2004-07-02 22:22:35 +00:00
|
|
|
options shall be searched in the order specified.
|
|
|
|
The
|
1997-09-18 20:55:50 +00:00
|
|
|
.Fl I
|
|
|
|
option may be specified more than once.
|
|
|
|
.It Fl L Ar directory
|
|
|
|
Change the algorithm of searching for the libraries named in the
|
|
|
|
.Fl l
|
|
|
|
objects to look in the directory named by the
|
|
|
|
.Ar directory
|
2004-07-02 22:22:35 +00:00
|
|
|
pathname before looking in the usual places.
|
|
|
|
Directories named in
|
1997-09-18 20:55:50 +00:00
|
|
|
.Fl L
|
2004-07-02 22:22:35 +00:00
|
|
|
options will be searched in the order specified.
|
|
|
|
The
|
1997-09-18 20:55:50 +00:00
|
|
|
.Fl L
|
|
|
|
option may be specified more than once.
|
|
|
|
.It Fl o Ar outfile
|
|
|
|
Use the pathname
|
|
|
|
.Ar outfile ,
|
|
|
|
instead of the default
|
|
|
|
.Pa a.out ,
|
|
|
|
for the executable file produced.
|
|
|
|
.It Fl O
|
|
|
|
Optimize the compilation.
|
|
|
|
.It Fl s
|
|
|
|
Produce object and/or executable files from which symbolic and other
|
|
|
|
information not required for proper execution has been removed
|
|
|
|
(stripped).
|
|
|
|
.It Fl U Ar name
|
|
|
|
Remove any initial definition of
|
|
|
|
.Ar name .
|
|
|
|
The
|
|
|
|
.Fl U
|
|
|
|
option may be specified more than once.
|
|
|
|
.El
|
1997-09-17 20:44:54 +00:00
|
|
|
.Pp
|
1997-09-18 20:55:50 +00:00
|
|
|
An operand is either in the form of a pathname or the form
|
|
|
|
.Fl l
|
2004-07-02 22:22:35 +00:00
|
|
|
library.
|
|
|
|
At least one operand of the pathname form needs to be
|
|
|
|
specified.
|
|
|
|
Supported operands are of the form:
|
1997-09-18 20:55:50 +00:00
|
|
|
.Bl -tag -offset indent -width "-l library"
|
2001-05-10 07:29:35 +00:00
|
|
|
.It Ar file Ns Pa .c
|
2004-07-02 22:22:35 +00:00
|
|
|
A C-language source file to be compiled and optionally linked.
|
|
|
|
The
|
1997-09-18 20:55:50 +00:00
|
|
|
operand must be of this form if the
|
|
|
|
.Fl c
|
|
|
|
option is used.
|
2001-05-10 07:29:35 +00:00
|
|
|
.It Ar file Ns Pa .a
|
1997-09-18 20:55:50 +00:00
|
|
|
A library of object files, as produced by
|
|
|
|
.Xr ar 1 ,
|
|
|
|
passed directly to the link editor.
|
2001-05-10 07:29:35 +00:00
|
|
|
.It Ar file Ns Pa .o
|
1997-09-18 20:55:50 +00:00
|
|
|
An object file produced by
|
2001-05-10 07:29:35 +00:00
|
|
|
.Nm Fl c ,
|
1997-09-18 20:55:50 +00:00
|
|
|
and passed directly to the link editor.
|
2001-05-10 07:29:35 +00:00
|
|
|
.It Fl l Ar library
|
1997-09-18 20:55:50 +00:00
|
|
|
Search the library named
|
2001-05-10 07:29:35 +00:00
|
|
|
.Pa lib Ns Ar library Ns Pa .a .
|
1997-09-18 20:55:50 +00:00
|
|
|
A library will be searched when its name is encountered, so the
|
|
|
|
placement of a
|
|
|
|
.Fl l
|
|
|
|
operand is significant.
|
|
|
|
.El
|
1997-09-17 20:44:54 +00:00
|
|
|
.Sh SEE ALSO
|
1997-09-18 20:55:50 +00:00
|
|
|
.Xr ar 1 ,
|
1997-09-17 20:44:54 +00:00
|
|
|
.Xr cc 1
|
|
|
|
.Sh STANDARDS
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
command is believed to comply with
|
|
|
|
.St -p1003.2 .
|