From e1476c15b3d28a6e965bf70ab2a4e95326044972 Mon Sep 17 00:00:00 2001 From: Olaf Barthel Date: Thu, 20 Jan 2005 12:47:31 +0000 Subject: [PATCH] - Added instructions for switching over an existing Amiga 68k GCC installation to use "clib2". git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14808 87f5fb63-7c3d-0410-a384-fd976d0f7a62 --- documentation/GCC-68K | 50 +++++++++++++++++++++++++++++++++ documentation/specs | 64 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 114 insertions(+) create mode 100644 documentation/GCC-68K create mode 100644 documentation/specs diff --git a/documentation/GCC-68K b/documentation/GCC-68K new file mode 100644 index 0000000..22ab6b6 --- /dev/null +++ b/documentation/GCC-68K @@ -0,0 +1,50 @@ +You can use the 68k build of clib2 with the existing Amiga 68k ports of the +GNU 'C' compiler. In order to do so, you need to modify the "specs" file which +controls how the compiler(s) and the linker interact, and where the linker +will look for the program startup code and library files. Also, you will need +to copy the header files, startup code and library files to the locations +where the 'C' compiler and linker expects them. + +Please read the following description before you follow the instructions. The +changes suggested may have unexpected side-effects! + +I have provided a working "specs" file with this documentation file. To switch +over an existing Amiga 68k port of GCC to use clib2, you would proceed as +follows: + + - Locate the directory within which GCC is installed. For example, this + could be within a directory to which the name "ADE:", "GG:" or "GCC:" + is assigned. For the sake of simplicity, the following notes assume + that the assignment name is "GCC:" + + - Make backup copies of the following directories and files: + + GCC:lib/gcc-lib/amigaos/2.95.3/specs + + (NOTE: Check the directory called "GCC:lib/gcc-lib/amigaos" + first; the "2.95.3" quoted above refers to the version, + revision and patch number of the GCC installed and your + version number may differ!) + + GCC:include + GCC:lib + + - Now you can proceed to install clib2; just copy the "include" and "lib" + directories over, like this: + + Copy include GCC:include all quiet + Copy lib GCC:lib all quiet + + - Finally, replace the "specs" file with the one provided: + + Copy specs GCC:lib/gcc-lib/amigaos/2.95.3/specs + + (NOTE: Check the directory called "GCC:lib/gcc-lib/amigaos" + first; the "2.95.3" quoted above refers to the version, + revision and patch number of the GCC installed and your + version number may differ!) + +Once you have completed these steps you should be able to build programs using +the 68k build of clib2 and you currently installed GCC. Note that these +changes may have the effect of rendering your C++ compiler unusable, so make +sure that you've made backup copies of all files and directories first! diff --git a/documentation/specs b/documentation/specs new file mode 100644 index 0000000..bc1591b --- /dev/null +++ b/documentation/specs @@ -0,0 +1,64 @@ +*asm: + %{m68000:-mc68010} %{mc68000:-mc68010} %{m68020:-mc68020} %{mc68020:-mc68020} %{m68030:-mc68030} %{m68040:-mc68040} %{m68060:-mc68060} %{m68020-40:-mc68020} %{m68020-60:-mc68020} %{!mc68000:%{!m68000:%{!mc68020:%{!m68020:%{!m68030:%{!m68040:%{!m68060:%{!m68020-40:%{!m68020-60:-mc68010}}}}}}}}} %{msmall-code:-sc} + +*asm_final: + + +*cpp: +%{m68881:-D__HAVE_68881__} %{!ansi:%{m68020:-Dmc68020} %{mc68020:-Dmc68020} %{m68020-40:-Dmc68020} %{m68020-60:-Dmc68020} %{m68030:-Dmc68030} %{m68040:-Dmc68040} %{m68060:-Dmc68060}} %{m68020:-D__mc68020__ -D__mc68020} %{mc68020:-D__mc68020__ -D__mc68020} %{m68020-40:-D__mc68020__ -D__mc68020} %{m68020-60:-D__mc68020__ -D__mc68020} %{m68030:-D__mc68030__ -D__mc68030} %{m68040:-D__mc68040__ -D__mc68040} %{m68060:-D__mc68060__ -D__mc68060} + +*cc1: +%{resident:-fbaserel} %{resident32:-fbaserel32} %{msmall-code:-fno-function-cse} + +*cc1plus: + + +*endfile: + + +*link: +%{fbaserel:%{!resident:-m amiga_bss -fl libb}} %{resident:-m amiga_bss -amiga-datadata-reloc -fl libb} %{fbaserel32:%{!resident32:-m amiga_bss -fl libb32}} %{resident32:-m amiga_bss -amiga-datadata-reloc -fl libb32} %{g:-amiga-debug-hunk} %{m68020:-fl libm020} %{mc68020:-fl libm020} %{m68030:-fl libm020} %{m68040:-fl libm020} %{m68060:-fl libm020} %{m68020-40:-fl libm020} %{m68020-60:-fl libm020} %{m68881:-fl libm881} + +*lib: +%{mstackextend:-lstack} -lc -lamiga -ldebug -lgcc -lc + +*libgcc: + + +*startfile: +%{resident32:nr32crt0.o%s mainb32.o%s}%{!resident32:%{fbaserel32:nb32crt0.o%s mainb32.o%s}%{!fbaserel32:%{resident:nrcrt0.o%s mainb.o%s}%{!resident:%{fbaserel:nbcrt0.o%s mainb.o%s}%{!fbaserel:ncrt0.o%s mainnb.o%s}}}} + +*switches_need_spaces: + + +*signed_char: +%{funsigned-char:-D__CHAR_UNSIGNED__} + +*predefines: +-Dmc68000 -Damiga -Damigaos -DMCH_AMIGA -DAMIGA -D__chip=__attribute__((__chip__)) -D__saveds=__attribute__((__saveds__)) -D__interrupt=__attribute__((__interrupt__)) -D__stackext=__attribute__((__stackext__)) -D__regargs=__attribute__((__regparm__)) -D__stdargs=__attribute__((__stkparm__)) -D__aligned=__attribute__((__aligned__(4))) -Asystem(amigaos) -Acpu(m68k) -Amachine(m68k) + +*cross_compile: +0 + +*version: +2.95.3 + +*multilib: +. ; + +*multilib_defaults: + + +*multilib_extra: + + +*multilib_matches: + + +*linker: +collect2 + +*link_command: +%{!fsyntax-only: %{!c:%{!M:%{!MM:%{!E:%{!S:%(linker) %l %X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} %{r} %{s} %{t} %{u*} %{x} %{z} %{Z} %{!A:%{!nostdlib:%{!nostartfiles:%S}}} %{static:} %{L*} %D %o %{!nostdlib:%{!nodefaultlibs:%G %L %G}} %{!A:%{!nostdlib:%{!nostartfiles:%E}}} %{T*} + }}}}}} +