Building a cross-compiler

Once Glidix source code has been downloaded, it is possible to build a cross-compiler. Create a directory called glidix-cross next to the glidix directory. Then inside this directory, run the following:

../glidix/setup-crosstools-workspace --sysroot=/glidix

The sysroot does not have to be /glidix but that's just what I use. The script will download source code for binutils and GCC and then patch it to support Glidix. It will also download all other dependencies. This should take a few minutes. The next step is to run:

sudo ./install.sh

This installs the C compiler and binutils. It also creates symlinks under /usr/bin so that you can invoke commands like x86_64-glidix-gcc without explicitly including them in your PATH. If you want to build the C++ compiler, you must first install the Glidix C library in the sysroot, and then you can run:

sudo ./install-stage2.sh