[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This chapter contains general and installation information about the amiga-port of the GNU C compiler gcc.
1.1 Current Version | The current gcc version | |
1.2 Requirements | Hardware requirements | |
1.3 Authors | Who did it? | |
1.4 Sources for Gcc | Where? | |
1.5 Inline Headers | How to create inline headers? | |
1.6 Amiga Libraries | How to convert amiga-style libs into gcc-style libs | |
1.7 Installation | How to install gcc | |
1.8 How to get help | Sources of useful information |
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The current version of gcc, further refered to as <gcc-current>, is 2.5.8. Work is in progress for version 2.6 which will incldude a new version of the popular ixemul.library, the Unix system-calls emulation shared library, and a brand new C library avoiding gcc compiled programs to use ixemul.library.
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Any Amiga (ranging from A1000 upto A4000/40) will run amigados-gnu utilities. A minimum of 4MB memory is needed in order to compile small/medium projects. More memory will be needed for large projects, such as recompiling gcc itself, or programming C++. Gigamem is known to work with GCC so *maybe* less memory will work. But in this case, an MMU equipped Amiga (A3000,A4000/40) is necessary. @xref{68EC0xx}.
A full installation, including C++/ObjC related files, inline headers, cbm-headers, (@pxref{Includes}) roughly requires about 20 MB of HD space.
Gcc will work under KS 1.2/1.3, but the full functionality is only available under KS 2.x+. A fast CPU (eg. 68030@25MHz or better) is also of help.
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Gcc and related GNU-software has been ported to the Amiga by the following folks: See section How to get help.
Gcc v2.2.2 port: Markus Wild Gcc v2.3.3 port: Markus Wild Gcc v2.4.5 port: Philippe Brand, Lars Hecking, Fred Fish Gcc v2.5.0 and up: Philippe Brand, Fred Fish, Leonard Norrgard Ixemul.library: Markus Wild, Leonard Norrgard, R. Luebbert Libnix: Matthias Fleischer, Gunther Nikl Gerlib: Gerhard Mueller
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
All GCC sources & binaries are available on:
+33-1-60037015 HST Dual v32 terbo 4800-21600 +33-1-60037713 SupraFax v32bis 4800-14400 +33-1-60037716 Tornado v22bis 1200-2400
in Topic ‘Development’, Area ‘Gcc’ (are 156).
GNU source code is available on:
These archives should contain everything necessary to get you going, they don’t include sources for ixemul.library, which are available on Aminet sites in ‘/pub/aminet/dev/gcc/ixemsrc3947.tar.gz’ (as of this writing, work is in progress for the v40 version of ixemul.library, sources will be available on an Aminet site near you).
As stated by Richard Stallman of the FSF:
"The GPL says that any distribution of binaries must contain either the source code or a written offer to supply source code (see the GPL for details of what is required)."
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The inline headers for gcc can be created from the original CBM fd files. @xref{Includes}. @xref{Pragmas}. They can be created as follows:
CLI> Assign INCLUDE: GCC:os-include CLI> Assign FD: INCLUDE:fd CLI> Makedir INCLUDE:inline CLI> cd USR:bin/geninline CLI> gen31
This will create all inline-headers in ‘GCC:os-include/inline’. If you have 2.0 headers, use gen20 instead, if you have 3.0, use gen30. OS3.1 (rev 40.13) inline headers are included with <gcc-current>. See section Current Version.
NOTE: perl scripts do not handle correctly AmigaDOS include files, which seems to mean they are somewhat broken. This needs some voluntary work ...
There is also another way of generating inline headers, using fd2inline program:
CLI> fd2inline <fd_file> <proto_file>
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Amiga-style libraries, such as amiga.lib, cannot be read by gcc directly. They need to be converted into a gcc-readable format using hunk2gcc, the AmigaDOS object converter made by Markus Wild.
To achieve this, simply grab a copy of latest amiga.lib (from Commodore Development Kit, @pxref{Includes}) and make a new directory where you want your converted object files to go, cd into it, and enter
hunk2gcc amiga.lib [..further libs if you like..]
This generates an a.out object file for every program unit present in the hunk file (in this case, from amiga.lib).
As the final step convert all those files into an a.out style library by issuing:
ar qc libamiga.a obj.* ranlib libamiga.a
The ranlib run builds a symbol table in the archive, and makes accesses to the library much faster.
NOTE: As long as you make no AmigaDOs specific calls, you can create a dummy library using:
cat "int dummy;" >dummy.c gcc -c dummy.c ar crv libamiga.a dummy.o mv libamiga.a gcc:lib
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
IMPORTANT NOTE FROM Philippe Brand:
As this is FAQ, most often asked question about gcc-2.5.8 is: "I can’t compile C++ programs, what’s up ?"
In fact, I’ve messed up gcc-2.5.8 distribution. Instead of 2.5.8 versions of C++ and Objective-C compiler passes, 2.5.7 versions were included. You’ve got here 2 options.
- rename lib/gcc-lib/amigados/2.5.7 to 2.5.8 - get gcc258ud.lha on Aminet, which contains proper 2.5.8 versions.
From Aminet get also gcc258ud1.lha which contains some fixed libraries, headers etc...
And DON’T forget to grab gcc258-readme.lha also from Aminet.
CLI> cd Disk_with_lot_space: CLI> lha x gcc258-x.lha
(where x stands for 1 through 4, 5 & 6 if you want also to have sources)
Now from the Workbench, invoke GCC-Install. This is what people wanted, e.g. an Installer based configuration script for GCC.
Thus you only have to unpack archives and the installer script will do the rest, creating environment variables, adding assigns to user-startup, copy library and handler.
BTW:
Installer and Installer project icon (c) Copyright 1991-93 Commodore-Amiga, Inc. All Rights Reserved. Reproduced and distributed under license from Commodore.
Note that you MUST use ixemul.library revision 45 and NOT revision 47, as the latter doesn’t check for ENV:
You need to have a 50.000 stack size in order to compile with GCC. This should be enough for most projects. Note than while recompiling gcc with itself it has takeen more than 245KB stack. Stack can grow due to source complexity. Don’t be afraid of it.
To use ar and/or ranlib, you should have a much larger stack, between 200.000 and 300.000, depending on library size.
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The current amiga-gcc-port maintainer is available:
Philippe BRAND Fidonet: Ramses The Amiga Flying BBS 2:320/104.21 Email: phb@colombo.telesys-innov.fr (ONLY for personnal email). Ftp: colombo.telesys-innov.fr:/pub/amigados-gnu or /pub/incoming/uploads for uploads.
There’s also an amiga-gcc mailing list running in Finland. @xref{Mailing lists}. Philippe Brand will forward all questions to that list, but you’d be better off using it directly ;)
[Top] | [Contents] | [Index] | [ ? ] |
This document was generated on September 19, 2022 using texi2html 5.0.
The buttons in the navigation panels have the following meaning:
Button | Name | Go to | From 1.2.3 go to |
---|---|---|---|
[ << ] | FastBack | Beginning of this chapter or previous chapter | 1 |
[ < ] | Back | Previous section in reading order | 1.2.2 |
[ Up ] | Up | Up section | 1.2 |
[ > ] | Forward | Next section in reading order | 1.2.4 |
[ >> ] | FastForward | Next chapter | 2 |
[Top] | Top | Cover (top) of document | |
[Contents] | Contents | Table of contents | |
[Index] | Index | Index | |
[ ? ] | About | About (help) |
where the Example assumes that the current position is at Subsubsection One-Two-Three of a document of the following structure:
This document was generated on September 19, 2022 using texi2html 5.0.