diff options
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/pcc/cc/cc/cc.1 | 109 | ||||
-rw-r--r-- | usr.bin/pcc/cc/ccom/ccom.1 | 79 | ||||
-rw-r--r-- | usr.bin/pcc/cc/cpp/cpp.1 | 53 |
3 files changed, 142 insertions, 99 deletions
diff --git a/usr.bin/pcc/cc/cc/cc.1 b/usr.bin/pcc/cc/cc/cc.1 index 0512a9b8ca3..be1d0e88169 100644 --- a/usr.bin/pcc/cc/cc/cc.1 +++ b/usr.bin/pcc/cc/cc/cc.1 @@ -1,4 +1,6 @@ -.\" $OpenBSD: cc.1,v 1.4 2007/10/01 18:51:02 otto Exp $ +.\" $Id: cc.1,v 1.5 2007/10/03 08:05:03 otto Exp $ +.\" $NetBSD$ +.\" $OpenBSD: cc.1,v 1.5 2007/10/03 08:05:03 otto Exp $ ."\ .\" Copyright (c) 2007 Jeremy C. Reed <reed@reedmedia.net> .\" @@ -23,20 +25,24 @@ .Nd front-end to the C compiler .Sh SYNOPSIS .Nm -.Op Fl CcdEgkLMPOStvxX -.Op Fl B Ar prefix +.Op Fl cEgkLMPOStvxX .Op Fl fPIC -.Op Fl include Ar path -.Op Fl isystem Ar path +.Op Fl fpic +.Op Fl nostartfiles .Op Fl nostdinc .Op Fl nostdlib -.Op Fl nostartfiles -.Op Fl o Ar outfile .Op Fl pg .Op Fl pthread .Op Fl static +.Op Fl B Ar prefix +.Op Fl D Ar macro[=value] +.Op Fl d Ar option +.Op Fl I Ar directory +.Op Fl include Ar path +.Op Fl isystem Ar path +.Op Fl o Ar outfile .Op Fl Wl Ar flags -.Op Ar infile ... +.Op Ar .Pp .Sh DESCRIPTION The @@ -86,8 +92,10 @@ or .Xr ld 1 executables. .\" TODO: provide an example of -B -.lt Fl C -Do not discard comments in the preprocessor. +.It Fl C +Passed to the +.Xr cpp 1 +preprocessor to not discard comments. .It Fl c Only compile or assemble and then stop. Do not link. @@ -100,27 +108,30 @@ option is used. Note: cannot be combined with .Fl o if multiple files are given. -.It Fl d Ar option -Passed to the -.Xr as 1 -assembler. -.\" TODO: what is as -dfoo for? .It Fl D Ar macro[=value] Passed to the .Xr cpp 1 preprocessor to define .Ar macro . +.It Fl d Ar option +Passed to the +.Xr as 1 +assembler. +.\" TODO: what is as -dfoo for? .It Fl E Stop after preprocessing with .Xr cpp 1 . Do not compile, assemble, or link. +Output is sent to standard output unless the +.Fl o +option is used. +.It Fl fPIC +Generate PIC code. +.\" TODO: document about avoiding machine-specific maximum size? .It Fl fpic Tells C compiler to generate PIC code and tells assembler that PIC code has been generated. .\" TODO: document difference between PIC and pic -.It Fl fPIC -Generate PIC code. -.\" TODO: document about avoiding machine-specific maximum size? .\" other -f GCC compatibility flags are ignored for now .It Fl g Send @@ -131,19 +142,27 @@ to create debug output. This unsets the .Fl O option. -.It Fl include Ar path -.\" TODO +.It Fl I Ar path +Passed to the +.Xr cpp 1 +preprocessor to add header search directory to override system defaults. +.It Fl include Ar file +Tells the +.Xr cpp 1 +preprocessor to include the +.Ar file +during preprocessing. .It Fl isystem Ar path -.\" TODO +Defines +.Ar path +as a system header directory for the +.Xr cpp 1 +preprocessor. .It Fl k Generate PIC code. See .Fl fpic option. -.It Fl I Ar path -Passed to the -.Xr cpp 1 -preprocessor to add header search directory to override system defaults. .It Fl L .\" TODO .It Fl M @@ -153,30 +172,32 @@ flag to .Xr cpp 1 to generate dependencies for .Xr make 1 . +.It Fl nostartfiles +.\" TODO .It Fl nostdinc .\" TODO .It Fl nostdlib .\" TODO .\" implies -nostartfiles ?? -.It Fl nostartfiles -.\" TODO -.It Fl o Ar outfile -Save result to -.Ar outfile . -.It Fl P -TODO: what is this? -.\" TODO: Looks like it does cpp only, but I couldn't get it to work for me. -.It Fl pg -Not implemented. .It Fl O Enable optimizations. Currently passes +.Fl xdeljumps +and .Fl xtemps to .Xr ccom 1 . Note: this is unset if .Fl g option is set. +.It Fl o Ar outfile +Save result to +.Ar outfile . +.It Fl P +TODO: what is this? +.\" TODO: Looks like it does cpp only, but I couldn't get it to work for me. +.It Fl pg +Not implemented. .It Fl pthread Defines .Sy _PTHREADS @@ -186,10 +207,6 @@ Uses .Sy -lpthread for .Xr ld 1 linker. -.It Fl static -Do not use dynamic linkage. -By default, it will link using the dynamic linker options -and/or shared objects for the platform. .It Fl S Stop after compilation by .Xr ccom 1 . @@ -203,6 +220,10 @@ option is used. Note: cannot be combined with .Fl o if multiple files are given. +.It Fl static +Do not use dynamic linkage. +By default, it will link using the dynamic linker options +and/or shared objects for the platform. .It Fl t Passes .Fl t @@ -210,20 +231,20 @@ to .Xr cpp 1 for traditional C preprocessor syntax. .It Fl U Ar macro -Passed to the +Passes to the .Xr cpp 1 preprocessor to remove the initial macro definition. .It Fl v Outputs the version of .Nm and shows what commands will be ran with their command line arguments. -.It Fl x -TODO -.It Fl X -TODO .It Fl Wl Ar flags Options for the linker .\" what is ignored? llist? +.It Fl X +TODO +.It Fl x +TODO .El .Sh Predefined Macros A few diff --git a/usr.bin/pcc/cc/ccom/ccom.1 b/usr.bin/pcc/cc/ccom/ccom.1 index 5bca790fea0..ec9a26b63f5 100644 --- a/usr.bin/pcc/cc/ccom/ccom.1 +++ b/usr.bin/pcc/cc/ccom/ccom.1 @@ -1,4 +1,6 @@ -.\" $OpenBSD: ccom.1,v 1.3 2007/09/27 19:56:48 otto Exp $ +.\" $Id: ccom.1,v 1.4 2007/10/03 08:05:04 otto Exp $ +.\" $NetBSD$ +.\" $OpenBSD: ccom.1,v 1.4 2007/10/03 08:05:04 otto Exp $ ."\ .\" Copyright (c) 2007 Jeremy C. Reed <reed@reedmedia.net> .\" Permission to use, copy, modify, and/or distribute this software for any @@ -21,7 +23,11 @@ .Nd C compiler .Sh SYNOPSIS .Nm +.Op Fl gs +.Op Fl W Ar flags .Op Fl X Ar flags +.Op Fl x Ar optimizations +.Op Fl Z Ar flags .Op infile .Op outfile .Pp @@ -54,31 +60,55 @@ temporary allocated memory, lost memory, argument list unions, dimension/function unions, struct/union/enum blocks, inline node count, inline control blocks, and permanent symtab entries. .\" TODO: explain units for above? +.It Fl v +Display version. .It Fl W Ar flags Report warnings. (Do some basic checks.) NOTE! These are subject to change RSN! -.Ar Flags +.Ar flags is one or more of the following: .Bl -tag -width Ds .It Sy implicit Implies -.Sy implicit-int +.Sy implicit-function-declaration and -.Sy implicit-function-declaration . -.It Sy implicit-int -TODO +.Sy implicit-int . .It Sy implicit-function-declaration Report if no prototype for function. +.It Sy implicit-int +TODO .It Sy missing-prototypes TODO .It Sy strict-prototypes TODO .El .\" +.It Fl X Ar flags +C specific debugging where +.Ar flags +is one or more of the following: +.Bl -tag -width Ds +.It Sy b +Building of parse trees +.It Sy d +Declarations (multiple +.Sy d +flags gives more output) +.It Sy e +Pass1 trees at exit +.It Sy i +Initializations +.It Sy t +Type conversions +.It Sy x +Target-specific flag, used in machine-dependent code +.El +.\" .It Fl x Ar optimizations .Ar optimizations is one or more of the following: +.\" TODO: reword this, since multiple terms don't go with one -x switch?? .Bl -tag -width deljumps .It Sy deljumps Delete redundant jumps and dead code. @@ -87,49 +117,33 @@ Convert statements into SSA form for optimization. Not yet finished. .It Sy tailcall Currently not implemented. .It Sy temps -Setting this flag allow variables to be put into registers, for further +Setting this flag allows variables to be put into registers, for further optimization by the register allocator. .El .\" -.It Fl X Ar C specific debugging flags -.Ar Flags -is one or more of the following: -.Bl -tag -width Ds -.It Sy b -Building of parse trees -.It Sy d -Declarations, more d gives more output -.It Sy t -Type conversions -.It Sy i -Initializations -.It Sy e -Pass1 trees at exit -.It Sy x -Target-specific flag, used in machine-dependent code -.El -.\" -.It Fl Z Ar Code generator (pass2) specific debugging flags -.Ar Flags +.It Fl Z Ar flags +Code generator (pass2) specific debugging where +.Ar flags is one or more of the following: .Bl -tag -width Ds .It Sy e Trees when entering pass2 -.It Sy o -Instruction generator .It Sy f Instruction matcher, may provide much output +.It Sy o +Instruction generator .It Sy r Register allocator -.It Sy t -Type matching in instruction generator .It Sy s Shape matching in instruction generator +.It Sy t +Type matching in instruction generator .It Sy u Sethi-Ullman computations .It Sy x Target-specific flag, used in machine-dependent code .El +.El .Sh SEE ALSO .Xr as 1 , .Xr cpp 1 , @@ -148,3 +162,6 @@ the data-flow analysis part and the SSA conversion code which is written by Peter A Jonsson, and the Mips port that were written as part of a project by undergraduate students at Lulea University of Technology. +.Pp +This product includes software developed or owned by Caldera +International, Inc. diff --git a/usr.bin/pcc/cc/cpp/cpp.1 b/usr.bin/pcc/cc/cpp/cpp.1 index f1010223b4c..9aae1daef42 100644 --- a/usr.bin/pcc/cc/cpp/cpp.1 +++ b/usr.bin/pcc/cc/cpp/cpp.1 @@ -1,4 +1,6 @@ -.\" $OpenBSD: cpp.1,v 1.3 2007/09/27 19:56:48 otto Exp $ +.\" $Id: cpp.1,v 1.4 2007/10/03 08:05:04 otto Exp $ +.\" $NetBSD$ +.\" $OpenBSD: cpp.1,v 1.4 2007/10/03 08:05:04 otto Exp $ ."\ .\" Copyright (c) 2007 Jeremy C. Reed <reed@reedmedia.net> .\" @@ -24,11 +26,12 @@ .Sh SYNOPSIS .Nm .\" TODO also document -Dvar and below without spaces? -.Op Fl Cdt -.Op Fl D Ar var=val -.Op Fl U Ar var +.Op Fl CdMt +.Op Fl D Ar macro[=value] .Op Fl I Ar path +.Op Fl i Ar file .Op Fl S Ar path +.Op Fl U Ar macro .Op Ar infile | - .Op Ar outfile .Pp @@ -64,14 +67,6 @@ The options are as follows: .Bl -tag -width Ds .It Fl C Do not discard comments. -.It Fl dM -Print list of -.Dq #define -statements to standard output for all defined macros other than -builtin macros (see below). -The normal results of preprocessing are not outputted. -.\" TODO this doesn't show predefined macros -.\" other -d options are ignored .It Fl D Ar macro[=value] Fake a definition at the beginning by using .Do #define @@ -80,28 +75,36 @@ If .Ar value is not set on command-line, then defines as 1. .\" TODO: show example -.It Fl i Ar file -Include a file at the beginning by using -.Do #include -.Ar file Dc . -.\" Note: I did not use the .In macro above -.It Fl I Ar directory +.It Fl dM +Print list of +.Dq #define +statements to standard output for all defined macros other than +builtin macros (see below). +The normal results of preprocessing are not outputted. +.\" TODO this doesn't show predefined macros +.\" other -d options are ignored +.It Fl I Ar path Add -.Ar directory -to the list of system directories containing needed header files. +.Ar path +to the list of directories containing needed header files. This may be used to override system include directories (see .Fl S option). .Fl I may be specified multiple times. +.It Fl i Ar file +Include a file at the beginning by using +.Do #include +.Ar file Dc . +.\" Note: I did not use the .In macro above .It Fl M Generate dependencies for .Xr make 1 . .\" TODO: explain and show example? -.It Fl S Ar directory +.It Fl S Ar path Add -.Ar directory +.Ar path to the list of system directories containing needed header files. .Fl S may be specified multiple times. @@ -124,10 +127,12 @@ Undefine a macro at the beginning by using .Do #undef .Ar macro Dc . .It Fl v +Display version. +.It Fl V Verbose debugging output. -.Fl v +.Fl V can be repeated for further details. -.\" -v only available if cpp source built with CPP_DEBUG, which is the default. +.\" -V only available if cpp source built with CPP_DEBUG, which is the default. .It Fl ? Show command line usage for .Nm . |