Setup:Toolchain:Haiku_GCC

Building the GCC 6 / GCC 8 toolchain to cross-compile from Haiku

For those who insist on using Haiku, and willing to take the punishment *g* instead of just using the toolchain for Linux... Here's one way to build the GCC toolchain for Haiku, to build Genode images from within the comfort of your favorite system.

First things first, pre-requisites for building GCC (and for building gcc deps like "autogen"...):

df .  # it takes almost 10 GiB to build GCC
uname -a  # these steps have been tested on R1/b1 (hrev52295+132) and R1/b2
pkgman install  automake gmp_devel isl_devel mpc_devel mpfr_devel patch  # ncurses_devel boehm_gc_devel guile_devel nasm ?
# "rpcgen" note : it's nowhere to be found in haikuports.. Use DDG ?

Then retrieve the Genode project since it contains the "toolchain" build script:

cd develop
mkdir com.github && cd com.github
git clone https://github.com/genodelabs/genode.git
cd genode && git checkout 20.11 ... # will build GCC 8 (by opposed to 18.11, which builds GCC 6)  # as of 2022, use "checkout 22.05" ?

Patch tools/tool_chain

Patch the patches (!) for gcc

...xxx...

Launch the download/extraction/patching of GCC:

./tool/tool_chain x86 SUDO= ENABLE_FEATURES="c c++" INSTALL_LOCATION=/boot/nimble_TMP_XPND/develop_Genode/genode-gcc

..xx..