home *** CD-ROM | disk | FTP | other *** search
- First the legal stuff:
-
- This archive contains two independant parts, one consists of the binaries
- for the GNU C compiler V2.0, those files are all in the `gcc20' tree, and
- are subject to the license specified in the COPYING file.
-
- The other part consists of new versions for my shared C library and the
- link level counterparts. Those files are subject to the COPYING.LIB file.
-
- You can get the full distribution for gcc2.0 for example from
- prep.ai.mit.edu, the source for the library is available for example from
- amiga.physik.unizh.ch.
-
- -----------------------------------------------------------------------------
-
- A special note to the library: I'm currently changing the library sources
- to finally adapt more closely to the BSD-net2 distribution. As a goal, this
- library should then also support networking, starting with AF_UNIX sockets
- and pipes implemented ala socketpair(). The library that is included in libs/
- is a mixture between old and new code, I can therefore not distribute any
- sources until the library has been changed completely. The reason I'm
- including this version is that I'd like to get feedback whether the new
- way to deal with packets that this library uses causes problems on some
- Amigas. So if you find this library to cause problems (crashes, other weird
- things), *AND THE PREVIOUS VERSION WORKED*, please tell me, I'd very much
- like to get rid of such problems before the next version is released.
-
- You might notice that the startup code changed, this is to allow full
- implementation of execve() and friends, thus to actually pass an argument
- vector instead of a commandline to started programs. vfork() is there
- as well as wait4() and friends. You may try your luck on those new
- functions, but keep in mind that *they are not supported* at the moment.
- There are problems with vfork() that I'll fix in the next release, but I'll
- have to include support for process groups to do it `right', currently you
- cannot ^C break any children spawned with vfork() with the keyboard, BREAK
- works though. An other problem exists with pipe(): if you break a reader,
- the pipe might hang and you're not able to kill the writer. This will be
- fixed by using sockets and sending the apropriate SIGPIPE to the writer
- (the problem is permanent under 1.3, the 2.0 pipe is lots smarter, but not
- yet perfect ;-)).
-
- To repeat the important information: the functions are there, but unless
- you know what you do, don't use them, not all problems are solved in this
- library release!
-
- -----------------------------------------------------------------------------
-
-
- INSTALLATION
-
- This distribution only contains the compilers and changed parts of my C
- library. If you don't have a C library yet, you'll have to get one to be
- able to compile C programs. You can either get my library (get
- ixemlib9201.lha and 3 ixemupd* files) or use another C library you might
- already have. If you're not using my library, here's what you have to
- do in short form:
- o create a directory, assign GCC: to it
- o create a directory called gcc:lib, here go your crt0.o and libc.a files
- o create a directory called gcc:include, that's where your headers go
- The ixemlib9201.lha archive contains a Readme that explains this setup
- in greater detail).
-
- The distribution contains 3 directories:
- gcc20 - this contains stuff for gcc2.0
- gcc - this contains updates for the gcc: tree if you use my library
- libs - this contains ixemul.library, which is used by gcc2.0, and
- which you have to copy to your LIBS: directory. This library
- overrides all previous versions, please replace any older
- copy!
-
- To install gcc2.0, you just have to assign GCC20: to gcc20/, ie. the directory
- tree called gcc20/ that you created by unpacking this archive.
-
- Then add gcc20:bin to your PATH, and you're finished installing gcc2.0, it can
- then be used like `gcc hello-world.c'.
-
- *Be sure to use a large enough STACK setting! I'm using a STACK 250000 myself,
- *and this worked even for the weirdest programs. You *will* crash the machine
- *or get the weirdest errors if you use the Commodore default of 4k !!!!
-
- The stuff in gcc/ should be placed at the apropriate place in your gcc:
- tree, it gives you a newer startup code (that now passes DOSBase and
- SysBase to your programs), and a newer libc.a (see the comments at the
- begin as well for comments to this version of the library).
-
- Repeating myself, copy libs/ixemul.library to LIBS: !
-
- Read the original manuals as well: read the info* file in the info
- directory. NOTE: the info files are not complete! I didn't include any
- files that describe compiler interna, as they are not of interest to the
- majority of users that don't plan to change gcc itself. If you want the
- complete manual, get the whole distribution from (for example)
- prep.ai.mit.edu!
-
-
-
- HOW TO CALL THE C++ COMPILER
-
- The Unix copy of gcc-2.0 comes with a shell script, that emulates `gpp' in
- its behavior to even call the C++ compiler on `*.c' files. Either call
- your C++ files `*.cc' (the preferred solution), or call the C++ compiler
- explicitly by using the `-x c++' switch to the compiler. If someone
- rewrites the Unix shell script `c++' to AmigaDOS script language or AREXX
- I'd be happy to include that with this AmigaDOS distribution! For AREXX
- keep in mind though, that pushing commands into the input stream won't work,
- since this trick is not usable from Makefiles! The Unix `c++' script
- includes `-lg++' by default, you have to do this explicitly when calling
- gcc directly.
-
-
-
- WHAT ABOUT `protoize' AND `unprotoize'
-
- Those programs are part of the Unix distribution of gcc-2.0. I'm not
- including them because I haven't removed all Unix dependencies yet (there
- are some problems regarding the colon as both a device terminator under
- AmigaDOS and as a field separator in gcc-2.0 -fgen-aux-info output).
- I nevertheless included the SYSCALLS.c.X file I generated, and this file
- should include all 2.04 functions defined in the various clib/ prototype
- files. If you want to try to port `protoize' yourself, this file should
- help you convert most programs using Amiga library functions to ANSI-C.
-
-
-
- COEXISTANCE OF GCC 2.0 with GCC 1.40 & G++ 1.40
-
- If you want to use the older compiler as well as gcc2.0, all you have to do
- is to rename gcc20:bin/gcc to gcc20:bin/gcc2, then you can use `gcc' and
- `gpp' as usual to refer to the 1.40 compilers, and `gcc2' to refer to
- gcc2.0. You might as well update some programs of 1.40:
- copy gcc20:lib/gcc/as local:gcc-as
- copy gcc20:lib/gcc/ld local:gcc-ld
- Don't copy cpp over though, cpp depends on the compiler version !
-
- If you're using g++-1.40 and the C++ compiler of gcc-2.0 concurrently, you'll
- probably only want to keep one copy of C++ header files. G++ 1.40 expects to
- find them under
- LOCAL:g++-include
- but gcc-2.0 looks for them in
- GCC20:lib/g++-include
- To fix this, you can either make a symbolic link to where you keep your
- C++ headers, or you can use the following directory tree:
- GCC20: -> <the base directory of your gcc20 tree>
- LOCAL: -> GCC20:lib
- /gcc-cpp }
- /gcc-cc1 }
- /gcc-cc1plus } these are the 1.40 compilers
- /gcc-as }
- /gcc-ld }
- /g++-include C++ headers for both, 1.40 and 2.0
-
- /gcc
- /cpp }
- /cc1 }
- /cc1plus } these are the 2.0 compilers
- /cc1obj }
- /as }
- /ld }
-
- /amiga/2.0 contains Amiga specific stuff
-
-
-
- SOME FREQUENTLY ASKED QUESTIONS
-
- Q: `I keep getting requesters saying, that mathieeesingbas.library couldn't
- be opened. Does gcc not work under 1.3??'
- A: Gcc *does* work under 1.3, but it needs the single precision math libraries
- to implement the C `float' data type. The mathieeesingbas.library is built
- into ROM under Kick 2.04, but is needed as a file in LIBS: under Kick 1.3.
- You have to ask your local Commodore support for this library, or if you're
- lucky, you can get it from an (illegally.., not by myself!) posted article on
- comp.sys.amiga.programmers. If you didn't capture that article, perhaps
- somebody else had, but DON'T ASK ME! I won't send you neither the libraries
- nor the article in question!
-
- Q: `I don't get any .o files, even though the assembler seems to be called
- correctly.'
- A: This problem should have vanished in the mean time. It resulted from using
- a bogous copy of the assembler. Use the one provided in this release, and
- the problem should go away.
-
- Q: `Program <xy> that uses ixemul.library requests the LOCAL: drive, which
- I don't have?!'
- A: ixemul.library searches LOCAL: for a timezone database. All you have to do
- is assign LOCAL: to some existing directory, and the functions will be able
- to determine that no such database exists. If you have gcc-1.40 installed,
- you won't have this problem, as LOCAL: is used to find the compiler passes.
-
- Q: `I keep getting a bus error using program <xy>, what's wrong?'
- A: Tell me which program generated that error. This is most certainly a program
- that contains 68020 code and which you tried to run on a 68000 machine.
- As long as the program is not specifically marked as `68020 only', this is
- to be considered a bug!
- This error might as well fit into the next question, read on!
-
- Q: `My machine always crashes when I try to use gcc, or I get weird error
- messages like "bus error" or "illegal instruction". Sometimes I can
- successfully compile, but the machine crashes soon afterwards, when I
- execute programs that normally don't crash.'
- A: Did you set your STACK high enough? The Commodore default of 4k is WAYS too
- low for GNU programs, I have my STACK at 250000, you might try lower
- values, but I'd recommend not going below 100k !
-
- Q: `I did "gpp -lg++ test.cc" and kept getting errors at link time'
- A: Supply the libraries AFTER the source/object files.
- Thus do `gpp test.cc -lg++' in this example.
-
- Q: `Now that we have gcc2.0, can I remove my 1.40 compilers?'
- A: Depends on what you're programming in mostly. If you're only interested in
- the C compiler, you can remove the 1.40 gcc, no problem. If you're a C++
- programmer though, I'd suggest (if you have the disk space) you keep your
- 1.40 g++, since the language definition changed slightly from 1.40 to
- 2.0, and the 2.0 C++ compiler seems buggier than the 1.40 one. The 2.0
- C-compiler could demonstrate reliability by recompiling itself, the C++
- didn't have a comparable chance. Use the 2.0 C++ compiler though! The C++
- language implemented by gcc2.0 is richer than the 1.40 one, templates are
- supported, ANSI exceptions, etc. By keeping the 1.40 compiler you just keep
- the option of reverting to 1.40 in cases where you're not sure whether your
- program or the compiler is buggy.
-
- Q: `Although I don't define "alloca" to be "__builtin_alloca", gcc2.0 uses its
- builtin function for it, what can I do?'
- A: Use the `-fno-builtin' switch.
-
-
- Good luck with this really great compiler. I'd like to thank all the wonderful
- guys that made this compiler what it is today, thank you! For the contributors
- to gcc-2.0, read the GNU CC manual!
-
-
- -Markus Wild
-
- You can reach me as:
-
- <wild@nessie.cs.id.ethz.ch> or as <wild@amiga.physik.unizh.ch>
-