| 1 | .\" -*- Mode: Nroff -*-
|
|---|
| 2 | .\"
|
|---|
| 3 | .\" Cforall Version 1.0.0 Copyright (C) 2017 University of Waterloo
|
|---|
| 4 | .\"
|
|---|
| 5 | .\" The contents of this file are covered under the licence agreement in the
|
|---|
| 6 | .\" file "LICENCE" distributed with Cforall.
|
|---|
| 7 | .\"
|
|---|
| 8 | .\" cfa.1 --
|
|---|
| 9 | .\"
|
|---|
| 10 | .\" Author : Peter A. Buhr
|
|---|
| 11 | .\" Created On : Wed Jul 26 22:34:47 2017
|
|---|
| 12 | .\" Last Modified By : Peter A. Buhr
|
|---|
| 13 | .\" Last Modified On : Wed Sep 2 17:59:53 2020
|
|---|
| 14 | .\" Update Count : 78
|
|---|
| 15 | .\"
|
|---|
| 16 | .\" nroff -man cfa.1
|
|---|
| 17 | .\"
|
|---|
| 18 | .ds Ho "/usr/local
|
|---|
| 19 | .ds Mg "1
|
|---|
| 20 | .ds Mn "0
|
|---|
| 21 | .ds Pt "0
|
|---|
| 22 | .ds Vr "cfa-\*(Mg.\*(Mn.\*(Pt
|
|---|
| 23 | .ds Cf "Cforall
|
|---|
| 24 | .\"
|
|---|
| 25 | .TH CFA 1 "2020-09-2" cfa-\*(Mg "\*(Cf Project"
|
|---|
| 26 | .SH NAME
|
|---|
| 27 | cfa \- \*(Cf project translator and runtime library to enhance C
|
|---|
| 28 | .SH SYNOPSIS
|
|---|
| 29 | cfa [cfa/gcc-options]
|
|---|
| 30 | [cfa/c source-files]
|
|---|
| 31 | [assembler/loader files]
|
|---|
| 32 | .SH DESCRIPTION
|
|---|
| 33 | \*(Cf (C-for-all) is an open-source project extending ISO C with modern safety and productivity features, while still ensuring backwards compatibility with C and its programmers.
|
|---|
| 34 |
|
|---|
| 35 | The cfa command compiles C and \*(Cf source files and links C/\*(Cf object
|
|---|
| 36 | files named on the command line.
|
|---|
| 37 |
|
|---|
| 38 | The cfa command introduces a translator pass over the specified source files
|
|---|
| 39 | after the C preprocessor but before the C compilation. The translator converts
|
|---|
| 40 | new \*(Cf constructs into C statements. The cfa command also provides a fully
|
|---|
| 41 | concurrent (user-level threads) runtime library, which is linked with the
|
|---|
| 42 | \*(Cf application.
|
|---|
| 43 |
|
|---|
| 44 | The command line options depend on the particular C compiler used (gcc/clang
|
|---|
| 45 | supported). As with most C compilers, the output is sent to the file a.out(5)
|
|---|
| 46 | unless the -o option is present on the command line. See the reference pages
|
|---|
| 47 | for gcc(1) for more information on command line options.
|
|---|
| 48 | .SH OPTIONS
|
|---|
| 49 | When multiple conflicting options appear on the command line, e.g.,
|
|---|
| 50 | .B -debug
|
|---|
| 51 | followed by
|
|---|
| 52 | .B -nodebug,
|
|---|
| 53 | the last option takes precedence.
|
|---|
| 54 | .LP
|
|---|
| 55 | All of the options available to the gcc compiler are available to the cfa
|
|---|
| 56 | translator. The following gcc flags are implicitly turned on:
|
|---|
| 57 | .IP "-std=gnu11" 3
|
|---|
| 58 | The 2011 C standard plus GNU extensions.
|
|---|
| 59 | .IP "-imacros stdbool.h"
|
|---|
| 60 | Include stdbool.h to get defines for bool/true/false.
|
|---|
| 61 | .IP "-latomic -lm"
|
|---|
| 62 | Provide access to double-wide CAS instruction and math library.
|
|---|
| 63 | .LP
|
|---|
| 64 | The following additional options are available:
|
|---|
| 65 | .IP "-CFA" 3
|
|---|
| 66 | Only the C preprocessor and the \*(Cf translator steps are performed and the transformed program is written to standard output, which makes it possible to examine the code generated by the \*(Cf translator.
|
|---|
| 67 | The generated code starts with the standard \*(Cf prelude.
|
|---|
| 68 | .IP "-debug"
|
|---|
| 69 | The program is linked with the debugging version of the runtime system.
|
|---|
| 70 | The debug version performs runtime checks to help during the debugging phase of a \*(Cf program, but can substantially slow program execution.
|
|---|
| 71 | The runtime checks should only be removed after the program is completely debugged.
|
|---|
| 72 | .B This option is the default.
|
|---|
| 73 | .IP "-nodebug"
|
|---|
| 74 | The program is linked with the non-debugging version of the runtime system, so the execution of the program is faster.
|
|---|
| 75 | .I However, no runtime checks or asserts are performed so errors usually result in abnormal program behaviour or termination.
|
|---|
| 76 | .IP "-help"
|
|---|
| 77 | Information about the set of \*(Cf compilation flags is printed.
|
|---|
| 78 | .IP "-nohelp"
|
|---|
| 79 | Information about the set of \*(Cf compilation flags is not printed.
|
|---|
| 80 | .B This option is the default.
|
|---|
| 81 | .IP "-quiet"
|
|---|
| 82 | The \*(Cf compilation message is not printed at the beginning of a compilation.
|
|---|
| 83 | .IP "-noquiet"
|
|---|
| 84 | The \*(Cf compilation message is printed at the beginning of a compilation.
|
|---|
| 85 | .B This option is the default.
|
|---|
| 86 | .SH PREPROCESSOR VARIABLES
|
|---|
| 87 | When programs are compiled using cfa, the following preprocessor variables are
|
|---|
| 88 | available. These variables allow conditional compilation of programs that must
|
|---|
| 89 | work differently in these situations.
|
|---|
| 90 | .IP "__CFA_MAJOR__" 3
|
|---|
| 91 | is available during preprocessing and its value is the major version number of \*(Cf.
|
|---|
| 92 | .IP "__CFA_MINOR__"
|
|---|
| 93 | is available during preprocessing and its value is the minor version number of \*(Cf.
|
|---|
| 94 | .IP "__CFA_PATCH__"
|
|---|
| 95 | is available during preprocessing and its value is the patch level number of \*(Cf.
|
|---|
| 96 | .IP "__CFA__, __CFORALL__, and __cforall"
|
|---|
| 97 | are always available during preprocessing and have no value.
|
|---|
| 98 | .IP "__CFA_DEBUG__"
|
|---|
| 99 | is available during preprocessing if the -debug compilation option is
|
|---|
| 100 | specified.
|
|---|
| 101 | .SH FILES
|
|---|
| 102 | .DS B
|
|---|
| 103 | file.{c,cfa} - \*(Cf source file
|
|---|
| 104 | .br
|
|---|
| 105 | file.s - assembly language file
|
|---|
| 106 | .br
|
|---|
| 107 | file.o - object file
|
|---|
| 108 | .br
|
|---|
| 109 | \*(Ho/\*(Vr/bin/cfa - translator
|
|---|
| 110 | .br
|
|---|
| 111 | \*(Ho/\*(Vr/doc - reference manuals and documents
|
|---|
| 112 | .br
|
|---|
| 113 | \*(Ho/\*(Vr/include - header files
|
|---|
| 114 | .br
|
|---|
| 115 | \*(Ho/\*(Vr/lib - run time libraries
|
|---|
| 116 | .br
|
|---|
| 117 | \*(Ho/\*(Vr/man - command documentation
|
|---|
| 118 | .br
|
|---|
| 119 | \*(Ho/\*(Vr/src - source code (optional)
|
|---|
| 120 | .DE
|
|---|
| 121 | .SH SEE ALSO
|
|---|
| 122 | cpp(1), gcc(1), gdb(1)
|
|---|
| 123 | .SH REFERENCES
|
|---|
| 124 | .HP 3
|
|---|
| 125 | .I \*(Cf Home Page
|
|---|
| 126 | .br
|
|---|
| 127 | https://cforall.uwaterloo.ca
|
|---|
| 128 | .HP
|
|---|
| 129 | .I \*(Cf User Manual
|
|---|
| 130 | .br
|
|---|
| 131 | https://cforall.uwaterloo.ca/doc/user.pdf
|
|---|
| 132 | .SH BUILDS
|
|---|
| 133 | Nightly builds are available here https://cforall.uwaterloo.ca/jenkins
|
|---|
| 134 | .SH BUGS
|
|---|
| 135 | Bugs reportss are available here https://cforall.uwaterloo.ca/trac
|
|---|
| 136 | .SH COPYRIGHT
|
|---|
| 137 | \*(Cf is covered under the licence agreement in the distribution.
|
|---|
| 138 | .SH AUTHORS
|
|---|
| 139 | Andrew Beach, Richard Bilson, Peter A. Buhr, Thierry Delisle, Glen Ditchfield,
|
|---|
| 140 | Rodolfo G. Esteves, Aaron Moss, Rob Schluntz, Mubeen Zulfiqar
|
|---|