|
| 1 | +.TH GOTO-CC "1" "June 2022" "goto-cc-5.59.0" "User Commands" |
| 2 | +.SH NAME |
| 3 | +goto\-cc \- C/C++ to goto compiler |
| 4 | +.SH SYNOPSIS |
| 5 | +.B goto-cc [options] |
| 6 | + |
| 7 | +.B goto-gcc [options] |
| 8 | + |
| 9 | +.B goto-ld [options] |
| 10 | + |
| 11 | +.B goto-as [options] |
| 12 | + |
| 13 | +.B goto-bcc [options] |
| 14 | + |
| 15 | +.B goto-armcc [options] |
| 16 | + |
| 17 | +.B goto-cw [options] |
| 18 | + |
| 19 | +.SH DESCRIPTION |
| 20 | +.B goto\-cc |
| 21 | +reads source code, and generates a goto-binary. Its |
| 22 | +command-line interface is designed to mimic that of |
| 23 | +.BR gcc (1). |
| 24 | +Note in particular that \fBgoto-cc\fR distinguishes between compiling |
| 25 | +and linking phases, just as \fBgcc\fR(1) does. \fBcbmc\fR(1) expects a goto-binary |
| 26 | +for which linking has been completed. |
| 27 | +.PP |
| 28 | +The basename of the file that is used to invoke \fBgoto-cc\fR controls which |
| 29 | +behavior will be emulated. This is typically accomplished by using symbolic |
| 30 | +links. |
| 31 | +.IP |
| 32 | +\fBgoto-cc\fR: invokes the default system compiler as preprocessor and just |
| 33 | +builds a goto-binary. |
| 34 | +.IP |
| 35 | +\fBgoto-gcc\fR: invokes \fBgcc\fR(1) as preprocessor and builds an \fBelf\fR(5) |
| 36 | +object file including an additional \fIgoto-cc\fR section that holds the goto |
| 37 | +binary. |
| 38 | +.IP |
| 39 | +\fBgoto-ld\fR: only performs linking, and also builds an \fBelf\fR(5) object as |
| 40 | +above. |
| 41 | +.IP |
| 42 | +\fBgoto-as\fR: invokes the system assembler \fBas\fR(1) and includes the |
| 43 | +original assembly source as a string in the output file. |
| 44 | +.IP |
| 45 | +\fBgoto-bcc\fR: invokes \fBbcc\fR(1) as preprocessor. |
| 46 | +.IP |
| 47 | +\fBgoto-armcc\fR: invokes \fBarmcc\fR as preprocessor and enables support for |
| 48 | +the ARM's C dialect and command-line options. |
| 49 | +.IP |
| 50 | +\fBgoto-cw\fR: invokes \fBmwcceppc\fR as preprocessor and enables support for |
| 51 | +CodeWarrior's C dialect and command-line options. |
| 52 | +.SH OPTIONS |
| 53 | +.B goto\-cc |
| 54 | +understands the options of \fBgcc\fR(1) plus the following. |
| 55 | +.TP |
| 56 | +\fB\-\-verbosity\fR \fIN\fR |
| 57 | +Set verbosity level to \fIN\fR, which defaults to 1 (only errors are printed). A |
| 58 | +verbosity of 0 disables all output. Using a verbosity of 2 or greater, or using |
| 59 | +\fB\-Wall\fR enables warnings. Verbosity levels 4, 6, 8, 9, or 10 add increasing |
| 60 | +amounts of debug information. |
| 61 | +.TP |
| 62 | +\fB\-\-function\fR \fIname\fR |
| 63 | +Set entry point to \fIname\fR. |
| 64 | +.TP |
| 65 | +\fB\-\-native\-compiler\fR \fIcmd\fR |
| 66 | +Invoke \fIcmd\fR as preprocessor or compiler. |
| 67 | +.TP |
| 68 | +\fB\-\-native\-linker\fR \fIcmd\fR |
| 69 | +Invoke \fIcmd\fR as linker. |
| 70 | +.TP |
| 71 | +\fB\-\-native\-assembler\fR \fIcmd\fR |
| 72 | +Invoke \fIcmd\fR as assembler (\fBgoto\-as\fR only). |
| 73 | +.TP |
| 74 | +\fB\-\-export\-file\-local\-symbols\fR |
| 75 | +Name-mangle and export file-local (aka \fBstatic\fR) functions. Name mangling |
| 76 | +prefixes each symbol name by \fB__CPROVER_file_local\fR and the basename of the |
| 77 | +file. For example, |
| 78 | + |
| 79 | +.EX |
| 80 | +.in +4n |
| 81 | +\fB// foo.c\fP |
| 82 | +\fBstatic\fP int \fBbar\fP(); |
| 83 | +.in |
| 84 | +.EE |
| 85 | + |
| 86 | +yields a globally visible \fI__CPROVER_file_local_foo_c_bar\fR function. |
| 87 | +Note that this approach mangles all functions contained in a translation unit. |
| 88 | +We recommend using \fBcrangler\fR(1) as a more configurable alternative. |
| 89 | +.TP |
| 90 | +\fB\-\-mangle\-suffix \fIsuffix\fR |
| 91 | +Append \fIsuffix\fR to exported file-local symbols. Use this option together |
| 92 | +with \fB\-\-export\-file\-local\-symbols\fR when multiple files of the same base |
| 93 | +name contain a \fBstatic\fR function of the same name. If so, use a unique |
| 94 | +suffix in at least one of the \fBgoto\-cc\fR invocations used in compiling those |
| 95 | +files. |
| 96 | +.TP |
| 97 | +\fB\-\-print\-rejected\-preprocessed\-source\fR \fIfile\fR |
| 98 | +Copy failing (preprocessed) source to \fIfile\fR. |
| 99 | +.TP |
| 100 | +\fB\-\-object\-bits\fR \fIN\fR |
| 101 | +Configure the number of bits used for object numbering in CBMC's pointer encoding. |
| 102 | +.SH ENVIRONMENT |
| 103 | +All tools honor the TMPDIR environment variable when generating temporary |
| 104 | +files and directories. |
| 105 | +.B goto\-cc |
| 106 | +aims to accept all environment variables that \fBgcc\fR(1) does. |
| 107 | +.SH BUGS |
| 108 | +If you encounter a problem please create an issue at |
| 109 | +.B https://github.com/diffblue/cbmc/issues |
| 110 | +.SH SEE ALSO |
| 111 | +.BR as (1), |
| 112 | +.BR bcc (1), |
| 113 | +.BR cbmc (1), |
| 114 | +.BR crangler (1), |
| 115 | +.BR elf (5), |
| 116 | +.BR gcc (1), |
| 117 | +.BR ld (1) |
| 118 | +.SH COPYRIGHT |
| 119 | +2006\-2018, Daniel Kroening, Michael Tautschnig, Christoph Wintersteiger |
0 commit comments