1bcc(1)                      General Commands Manual                     bcc(1)
2
3
4

NAME

6       bcc - Bruce's C compiler
7

SYNOPSIS

9       bcc  [-03EGNOPSVcegvwxW] [-Aas_option] [-Bexecutable_prefix] [-Ddefine]
10       [-Uundef] [-Mc_mode] [-o outfile] [-ansi] [-Ccc1_option] [-Pcpp_option]
11       [-Iinclude_dir] [-Lld_option] [-Ttmpdir] [-Qc386_option] [-ttext_segno]
12       [ld_options] [infiles]
13

DESCRIPTION

15       Bcc is a simple C compiler that produces 8086  assembler,  in  addition
16       compiler  compile  time  options  allow  80386  or  6809  versions. The
17       compiler understands traditional K&R C with just the  restriction  that
18       bit fields are mapped to one of the other integer types.
19
20       The  default  operation  is  to produce an 8086 executable called a.out
21       from the source file.
22
23

OPTIONS

25       -ansi  Pass the C source through  unprotoize  after  preprocessing  and
26              before  code  generation.  This  will  allow  some  ansi C to be
27              compiled but it is definitly NOT a true ansi-C compiler.
28
29       -0     8086 target (works on 80386 host, but not 6809)
30
31       -3     80386 target (may work on 8086 host, but not 6809)
32
33       -A     pass remainder of option to assembler (e.g. -A-l -Alistfile  for
34              a listing)
35
36       -B     prefix for executable search path (as usual; the search order is
37              all paths specified using -B, in order, then the path  given  in
38              the  environment  variable  BCC_EXEC_PREFIX if that is set, then
39              the compiled-in defaults (something like /usr/lib/bcc/  followed
40              by /usr/bin/)
41
42       -C     pass  remainder  of  option  to  bcc-cc1,  see  code  generation
43              options.
44
45       -D     preprocessor define
46
47       -E     produce preprocessor output to standard out.
48
49       -G     produce GCC objects (Same as -Mg)
50
51       -Ixyz  include search 'xyz' path
52
53       -I     don't add default include to search list
54
55       -Lxyz  add directory name 'xyz' to the head  of  the  list  of  library
56              directories searched
57
58       -L     don't add default library to search list
59
60       -Md    alters  the arguments for all passes to produce MSDOS executable
61              COM files.  These are small model executables,  use  -i  to  get
62              tiny model.
63
64       -Mf    sets  bcc  to pass the -c and -f arguments to the code generator
65              for smaller faster code. Note this code is not  compatible  with
66              the standard calling conventions so a different version of the C
67              library is linked too.
68
69       -Mc    sets bcc to pass the -c  argument  to  the  code  generator  for
70              smaller   faster  code.  Note  the  standard  libc  is  normally
71              transparent to this, but there are exceptions.
72
73       -Ms    alters the arguments for all passes  and  selects  C-library  to
74              produce standalone Linux-86 executables
75
76       -Ml    switches   to  i386-Linux  code  generator  and  library.   This
77              configuration accepts the -z flag to generate QMAGIC a.out files
78              instead of the normal OMAGIC.
79
80       -Mg    switches  to  i386-Linux  code  generator  and  generates OMAGIC
81              object files that can be  linked  with  some  versions  of  gcc;
82              unfortunatly the most recent versions use 'collect2' to link and
83              this crashes.
84
85       -N     makes the linker produce a native a.out file (Linux  OMAGIC)  if
86              combined with -3 the executable will run under Linux-i386.
87
88       -O     optimize,  call  copt(1)  to  optimize  8086 code. Specifiers to
89              choose which rules copt should use can be appended to the -O and
90              the option can be repeated.
91
92       -P     produce  preprocessor  output  with  no line numbers to standard
93              output.
94
95       -Q     pass full option to c386 (Only for c386 version)
96
97       -S     produce assembler file
98
99       -T     temporary  directory  (overrides  previous  value  and  default;
100              default  is from the environment variable TMPDIR if that is set,
101              otherwise /tmp)
102
103       -U     preprocessor undefine
104
105       -V     print names of files being compiled
106
107       -X     pass remainder of option to linker (e.g. -X-Ofile is  passed  to
108              the linker as -Ofile)
109
110       -c     produce object file
111
112       -f     turn  on  floating  point  support, no effect with i386, changes
113              libc library with 8086 code.
114
115       -g     produce debugging info (ignored.)
116
117       -o     output file name follows (assembler, object or  executable)  (as
118              usual)
119
120       -p     produce profiling info (ignored.)
121
122       -t1    pass  to  the  assembler to renumber the text segment for multi-
123              segment programs.
124
125       -v     print names and args of subprocesses being  run.   Two  or  more
126              -v's  print  names  of files being unlinked.  Three or more -v's
127              print names of paths being searched.
128
129       -w     Supress any warning diagnostics.
130
131       -W     Turn on assembler warning messages.
132
133       -x     don't include crt0.o in the link.
134
135       -i     don't pass -i to the linker so that it  will  create  an  impure
136              executable.
137
138       Other  options are passed to the linker, in particular -lx, -M, -m, -s,
139       -H.
140
141

CODE GENERATOR OPTIONS

143       These are all options that the code generator pass bcc-cc1 understands,
144       only some will be useful for the -C option of bcc.
145
146       -0     8086 target (works even on 80386 host, not on 6809)
147
148       -3     80386 target (may work even on 8086 host, not on 6809)
149
150       -D     define (as usual)
151
152       -E     produce preprocessor output (as usual)
153
154       -I     include search path (as usual)
155
156       -P     produce preprocessor output with no line numbers (as usual)
157
158       -c     produce code with caller saving regs before function calls
159
160       -d     print debugging information in assembly output
161
162       -f     produce  code with 1st argument passed in a register (AX, EAX or
163              X)
164
165       -l     produce code for 2 3 1 0 long byte order (only works  in  16-bit
166              code),  a special library of compiler helper functions is needed
167              for this mode.
168
169       -o     assembler output file name follows
170
171       -p     produce (almost) position-independent code (only for the 6809)
172
173       -t     print source code in assembly output
174
175       -w     print what cc1 thinks is the location counter in assembly output
176
177       All the options except -D, -I and -o may be turned off by following the
178       option  letter  by  a  '-'.  Options are processed left to right so the
179       last setting has precedence.
180
181

PREPROCESSOR DEFINES

183       The preprocessor has a number of manifest constants.
184
185       __BCC__ 1
186              The  compiler  identifier,  normally  used  to  avoid   compiler
187              limitations.
188
189       __FILE__
190              stringized name of current input file
191
192       __LINE__
193              current line number
194
195       __MSDOS__ 1
196              compiler  is  configured  for  generating  MSDOS  executable COM
197              files.
198
199       __STANDALONE__ 1
200              compiler is configured for generating standalone executables.
201
202       __AS386_16__ 1
203              compiler is generating  16  bit  8086  assembler  and  the  #asm
204              keyword is available for including 8086 code.
205
206       __AS386_32__ 1
207              compiler  is  generating  32  bit  80386  assembler and the #asm
208              keyword is available for including 80386 code.
209
210       __CALLER_SAVES__ 1
211              compiler calling conventions are altered so the calling function
212              must  save  the  SI and DI registers if they are in use (ESI and
213              EDI on the 80386)
214
215       __FIRST_ARG_IN_AX__ 1
216              compiler calling conventions are altered so the calling function
217              is  passing the first argument to the function in the AX (or EAX
218              ) register.
219
220       __LONG_BIG_ENDIAN__ 1
221              alters the word order of code generated by the 8086 compiler.
222
223       These defines only occur in the 6809 version of the compiler.
224
225       __AS09__ 1
226              compiler is generating 6809 code
227
228       __FIRST_ARG_IN_X__ 1
229              the first argument to functions is passed in the X register.
230
231       __POS_INDEPENDENT__ 1
232              the code generated is (almost) position independent.
233

ENVIRONMENT

235       BCC_EXEC_PREFIX
236              default directory to seach for compiler passes
237
238       TMPDIR directory to place temporary files (default /tmp)
239

DIRECTORIES

241       All the include, library and compiler components are stored  under  the
242       /usr/bcc  directory  under  Linux-i386,  this is laid out the same as a
243       /usr filesystem and if bcc is to be the primary compiler on a system it
244       should  be  moved  there.  The  configuration  for this is in the bcc.c
245       source file only, all other executables are independent of location.
246
247       The library installation also creates the  file  /usr/lib/liberror.txt,
248       this path is hardcoded into the C library.
249
250       The bcc executable itself, as86 and ld86 are in /usr/bin.
251
252

SEE ALSO

254       as86(1), ld86(1), elksemu(1)
255

BUGS

257       The bcc.c compiler driver source is very untidy.
258
259       The  linker,  ld86,  produces  a  broken a.out object file if given one
260       input and the -r option this is so  it  is  compatible  with  pre-dev86
261       versions.
262
263
264
265                                   Nov, 1997                            bcc(1)
Impressum