Introduction ************ This is an attempt of an AmigaOS/MorphOS/Amithlon cross compiler suite, mostly based on GeekGadgets. The packages were built on a PC running RedHat Linux 7.3, but should run on other distributions as well. All packages are installed below /opt/gg, so you may want to mkdir /usr/local/opt ln -s /usr/local/opt /opt first, if you have no separate /opt partition and your root partition is small. The suite is at least complete enough to cross-compile AHI to m68k-amigaos, ppc-morhos and i686be-amithlon, which is what I use it for myself. The binary RPM packages are in this directory. The source code can be found in the SRPM and TAR directories. What's new? *********** 2001-10-14 ¯¯¯¯¯¯¯¯¯¯ * First release. 2001-12-10 ¯¯¯¯¯¯¯¯¯¯ * Minor updates and bugfixes. * Initial Amithlon support. 2002-02-08 ¯¯¯¯¯¯¯¯¯¯ * libnix updated to the final 2.0. * Added more math functions to libnix: acosh() asinh() atanh() cbrt() copysign() erf() expm1() finite() frexp() hypot() ilogb() infinity() j0() j1() jn() ldexp() lgamma_r() log1p() logb() modf() nextafter() remainder() rint() scalb() scalbn() __kernel_cos() __kernel_sin() __kernel_tan() * Much improved Amithlon support (64 bit math, floating point, stripped binaries, much reduced stack usage, faster OS and library calling, almost complete libnix and libamiga). * "flexcat" added. * Packages updated: gg-binutils-common-2.9.1-4.i386.rpm gg-fd2inline-1.35-1.i386.rpm gg-flexcat-2.4-1.i386.rpm gg-gcc-common-2.95.3-3.i386.rpm gg-i686be-amithlon-binutils-2.9.1-4.i386.rpm gg-i686be-amithlon-gcc-2.95.3-3.i386.rpm gg-i686be-amithlon-ixemul-devel-49.0-2.i386.rpm gg-i686be-amithlon-libnix-devel-2.0-4.i386.rpm gg-libnix-common-2.0-4.i386.rpm gg-m68k-amigaos-binutils-2.9.1-4.i386.rpm gg-m68k-amigaos-gcc-2.95.3-3.i386.rpm gg-m68k-amigaos-libnix-devel-2.0-4.i386.rpm gg-ppc-morphos-binutils-2.9.1-4.i386.rpm gg-ppc-morphos-gcc-2.95.3-3.i386.rpm 2002-06-23 ¯¯¯¯¯¯¯¯¯¯ * Packaged and released the 2002-04-12 version of the Amithlon compiler. * Packages updated: gg-i686be-amithlon-gcc-2.95.3-4.i386.rpm 2002-07-01 ¯¯¯¯¯¯¯¯¯¯ * Added a C++ compiler to the m68k and ppc targets, but not for i686be because of missing ixemul. :-( * Packages updated: gg-gcc-common-2.95.3-5.i386.rpm gg-i686be-amithlon-gcc-2.95.3-4.i386.rpm gg-m68k-amigaos-gcc-2.95.3-5.i386.rpm gg-ppc-morphos-gcc-2.95.3-5.i386.rpm 2003-04-22 ¯¯¯¯¯¯¯¯¯¯ * fd2inline updated to version 1.37 (gatestubs, AROS support etc). * Packages updated: gg-fd2inline-1.37-1.i386.rpm 2003-07-31 ¯¯¯¯¯¯¯¯¯¯ * fd2inline updated to version 1.38-1, but is now obsolete. * fd2sfd and sfdc are new packages. They work with the new MorphOS SKD too, which fd2inline does not. * FlexCat updated to version 2.6. * Packages updated: gg-fd2inline-1.38-2.i386.rpm gg-fd2sfd-1.0-1.i386.rpm gg-flexcat-2.6-1.i386.rpm gg-sfdc-1.0-1.i386.rpm 2003-12-22 ¯¯¯¯¯¯¯¯¯¯ * Updated sfdc to version 1.1. This version adds a switch to create standard library/device/boopsi function prototypes and AmigaOS4 support. * Packages updated: gg-sfdc-1.1-1.i386.rpm 2004-06-02 ¯¯¯¯¯¯¯¯¯¯ * Update this file, section "Package notes: Include files", to include the location of NDK 3.9 and the small patch that should be applied. 2004-06-24 ¯¯¯¯¯¯¯¯¯¯ * Updated sfdc to version 1.2. * Packages updated: gg-sfdc-1.2-1.i386.rpm 2004-12-06 ¯¯¯¯¯¯¯¯¯¯ * Updated libnix to 2.0-7. Changes since last release include old unreleased bug fixes (global setjmp/longjmp, missing rem_pio2(), enforer hits in __swbuf() & broken getcwd() [Jens Langner], memcpy() without global SysBase and broken SetSuperAttrs()) and new functions (rem_pio2() and __kernel_rem_pio2(), global lx_select() and ix_select() and UserFilter), and libamiga.a is now in the correct place. * Updated sfdc to version 1.3. Bugfixes, automatic register allocation and functable output. * Packages updated: gg-i686be-amithlon-libnix-devel-2.0-7.i386.rpm gg-libnix-common-2.0-7.i386.rpm gg-m68k-amigaos-libnix-devel-2.0-7.i386.rpm gg-sfdc-1.3-1.i386.rpm 2005-03-14 ¯¯¯¯¯¯¯¯¯¯ * Updated libnix to 2.0-8. Changes include: setjmp/longjmp fixed for Amithlon, PPC/MorphOS port (no baserel version yet!), lots of libsocket bugfixes, removed enforcer hits on bad FDs, asinh() fixed for Amithlon/MorphOS. * Updated flexcat to 2.6.6.20050112-1. * Updated autoconf to 2.59-1. * Updated texinfo to 4.6-1 (by Gunther Nikl). * Added libdebug 1.0-1. * Updated to 1.8: Fixed a major bug in RUNELF that made ix86-to-ix86 calls fail in Amithlon. * Packages updated: gg-autoconf-2.59-1.i386.rpm gg-flexcat-2.6.6.20050112-1.i386.rpm gg-i686be-amithlon-libdebug-devel-1.0-1.i386.rpm gg-i686be-amithlon-libnix-devel-2.0-8.i386.rpm gg-libnix-common-2.0-8.i386.rpm gg-m68k-amigaos-libdebug-devel-1.0-1.i386.rpm gg-m68k-amigaos-libnix-devel-2.0-8.i386.rpm gg-ppc-morphos-libdebug-devel-1.0-1.i386.rpm gg-ppc-morphos-libnix-devel-2.0-8.i386.rpm gg-texinfo-4.6-1.i386.rpm run_elf-1.8.tar.gz Package notes ************* Include files ¯¯¯¯¯¯¯¯¯¯¯¯¯ Amiga include files are not included. Place them in /opt/gg/os-include/amigaos and copy the SFD files to /opt/gg/os-lib/sfd/amigaos. Then run "/opt/gg/bin/gg-fix-includes --include" to copy the include files to the correct location and create prototypes and inlines. To create the library stubs, execute "/opt/gg/bin/gg-fix-includes --lib". If you don't have SFD files, they can be created by using /opt/gg/bin/gg-fix-includes --sfd. This is a must for MorphOS, since there are no SFD files for MorphOS. Amiga provided NDK 3.9 free of charge on their web page. Get it from here: http://www.amiga.com/3.9/download/NDK3.9.lha Then apply the following patch, and you're ready to run gg-fix-includes: diff -ru NDK_3.9/Include/include_h/devices/timer.h /opt/gg/os-include/amigaos/devices/timer.h --- NDK_3.9/Include/include_h/devices/timer.h Mon Dec 17 14:03:44 2001 +++ /opt/gg/os-include/amigaos/devices/timer.h Tue Jan 21 20:35:33 2003 @@ -27,10 +27,17 @@ #define TIMERNAME "timer.device" +#ifndef _SYS_TIME_H_ +/* Use whatever was included first, standard (sys/time.h) or Amiga + * includes (jch). */ struct timeval { ULONG tv_secs; ULONG tv_micro; }; +#else +#define tv_secs tv_sec +#define tv_micro tv_usec +#endif struct EClockVal { ULONG ev_hi; ixemul ¯¯¯¯¯¯ Since I didn't dare to use the cross-compiled ixemul, the RPMs is just a repackaging of the tgz archives. libnix ¯¯¯¯¯¯ The libnix version is based on libnix 2.0 (release), but adds support for native Amithlon development and a few math function. In addition, this version is not public domain, but Runtime GPL protected. flexcat ¯¯¯¯¯¯¯ Flexcat is used to build language catalogs. fd2inline ¯¯¯¯¯¯¯¯¯ fd2inline differs somewhat from the 2.00 version in the MorphOS developer archive. Except for missing features (gatestubs, pragmas), it assumes all inlines are in include/inlines, no matter what processor is used. It's basically a blend between 1.21 and 2.00, with some minor bug fixes, added features and Amithlon support. Starting 2003-07-31, fd2inline has been replaced by fd2sfd and sfdc. fd2sfd ¯¯¯¯¯¯ fd2sfd is based on fd2inline, but has only one output mode: SFD files. sfdc ¯¯¯¯ sfdc is a new tools used to convert SFD files into inlines, pragmas, library stubs, library gateway stubs, clib files etc. GNU utilities ¯¯¯¯¯¯¯¯¯¯¯¯¯ autoconf, automake, gettext, libtool and texinfo-4.0 is from GeekGadgets' CVS repository, with minimal changes. Note that texinfo-4.0 cannot generate AmigaGuideŽ documents, even though the command line switches are accepted. texinfo-3.12 can, but lacks some features required for (re)building the RPMs. Unless you intend to rebuild them, texinfo-3.12 should be used. Target notes ************ MorphOS ¯¯¯¯¯¯¯ For MorphOS development, you'll need the developer archive from . You'll need mossdk_devenv_includes.lha for the include files and mossdk_devenv.lha for the linker libraries. The missing libraries should be copied to /opt/gg/ppc-morphos/lib as follows: /opt/gg/ppc-morphos/lib/libamiga.a /opt/gg/ppc-morphos/lib/libamigastubs.a /opt/gg/ppc-morphos/lib/libsyscalls.a /opt/gg/ppc-morphos/lib/libnix/libc.a /opt/gg/ppc-morphos/lib/libnix/libmemblock.a (I think) /opt/gg/ppc-morphos/lib/libnix/libstring.a /opt/gg/ppc-morphos/lib/libnix/libstringio.a /opt/gg/ppc-morphos/lib/libnix/__nocommandline.o /opt/gg/ppc-morphos/lib/libnix/startup.o This is the layout from the old SDK from . Expect a new compiler package that works with the new linker libraries soon: /opt/gg/ppc-morphos/lib/libb32/libm.a /opt/gg/ppc-morphos/lib/libb32/libnix/libabox.a /opt/gg/ppc-morphos/lib/libb32/libnix/libauto.a /opt/gg/ppc-morphos/lib/libb32/libnix/libc.a /opt/gg/ppc-morphos/lib/libb32/libnix/libdebug.a /opt/gg/ppc-morphos/lib/libb32/libnix/libmath.a /opt/gg/ppc-morphos/lib/libb32/libnix/libmfd.a /opt/gg/ppc-morphos/lib/libb32/libnix/startup.o /opt/gg/ppc-morphos/lib/libm.a /opt/gg/ppc-morphos/lib/libmoto.a /opt/gg/ppc-morphos/lib/libnix/libabox.a /opt/gg/ppc-morphos/lib/libnix/libauto.a /opt/gg/ppc-morphos/lib/libnix/libc.a /opt/gg/ppc-morphos/lib/libnix/libdebug.a /opt/gg/ppc-morphos/lib/libnix/libmath.a /opt/gg/ppc-morphos/lib/libnix/libmfd.a /opt/gg/ppc-morphos/lib/libnix/startup.o Amithlon ¯¯¯¯¯¯¯¯ The Amithlon support is much better than in the last release. Even though the code generated is far from optimal (have a look with "i686be-amithlon-objdump -dr" and see for yourself), 64 bit integers and floating point math should work just fine now, unlike last time. gcc *will* fail with 'internal error' for complex code, though, but it's often easy to change the source code to work around this problem. UPDATE 2002-06-23: All known errors removed, unless you specify ppro optimization! There is no ixemul yet, which means that the flag '-noixemul' must be used. There is a native libnix, and the 'libamiga' version ought to be compete as well (as of 2002-02-08). Amithlon cannot run the binaries directly, so you have to use the "run_elf" tool. For best results, use "run_elf patch" and just run the ELF binaries as if they had been normal hunk files. The patch handles libraries, devices and datatypes as well, of course. One problem is that I didn't fully fix the linker yet, so you have to use the '-r' flag while linking, just like in the glory PowerUp days. But one problem it *doesn't* have is an endian problem, since all data stored in memory has big endian byte order (unless the data is stored in an executable section). The downside of this should be obvious: increased code size and decreased performance. The good news is that you don't have to change a single source line in order to recompile your program into native ix86 code. My Amiga just got eight times faster ... Now, let the processor and platform wars begin! :-) Martin Blom