Here it is, a new distribution of gcc, version 2.2.2. **************************************************************************** What about sources ? **************************************************************************** This archive should contain everything necessary to get you going, it doesn't include the sources for ixemul.library (should be available RSN as a different distribution), and it doesn't include full sources to gcc. If you're interested in the sources required to rebuild gcc, get the original GNU sources (gcc-2.2.2.tar.Z), which should be stored on the same ftp site you got this binary distribution from (if they're not, tell the manager of that ftp site, as this is a requirement of the GNU Copyright LICENSE). Then apply the gcc patch-files in src-patches/, and configure for `amigados'. Same thing goes for libg++-2.2. If you want (ie. you don't have to) get libg++-2.2.tar.Z (again, from the same ftp site you got this distribution from) and apply the libg++ diff from the src-patches directory, then configure for amigados and give it a try. Sources for other tools only included as binaries are available separately in self-contained archives (such as for example gnuinfo-920712.lha for InfoView). | | For the large majority of users, rebuilding gcc is not necessary, you can | just use it as is. | **************************************************************************** What's where **************************************************************************** This release uses a slightly different disk layout than previous versions. I tried to make things a bit more logical, and reduce some weirdness that could only be explained by history ;-) (For example, the obscure gcc20: is gone..) This is the basic directory structure, and what's stored where: COPYING GNU LICENSE, read!! InfoView this is a viewer for .info-* files as you find them InfoView.info in info/. Please read thru this README before trying to use it, you need to setup some things for it to work! README.2.2.2 this file blib/ base relative libraries compilers/ home of compilers called by gcc envarc/ global environment variables you should have set when using this programming environment g++-include/ C++ headers (for libg++) geninline/ Perl scripts to generate inline headers and -lamy glue include/ non-amiga specific C/C++ headers info/ manuals for the compiler and libg++ ixpipe/ a pipe handler needed by the library lib/ normal (ie. not base relative) libraries libauto/ experimental lib to open shared libs at startup libs/ ixemul.library and ixemul.trace os-include/ amiga specific C/C++ headers. Add Commodore headers!! rexx/ ARexx wrappers for gcc and g++ src-patches source patches unix/ a pseudo root for a unix hierarchy The unix/ directory probably needs some more focus, so lets look at it a bit closer: unix/etc: this is /etc, and contains a config file for `man' man.conf unix/dev: not currently used, here to avoid requesters asking you to insert `volume dev:' ;-) unix/usr/bin: this is /usr/bin, and contains all binaries of README.TRACE this distribution that are meant to be directly apropos* invoked by the user (contrary to the executables dump* in compilers/, that are meant to be invoked by a dump.c driver program like gcc or gccv). gcc* apropos,man,whatis build the man-package, gccv* gcc, gccv are the compiler drivers (see below) genclass* genclass is a /bin/sh script used with libg++ ixconfig* dump is a really primitive ps-like dumper, very ixconfig.c internal, you'll probably never use it. less* man* sh* trace* trace.c whatis* unix/usr/share/man: this is the root for tons of man pages, in fact everything I found from BSD is here, probably some stuff as well, that's not (yet?;-)) available in ixemul.library. unix/usr/share/misc: this hosts /usr/share/misc stuff, currently only a termcap file needed by less and InfoView. **************************************************************************** Installation **************************************************************************** Having unpacked this distribution, you already did most of the installation. What's missing are some assigns, and environment variables. In the following section, I'm calling the directory where you unpacked your distribution, {UNPACKED}. Thus {UNPACKED}README.2.2.2 would refer to this file you're reading at the moment. Please replace {UNPACKED} with the actual name of that directory, ie. don't write {UNPACKED}! 1. Load your S:User-Startup file into an editor (use S:Startup-Sequence if you're still using kick 1.3) 2. Somewhere at the end (but before the call to EndCLI when under 1.3!!) add the following lines: ASSIGN gcc: {UNPACKED} ASSIGN usr: gcc:unix/usr ASSIGN lib: gcc:lib ; skip if this collides with other assign ASSIGN bin: usr:bin ASSIGN etc: gcc:unix/etc ASSIGN dev: gcc:unix/dev ASSIGN tmp: t: PATH usr:bin add if you have enough memory, you might also add some of the following lines: RESIDENT gcc:compilers/amiga/2.2.2/cpp RESIDENT gcc:compilers/amiga/2.2.2/cc1 RESIDENT gcc:compilers/amiga/2.2.2/cc1plus RESIDENT gcc:compilers/amiga/2.2.2/as RESIDENT gcc:compilers/amiga/2.2.2/ld RESIDENT usr:bin/gcc especially cc1plus is a good choice for *not* including... 3. when under 1.3, add the following lines: SETENV TERM amiga SETENV LESSCHARSET latin1 under 2.0 just copy the contents of envarc/ into envarc:, thus in the shell do: COPY envarc/#? envarc: and if you want the settings to be done in the current session as well, copy them to env: as well: COPY envarc/#? env: NOTE: if you're using the communication program `Term' by Olaf "Olsen" Barthel, make sure you're using the term: assign to tell Term where to find its configuration files, *not* the TERM or TERMPATH environment variables. These both very much confuse `less' and `InfoView', and they won't work with those wrong settings! You've been warned... 4. make sure the system finds ixemul.library (which is distributed in the libs/ directory). Under 2.0, you might add the following line to S:User-Startup: ASSIGN libs: gcc:libs ADD or for 1.3 (and 2.0) you may just as well COPY libs/ixemul.library LIBS: in the shell. In both cases, make sure the system actually finds the library by issuing a VERSION ixemul.library command in the shell. The output should show at least version 39.44 !! 5. Copy the ixpipe-handler into your L: directory (or under 2.0, add ixpipe/ to your L: multiassign) COPY ixpipe/ixpipe-handler L: Then, depending on your OS version, do the following: 1.3: append the ixpipe/Mountlist entry to your DEVS:Mountlist, and add MOUNT IXPIPE: to your S:Startup-Sequence. 2.0: append the ixpipe/Mountlist entry to your DEVS:Mountlist, and add MOUNT IXPIPE: to your S:User-Startup. 2.1: add those entries to your DOS drivers: COPY ixpipe/IXPIPE(%|.info) DEVS:DOSDrivers NOTE: 2.1 is not yet officially released by Commodore! 6. *VERY IMPORTANT* Make sure your STACK setting is at least 250000, or the compilers *will* crash on larger source files!! 7. the os-include/ directory is meant to contain the Amiga specific headers distributed by Commodore. It already contains 2.0 inline headers for use with gcc (instead of pragmas used by other compilers). You'll have to add the other headers yourself, since I can't include them, they're copyrighted (blech). In os-include/devices/ you find a small patch you might apply to the system timer.h file, to make that compatible with the rest of the library. **************************************************************************** Getting started **************************************************************************** After installation (make sure your changes have been integrated into the system. Best thing to do is to reboot your machine) you're ready to read thru the provided documentation. On Workbench, double-click the InfoView icon, or just start InfoView from the Shell/CLI. You're then presented a hierarchical document browser, if you don't know it already, best thing to do is to go thru the short tutorial. If you'd like to read the tuturial, just enter `h' (ie. the h key, no quotes). There's a second set of information available in this programming environment, and that's man pages. There's no Workbench compatible program to access them, so you'll have to switch to a shell. The first man page you probably want to read, is a manual for man itself. For this, enter man man in your shell. To get a quick summary of command line options for gcc, do man gcc etc, you get the point. The large bulk of provided man pages is for the functions available in ixemul.library. If you want more information on how to call fopen() for example, you'd get it with man fopen **************************************************************************** ARexx **************************************************************************** The provided ARexx scripts have been contributed by Loren J. Rittle. If you like ARexx, they're an alternate way of calling gcc. They automatically make sure you're using a large enough stack setting, and enable you to compile C++ programs with less obscure options. This approach is furthermore useful if you're not able to use the g++ /bin/sh script. **************************************************************************** /bin/sh scripts **************************************************************************** Currently, genclass and g++ are provided as the original /bin/sh scripts. Due to a bug in ixemul.library (affecting vfork()) they currently only work with kick 2.0 or better. If you feel adventurous and like to fix the 1.3/arp vfork(), tell me;-) **************************************************************************** gcc versus gccv **************************************************************************** gccv stands for a gcc using vfork() to spawn a new process, and then calling the new execve() function in ixemul.library to call its subcompilers. Gcc continues to using the more system friendly RunCommand() function in dos.library to start subcompilers. Gccv has the advantage of being able to work with interprocess pipes, thus (provided you have the memory ;-)), you're able to do gccv -pipe your_program.c causing the preprocessor (cpp), the C-compiler (cc1) and the assembler (as) to run at the same time, passing intermediate files thru internal pipes instead of using temporary files. As long as you don't want that feature (ok, playing with certain make tools also requires gccv) you're safe using gcc. **************************************************************************** Running gcc and ixemul.library with 1.3 **************************************************************************** Gcc should still work under 1.3, although I didn't test lately. Things that won't work currently are programs using vfork(), thus you won't currently be able to use gccv, nor any shell scripts using /bin/sh. Due to popular demand, I revamped the startup code of ixemul.library to not fail if mathieeesingbas.library is not available. If that happens, ixemul functions that would require functions from mathieeesingbas.library are instead rerouted to a function that just displays a requester telling you that you'd need mathieeesingbas.library to use that function, and then aborts the program. Mathieeesingbas.library implements single precision IEEE floating point arithmetics, used to implement the `float' data type in gcc. It comes in the ROMs of 2.x equipped machines, and is available as a disk-loadable library for 1.3 from Commodore. **************************************************************************** And as always, have fun ! **************************************************************************** This release has been delayed due to other projects I had to really finish in time, mostly some final stuff for my studies ;-) I'm sorry for this! However, chances are high that future gcc versions will include the major amigados changes in the official GNU sources, so you should get immediate amigados support, as soon as GNU releases a new copy of gcc. I'm currently negotiating with RMS about the details. Markus M. Wild You can reach me: or (which will soon change to amiga.icu.unizh.ch)