GOTO-CC(1)
π GOTO-CC β¨
okay bestie, welcome to the goto-cc manual page, from the User Commands section of the manual. she's a C/C++ to goto compiler and she's literally so iconic. let's get into it π«Ά
π NAME π
goto-cc β C/C++ to goto compiler. that's it, that's the name, no notes π
πΈ SYNOPSIS πΈ
goto-cc [options]
goto-gcc [options]
goto-ld [options]
goto-as [options]
goto-bcc [options]
goto-armcc [options]
goto-cw [options]
seven whole personalities, one binary. the range?? unmatched π
β¨ DESCRIPTION β¨
so goto-cc reads your source code and generates a GOTO binary. her command-line interface is designed to mimic gcc(1), so if you already know gcc you're basically already friends with her. and pay attention bestie: goto-cc distinguishes between the compiling and linking phases, just like gcc(1) does. cbmc(1) expects a GOTO binary where the linking has been completed β so don't show up half-done, she will notice π
here's the fun part: the basename of the file you use to invoke goto-cc controls which behavior gets emulated. and how do you get different basenames? symbolic links, obviously. that's the whole trick β¨
goto-ccβ invokes the default system compiler as preprocessor and just builds a GOTO binary.goto-gccβ invokesgcc(1)as preprocessor and builds anelf(5)object file including an additionalgoto-ccsection that holds the GOTO binary.goto-ldβ only performs linking, and also builds anelf(5)object as above.goto-asβ invokes the system assembleras(1)and includes the original assembly source as a string in the output file.goto-bccβ invokesbcc(1)as preprocessor.goto-armccβ invokesarmccas preprocessor and enables support for the ARM's C dialect and command-line options.goto-cwβ invokesmwcceppcas preprocessor and enables support for CodeWarrior's C dialect and command-line options.
π₯ OPTIONS π₯
goto-cc understands the options of gcc(1) plus the following. yes, all of gcc's options. she's fluent π
--verbosity Nβ set verbosity level toN, which defaults to1(only errors are printed). a verbosity of0disables all output. using a verbosity of2or greater, or using-Wall, enables warnings. verbosity levels4,6,8,9, or10add increasing amounts of debug information.--function nameβ set entry point to name.--native-compiler cmdβ invoke cmd as preprocessor or compiler.--native-linker cmdβ invoke cmd as linker.--native-assembler cmdβ invoke cmd as assembler (goto-asonly).--export-file-local-symbolsβ name-mangle and export file-local (aka static) functions. name mangling prefixes each symbol name by__CPROVER_file_localand the basename of the file. for example,
// foo.c
static int bar();
yields a globally visible __CPROVER_file_local_foo_c_bar function. > note that this approach mangles all functions contained in a translation unit. we recommend using crangler(1) as a more configurable alternative.
--mangle-suffix suffixβ append suffix to exported file-local symbols. use this option together with--export-file-local-symbolswhen multiple files of the same base name contain a static function of the same name. if so, use a unique suffix in at least one of thegoto-ccinvocations used in compiling those files.--print-rejected-preprocessed-source fileβ copy failing (preprocessed) source to file.
π¦ BACKWARD COMPATIBILITY π¦
goto-cc will warn and ignore the use of --object-bits, which previous versions processed. that option now instead needs to be passed to cbmc(1). so if you're carrying that flag around like an old situationship, she's gonna warn you and move on π
π ENVIRONMENT π
all tools honor the TMPDIR environment variable when generating temporary files and directories. and goto-cc aims to accept all environment variables that gcc(1) does. she's accommodating like that π«Ά
π BUGS π
if you encounter a problem please create an issue at https://github.com/diffblue/cbmc/issues. she wants to hear about it, fr fr. no gatekeeping π
π SEE ALSO π
as(1), bcc(1), cbmc(1), crangler(1), elf(5), gcc(1), ld(1)
the whole friend group, all linked in the see-also section. iykyk π
π COPYRIGHT π
2006-2018, Daniel Kroening, Michael Tautschnig, Christoph Wintersteiger
and that's the whole page bestie, you ate it, no crumbs π
this was goto-cc-5.59.0 from June 2022 β go compile something iconic, periodt πβ¨π¦
π¦ where this page comes from
- debian trixie: cbmc 6.6.0-4 Β· BSD-4-Clause
- fedora 43: cbmc 6.7.1-2.fc43 Β· BSD-4-Clause
- fedora 44: cbmc 6.8.0-1.fc44 Β· BSD-4-Clause
- nixos 26.05: cbmc 6.9.0
- nixpkgs unstable: cbmc 6.11.0
- ubuntu questing: cbmc 6.6.0-4
- ubuntu resolute: cbmc 6.6.0-4ubuntu2 Β· BSD-4-Clause
- ubuntu stonking: cbmc 6.6.0-4ubuntu2 Β· BSD-4-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms