This passage describes how to setup a build envirnoment for classic Amigas like OS3.9 and UAE running OS3.9. How this information applies to OS4.0 and Morphos has to be seen.
If someone has setup a build envirnoment for other system, like OS4.0 or Morphos or a cross compiler envinoment on Linux,... is free to post in the detailed information, so that can be pulished here.
Furthermore this documentation is still buggy, thus only a raff guidline. Errors can
be reported at the . An the suffix of file
can be different like .tar.gz
and .tgz
are the same, just
write the correct suffix.
Where to get all needed files can be figured out in the downloads section.
But now lets start step for step how to setup it:
Development:
cd Devlopment:
, thus we are in the root directory of Development:
S:Shell-Startup
needs to be edit: add the line Stack 50000
S:User-Startup
needs to be edit: add the following
Assign TMP: T:
Assign GG: Development:gg
Assign BIN: GG:bin
PATH BIN: add
Assign Libs: GG:Sys/Libs ADD
Archives
on Volume Devlopment
First the need to setup a basic unix like shell, thus all unix type tools run smoothless:
Unpack the BOOT.lha
file like this
lha x :Archives/BOOT.lha GG:
Next start a unix like ch
shell:
bin:sh
The result will be a prompt like this:
$
Next up is te install the ggc
and binutils
:
Unpack the packages like this
cd /gg
tar -xvzf :Archives/gcc-3.4.1-bin.tgz
tar -xvzf :Archives/binutils-2.9.1-bin.tgz
Give the gcc a try with:
gcc --version
Now we will installed the libnix
linker library, this is replacement linker library for the
shared ixemul.library
. The libnix
package needs to be patched, thus we install the
patch
tool as we go.
cd /gg
tar -xvzf :Archives/patch-2.5-bin.tgz
tar -xvzf :Archives/libnix-2.1-bin.tgz
cd /gg/lib/gcc/m68k-amigos/3.4.0
patch specs :Archives/specs.diff
Now we install, the amiga
linker library, this normally not needed anymore,
because modern compiler are able to call directly the library function instead of through linker stubs. But somehow the
configure cript won't go through without it. This linker library can be forced to be ommited during compile with the gcc option
-nostdlib
cd /gg
tar -xvzf :Archives/libamiga-bin.tgz
Next up is the installation fo the amiga os header file from the Amiga NDK
.
From the fd include file we will create pragma/inline files, which we compiler needs to be able to call directly library functions
without the need of the amiga linker library. To create this file we need to install the
fd2inline
tool.
cd /gg
tar -xvzf :Archives/fd2inline-1.11-bin.tgz
From the Amiga NDK
we needn't all the contained files, thus we will
extract it into the ram disk and copy the needed files. We will now for a short trip leaving th sh
shell.
lha x :Archives/NDK3.9.lha RAM:
exit
copy RAM:NDK_3.9/Include/include_h/#? to GG:os-include all
copy RAM:NDK_3.9/Include/fd/#? to GG:fd all
Now we need to create the inline/pragma headers. There are two solution one is to use the scripts included in the
GCC Installer distribution from kefren, or do it manually. First the the script they,
assuming that the script have been copy from the GCC installer distribution into Development:Archives/scripts
.
Furthermore on script need a modification in the first line: remove the '. (It's the gen_protos.script)
bin:sh
. :Archives/scripts/gen_inlines.script
. :Archives/scripts/gen_protos.script
The other they is to cd /gg
and write for each file in gg:fd
write the following:
fd2inline /gg/fd/#?.fd /gg/ox-include/clib/#?.h -o /gg/include/inline/#?.h
fd2inline --proto /gg/fd/#?.fd -o /gg/include/proto/#?.h
Now we install some header files from the ixemul packege, which seems needed by some parts??
cd /gg
tar -xvzf :Archives/ixemul-48.0-emv-bin.tgz
tar -xvzf :Archives/ixemul-48.0-inc-bin.tgz
Now we installe the a2ixlibrary
too. This tools allows the
transfer of shared linker library into amiga dynamically librarys. This a2ixlibrary needs a patch version of
ggc
. The patch version allows .x
have any location, so that
a2ixlibrary can find them. The lcoation can be supplied by commmand options. Normally the files have
fixed directory.
cd /gg
tar -xvzf :Archives/a2ixlibrary-2.1-amiga.tar.gz
Nest up is the gnu make
in arecent version. The version here used
is from aminet and somehow packe with lha and inside tared. Thus we will unpack it first into ram: and so exit the
unix sh
shell.
exit
lha x :Archives/make-3.80.lha ram:
bin:sh
cd /gg
tar -xvf /ram/make-3.80.tar
This step installes various utilities so that the build process will work:
cd /gg
tar -xvzf :Archives/fileutils-4.0-bin.tgz
tar -xvzf :Archives/sh-utils-1.16-bin.tgz
tar -xvzf :Archives/sed-3.02-bin.tgz
tar -xvzf :Archives/textutils-1.22-bin.tgz
tar -xvzf :Archives/grep-2.2-bin.tgz
tar -xvzf :Archives/gawk-3.0.3-bin.tgz
tar -xvzf :Archives/textutils-1.22-bin.tgz
tar -xvzf :Archives/findutils-4.1-bin.tgz
tar -xvzf :Archives/diffutils-2.7-bin.tgz
Furthermore perl
and zip
must be installed, but i lost my notes. Instructions will
be added soon.
The last step is to correct the macros.h
header file:
exit
cd GG:include/inline/
rename macros.h macros_backup.h
copy GG:contrib/include/inline/macros.h to ""
There are a few prerequisites for compiling with shared library support:
The shared library code isn't completely bug-free as of yet but is fairly stable. I still need to work out issues dealing with closing of libraries upon abnormal termination and semi-random crashes.
If you get build error, check this out