home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
alib
/
d3xx
/
d359
/
dice.lha
/
DICE
/
DICE.lzh
/
doc
/
dcc.doc
< prev
next >
Wrap
Text File
|
1990-05-20
|
6KB
|
174 lines
DCC.DOC
Matthew Dillon
891 Regal Rd.
Berkeley, Ca. 94708
USA
uunet.uu.net!overload!dillon
DCC <options and files>.
DCC works almost exactly the same as the UNIX CC command. For
efficiency I strongly suggest that you make DCC, C1, CPP, DAS, and
DLINK resident for best performance. If you don't have that much
memory to waste at least make C1 and DAS resident.
Options may occur anywhere on the command line but MUST occur singly.
That is, -c -a instead of -ca. Any file specs may be placed right next
to the option OR with an intervening space. -oFILE and -o FILE are
both legal.
Files ending in .a[sm] are assumed to be assembly files. Files ending
in .l[ib] are assumed to be library files. Files ending in .o[bj] are
assumed to be object files. All other files are assumed to be C source
files.
Normally DCC compiles all C source files, assembles any .asm files, and
links the resulting object files with any specified .o files together to
produce an executable.
Normally the -o option specified the name of the executable. If you
tell DCC to produce only objects with -c, then -o can be used to specify
the output object file name (assuming you specified only one source
file). If you tell DCC to produce only assembly with -a, then -o can be
used to specify the output assembly file name.
Normally DCC places objects and temporaries in T:, see options below
to overide.
WARNING: .asm files are assembled with Das. Das is not a real assembler.
------------------- options ------------------
file File to compile, assemble, and/or link
@file File containing further list of files, one per line.
(blank lines and lines beginning with ';' or '#' are
ignored. File may NOT contain options).
-c Compile C source files and assemble into OBJECT files
only (do not link).
-a Compile C source files into ASSEMBLY files (do not assemble
or link).
Keep in mind the DAS will do further optimizations on the
assembly file.
-l0 Do not link default libraries (dlib:c.lib dlib:amiga.lib dlib:auto.lib), or
standard startup (dlib:c.o and dlib:x.o).
WARNING, this is a very dangerous option.
-1.4 Default amiga.lib is dlib:amiga14.lib
Default amiga includes are in dinclude:amiga14/
-1.3 Default amiga.lib is dlib:amiga13.lib
Default amiga includes are in dinclude:amiga13/
(If neither -1.4 or -1.3 is specified, dlib:amiga.lib
is the default amiga.lib, and the default amiga
includes are in dinclude:amiga/).
-l lib When linking include this library. (space is optional)
-I0 remove default includes from search list.
-I dir When compiling scan this include directory (space is optional)
path takes precedence over defaults but defaults are NOT removed.
-D define[=value]
Pre-define a symbol
-o file Specify output executable, object, or assembly file name
depending on what you are producing.
-md small data model (default)
-mD large data model
-mc small code model (default)
-mC large code model
-O outdir Specify directory that is to contain output executable, object,
or assembly files (used when specifying multiple source files)
-O is useful to tell the compiler where to put the objects
when you use dcc to compile and link a whole bunch of files
at once. In this case, the -o option would be used to
specify where to put the executable.
NOTE: The -O name is used as a prefix so if you are
specifying a directory be sure it has a ':' or '/' on
the end.
-T tmpdir Specify temporary directory used to hold preprocessed source
files and temporary assembly files... files that will be
deleted after use.
NOTE: The -T name is used as a prefix so if you are
specifying a directory be sure it has a ':' or '/' on
the end.
-s Include symbolic debugging information in the executable. (dlink)
-S When making libraries: uses alternate section naming
conventions so BSS data is placed at the beginning of the
BSS space ... before BSS data from the main object modules
when you link. This allows small-data libraries to be linked
into large-data programs which declare huge amounts of BSS.
-v Display commands as we execute them.
-r Make executable residentable (passed to dlink)
-new Checks timestamps for source/destination and only
compiles/assembles if object is outdated or does not
exist. Used to make DCC a standalone make.
The ENV:DCCOPTS enviroment variable may contain additional options.
Example #1. Compile hello.c to executable. The objects will be
left in T:
1> dcc hello.c -o ram:hello
1> ram:hello
Example #2. Compile hello.c to executable and put the object file
in X:
1> dcc hello.c -o ram:hello -TX:
Example #3. Compile hello.c into object into RAM: then link with symbols
1> dcc -c hello.c -o ram:hello.o
1> dcc ram:hello.o -o ram:hello -s
Example #4. Compile foo.c and link with an already compiled object file
gar.o to produce an executable. foo.o is placed in
T:
1> dcc foo.c gar.o -o ram:foogar
RESIDENTABILITY
To make a residentable executable all source modules must be compiled with
the -r option. You must use the small-data model. NOTE THAT NO BSS SPACE
IS ALLOCATED (the startup code c.o deals with this). Also note that the
geta4() call will not work with residentable programs since there is no
way to get the A4 register. The -r option effects dlink and dc1. Since
dlink does not allow 32 bit data-data relocations the main compiler pass
will produce autoinit code for such data initializations instead of
relocated references.
ERROR REPORTING
Error reporting is better now, but line numbers may not always
be correct.