home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AmigActive 13
/
AACD13.ISO
/
AACD
/
Programming
/
vbcc_MorphOS
/
README.FIRST
< prev
next >
Wrap
Text File
|
2000-08-20
|
8KB
|
232 lines
--- VBCC FOR MORPHOS ---
This is a prerelease of vbcc for MorphOS, which runs native under this
operating system. It is based on a development snapshot of the
current, still unreleased, vbcc 0.7d compiler and comes with config
files to create programs for AmigaOS/68k, PowerUp/PPC and MorphOS/PPC.
The following config files have to be selected when compiling with
the frontend "vc":
+vc.config (or none): MorphOS native
+ppc : PowerUp
+m68k : AmigaOS/68k
INTRODUCTION
vbcc is a free portable and retargetable ANSI C compiler.
This archive contains the compiler, preprocessor, assembler, linker,
frontend, startup codes, C-libraries, amiga.lib replacements as
well as several other tools for M68k, PowerUp and MorphOS.
This gives you a complete system that allows to develop programs in
ANSI C as well as Amiga-specific programs (provided you obtain the
OS-includes) running on MorphOS.
Note that most of the programs in this archive all run natively
under MorphOS. There are only two exceptions:
vbcc/bin/make
vbcc/bin/phxass
which will run emulated on the M68k. PhxAss isn't portable and
I didn't want to compile a new GNU-make for now.
INSTALLATION
Copy the vbcc directory whereever you want on your MorphOS partition
(e.g. MorphOS:vbcc), then add the following assignments to your
S:User-Startup :
;BEGIN vbcc
assign >NIL: vbcc: MorphOS:vbcc/machines/amiga
assign >NIL: vbccmorph: vbcc:/morphos
assign >NIL: vbccm68k: vbcc:/amiga68k
assign >NIL: vbccppc: vbcc:/amigappc
assign >NIL: vincludemorph: vbccmorph:include
assign >NIL: vincludemorph: <os-include-path> ADD
assign >NIL: vincludem68k: vbccm68k:include
assign >NIL: vincludem68k: <os-include-path> ADD
assign >NIL: vincludeppc: vbccppc:include
assign >NIL: vincludeppc: <os-include-path> ADD
assign >NIL: vlibmorph: vbccmorph:lib
assign >NIL: vlibm68k: vbccm68k:lib
assign >NIL: vlibppc: vbccppc:lib
assign >NIL: C: vbcc://bin ADD
assign >NIL: C: vbcc:bin ADD
;END vbcc
Replace <os-include-path> by the path to the directory which contains
your AmigaOS and/or MorphOS header files.
FEATURES
vbcc..
- comes with source (but not in this prerelease!)
- is free
- is portable and retargetable
- comes with a global optimizer that can e.g. do global common
subexpression elimination, constant propagation, function inlining
and several other optimizations (but is not yet finished and may
have some bugs)
- should be ANSI compliant
- can generate code that runs on a plain 68000 CPU
- can generate code optimized for 020/030, 040 or 060
- can generate code that uses the 68881/2, 68040/060 FPUs directly
and comes with appropriate math-libraries
- can generate code that runs on PowerUp-boards
- generates standard Amiga-68k-objects, PPC-ELF-objects or
WarpOS-EHF-objects
- does not need too much memory
- offers a lot of error/warning messages that can be turned on/off
separately
WHAT'S NEW
Some changes since the last release:
- bug fixes
- a better optimizer (-O3 for PPC and -O3 and -O2 for M68k are
still unstable, use on own risk)
- MorphOS support
- pragmas for Amiga-alignment
You can use them to switch to Amiga-alignment while including
AmigaOS header files and compile the rest of your program in
optimal PowerPC alignment. Following pragmas were defined:
#pragma amiga-align
switches to 16-bit alignment as used by AmigaOS
#pragma natural-align
switches to best alignment for CPU, which is 32-bit for PowerPC
#pragma default-align
switches to the alignment defined by the command line, which
is natural-alignment or amiga-alignment, when the option
-amiga-align is given
- stack checking (currently not supported by vc.lib)
REQUIREMENTS
To use vbcc you need:
- an Amiga with OS 2.0 or higher
- enough RAM (it is possible to translate small programs with 1MB, but
for larger programs much more will be needed)
Stuff that is not needed, but may be very useful:
- harddisk
- editor
- make, touch etc.
- the Amiga OS-includes (they can be found on certain CDs)
- pipe-command (to use the message browser)
Also you should know how to use the shell and you should know ANSI C
(if you need a book I recommend (like everyone) "The C Programming
Language, Second Edition, ANSI C" by Kernighan and Ritchie).
LEGAL
vbcc is (c) in 1995-2000 by Volker Barthelmann.
This is a development snapshot which must not be distributed.
Commercial usage is forbidden.
Note that this distribution contains several programs, libraries etc.
that are from different authors and are under different legal status.
So always read the corresponding doc/guide-file to find out under
what conditions a certain file may be used, distributed etc.
For the most part you can assume that you may use everything for
non-commercial purposes and may distribute the unchanged archive
in whole.
Changing any parts from this archive, distributing parts of it or
using it commercially might be legal for certain parts, but illegal
for others, so read all docs carefully before doing any of the above.
This archive contains code written by (this list may be incomplete):
Volker Barthelmann, Frank Wille, Thorsten Schaaps, Dennis Ritchie,
Matthias Fleischer, Gunther Nikl, Kasper Graversen, Johnny Tevessen
CONFIGURATION
The frontend searches for a file vc.config in ENV: and vbcc: to read
preferences. The provided sample vc.config should be usable and does
not have to be changed but you can add something to suit your personal
preferences - read
vbcc/doc/vc.doc
to find out more.
TUTORIAL
If you want to compile and link the program hello.c you can type
vc hello.c
This will compile and link the file hello.c and create the executable
a.out in the current directory.
vc hello.c -o hello
will do the same, but the created executable will be called hello.
vc -c t1.c t2.c
will compile t1.c and t2.c without linking, creating the object files
t1.o and t2.o.
vc t1.o t2.o -o tt
will link them together and create the executable tt.
If your program uses floating point add -lm to the commandline
to link with the math-library, e.g.:
vc calc.c -o calc -lm
If your program uses AmigaOS functions, you have to link with the
amiga-library and take care for correct alignment of header files,
either by using the option -amiga-align or by using #pragma
amiga-align:
vc -amiga-align myOsPrg.c -lvc -lamiga
Note that you should also specify -lvc before -lamiga to avoid
that sprintf() etc. are replaced by versions from amiga-lib.
BUGREPORTS/COMMENTS
Please send all bug reports concerning this MorphOS-native release
to
frank@phoenix.owl.de
Should I find out that it is not a problem of the MorphOS-port, but
of the compiler itself, I will forward your mail to Volker
Barthelmann <volker@vb.franken.de>.
Frank Wille 20-Aug-2000 frank@phoenix.owl.de
Volker Barthelmann volker@vb.franken.de