Skip to content

Build Instructions

migthymax edited this page Jan 18, 2024 · 1 revision

Build instructions

Here in detailed is describe dhow to build a native binutils for ppc-amigaos.

The build is experimental build, using the clib4 c library and development envirnoment based upon a Dockerfile. Thus docker is a minimal requirement

Setup

All commands are assumed from a base directory, like ~/workspace:

  1. We need to check out the needed projects from AmigaLabs, the libs-port for mpfr library and of course the binutils branch
    $ git clone https://github.com/AmigaLabs/libs-ports.git
    $ git clone --branch nativeOS4-build-clib4 https://github.com/AmigaLabs/binutils-gdb.git
  2. Next start up the docker env for compiling. Still being in the ~/workspace directory:
    $ docker run -it --rm --name binutils_clib4 -v "${PWD}:/opt/code" -w /opt/code walkero/amigagccondocker:os4-gcc11-exp /bin/bash
  3. Wait until the prompt appears for the started dockerfile. Than install the missing texinfo package
    > apt-get update
    > apt-get install texinfo
  4. Now switch to the amidev user within the docker env.
    > su amidev
  5. Next compile and install the mpfr lib for clib4
    > cd libs-port/mpfr
    > make init
    > make build LIBC=clib4
    > cd mpfr-4.2.1
    > make install
  6. Now prepare the build env. for binutils
    > cd ../../../binutils-gdb
    > mkdir native-build
    > cd native-build
  7. Configure binutils to include the gdb in build:
    > CFLAGS="-mcrt=clib4 -DHAVE_POSIX_SIGNALS" CXXFLAGS="-mcrt=clib4 -DHAVE_POSIX_SIGNALS" ../configure --disable-plugins --disable-sim --host=ppc-amigaos --target=ppc-amigaos --prefix=/opt/code/binutils-gdb/dist-clib4/
  8. Lets build:
    > make
    Optional pass -j n improve compile times
Clone this wiki locally