GCC 4.0.3 ========== This package is based on GCC 4.0.1 port from Emmanuel 'Emm' Lesueur. It was synced with recent 4.0.3 with some additional fixes from SVN repository. It contains compiler with recent version of binutils package and updated libnix version adapted to work with GCC4. Installation: ============= Generaly depack this archive to gg: directory should be enough. If you have any problem with installing it just contact with me. You can use both compilers (2.95.x and 4.0.x) at the same time, but if you have libstdc++.a in gg:lib you need to move gg:lib/libb32/libstdc++.a and gg:lib/libstdc++.a to gg:lib/ppc-morphos-/2.95.3/ (Do not forget to adjust links to moved libraries) The includes (This part is taken directly from gcc-4.0.1-20050909.readme): ============= The cxxinclude directory contains the standard C++ includes for g++. As long as you use g++4 as frontend when compiling C++ code, you don't need to include this dir in you search path, it is there by default. The new-include directory contains a rewrite of most of the standard ISO includes for C99. They are supposed to be 'clean' and shouldn't conflict with the C++ includes. They are usable with both ixemul and libnix, but make sure you use the -noixemul switch at compile time as well as link time. Those includes contain most of what is required by the C99 standard, but very little more, so better not use them if you need POSIX or Unix compatibility. They are included because the old ixemul and libnix includes easily run into conflicts with the C++ includes. They are at a very early development stage and have not been tested much, so they are not included in the default search paths. If you want to use them, use a -I option. The libraries (This part is taken directly from gcc-4.0.1-20050909.readme): ============== The libnix libraries and the libstdc++ ones come in four flavors : - no special option - -mresident32 - -maltivec - -mresident32 -maltivec The ixemul libraries libraries come in two flavors : - no sepcial option - -mresident32 The executables (This part is taken directly from gcc-4.0.1-20050909.readme): ================ All the executables in this archive are 'pure' and can be made resident. You probably want to make gcc4, cc1 (or cc1plus), and as resident, and maybe collect2 and ld too. The preprocessor cpp4 is typically not used, as it is merged with cc1 (and cc1plus). Documentation (This part is taken directly from gcc-4.0.1-20050909.readme): ============== See http://gcc.gnu.org/onlinedocs Examples (This part is taken directly from gcc-4.0.1-20050909.readme): ========= Compiling C code : gcc4 -o hello hello.c Compiling optimized C code that can be made resident : gcc4 -o hello -O2 -mresident32 hello.c Compiling C++ code : g++4 -o hello hello.cxx or if you have conflicts with your old includes : g++4 -I/gg/new-include -o hello hello.cxx Differences with gcc-2.95.3 (This part is taken directly from gcc-4.0.1-20050909.readme): ============================ - gcc 4 is much more strict than gcc 2, so expect more warnings/errors when compiling old sources that are not fully ANSI compliant. Some old extensions have been dropped, and some others require a compiler switch to work. - You may want to use the -fno-strict-aliasing option to prevent too aggressive aliazing optimizations. Although I know of no bug in gcc's code generator without this option, lots of (broken?) code seem to fail to work without this option. - This version of gcc contains no MorphOS specific extensions besides the -mresident32 option. I.e., it doesn't support varargs68k, __saveds, stack checking, automatic stack extension (besides __stack support in the startup code). - Generaly do not use new-include with ixemul programs. Some features required by it are missing and wont work. Also propably C++ code wont work with ixemul compiled binaries. Licenses (This part is taken directly from gcc-4.0.1-20050909.readme): ========= All the files in this archive are under GPL (see COPYING), except the contents of the new-include directory. Besides a few files that have a BSD header, the contents of the new-include are copyrighted by me (Emmanuel Lesueur), and can not be distributed without my permission. Source: ======== Diffs can be found http://www.tbs-software.com/morgoth/files/gcc-4.0.1-20050909.diff Contact: ========= Marcin 'Morgoth' Kurek