This is a binary distribution of the GeekGadget environment for MorphOS. It is intended to be separated from the 68k GeekGadget environment. INSTALLATION: ------------- +-------------------------------------------------------------------+ | | | DO NOT UNPACK THOSE ARCHIVES OVER YOUR 68K GEEKGADGET DIRECTORY | | | +-------------------------------------------------------------------+ Otherwise, you'll overwrite the 68k binaries by the ppc ones, making all unusable under AmigaOS. Instead, do something like that: make two directories containing both distributions, say GeekGadgets:GG-68k and GeekGadgets:GG-ppc, and have the following in your user-startup: ;BEGIN GG C:Version >NIL: MorphOS 0 If WARN Assign GG: GeekGadgets:GG-68k Assign BIN: GG:bin Assign L: GG:sys/l GeekGadgets:GG-68K/sys/l add Assign S: GG:sys/s GeekGadgets:GG-68K/sys/s add Assign LIBS: GG:sys/libs GeekGadgets:GG-68K/sys/libs add Else Assign GG: GeekGadgets:GG-ppc Assign BIN: GG:bin GeekGadgets:GG-68k/bin Assign L: GG:sys/l add Assign S: GG:sys/s add Assign LIBS: gg:sys/libs add Endif Assign GNU: GG: defer Assign USR: GG:USR defer Assign LOCAL: ram: defer Assign ETC: GG:etc defer Assign INFO: GG:info defer Assign MAN: GG:man defer Assign TMP: GeekGadgets:tmp Assign ADE: GG: defer ;END GG and add bin: to your path. This way, the correct environment is used. The 68k binary is used for programs that are not available as native MorphOS executables. ixemul.library.elf and ixnet.library.elf should go in GG-ppc/sys/libs. Copy emulincludes/include-gcc from the MorphOS developer release to GG-ppc/os-include. Copy lib/libamiga.a, lib/libsyscalls.a, and lib/libamigastubs.a from the MorphOS developer release to GG-ppc/ppc-morphos/lib Make a GG:lib/libnix directory and put lib/libc.a, lib/libstring.a, lib/libstringio.a, and lib/startup.o in it. Usage: ------ This environment is a straight recompilation of the 68k GeekGadgets, so it works in exactly the same way. Exception: gcc/binutils have been adapted for the new ppc-morphos target. See below. As with the 68k GG environment, you have to watch out for stack. Packages seem to work fine with the default stack, but if you get crashes, try increasing it. The 68k stack is set by the 'stack' command, as usual, but it should not matter for native binaries. The PPC stack can be set with the IXPPCSTACK environment variable. The 68k 'ixstack' program can be used on PPC binaries too, to set the stack for an individual program. It can't be used to watch the stack usage of a running program, currently. Important: gcc needs a lot of stack. I have compiled gcc with automatic stack-extension, so that should not be a problem. But I'm not completely certain that the stack extension code is flawless. So if gcc crashes, try increasing the stack. GCC: ---- It work mostly like the 68k version, except that it targets ppc-morphos instead of m68k-amigaos. To compile a program using ixemul, simply do: gcc -o hello hello.c To compile with libnix, use: gcc -noixemul -o hello hello.c To optimize for a processor, add e.g. '-O2 -mcpu=604e -mmultiple'. It is probably wise to add the '-mstrict-align' option too, if you use Amiga specific structures. Otherwise you may get crashes for misaligned accesses. This option makes ugly code, though, so you may want to try without it first. I'll probably do something about this problem later. New options for ppc-morphos (experimental): -mstackcheck: add stack checking code. -mstackextend: automatic stack extension. (even more experimental, mostly untested:) -mbaserel32: use 32bits r13-relative addressing for data. (don't work yet:) -mresident32: make reentrant programs -mbaserel: use 16bits r13-relative addressing for data. -mresident: make reentrant programs with small data. Those options don't work with libnix yet. Note that unlike ppc-amigaos-ld, ld does not need the -r option, reports undefined symbols, and sets the 'e' bit. It is also safe to use 'strip'. Known problems: --------------- - man doesn't work. - ixstack (68k) sometime crashes. - the native 'rm' sometimes locks up. Avoid using it for now, use the 68k one instead. The whole thing is still experimental and needs some cleanup. Emmanuel Lesueur