======================================================================== Scripts to build cross-compilers and native compilers for ADA Based on the sources from AdaCore Version 24 September 2018 ======================================================================== All of this starts on a 64bit x86 machine. First make sure you have AdaCore GNAT 2016 installed and on your path which gnatmake gnatmake -v GNATMAKE GPL 2016 (20160515-49) Copyright (C) 1992-2016, Free Software Foundation, Inc. try "gnatmake --help" for more information. To start the process do: ./build-ada.sh > build.output 2>&1 The install directory needs to be an absolute path. Environment variables that make the build parallel: export MAKEOPTS="-j8" After a time the script will finish and you'll end up with the compilers under /install/directory (the packages are also tarred for distribution). To use the compilers, set the path to /install/directory//bin. To run the process on arm 64-bit machines (aarch64), use the 'build-ada-arm64.sh' script. This depends on a working ada compiler for aarch64. Note ---- The build-tarballs.sh script takes 4 required and N optional arguments. The first 4 arguments are; . The optional arguments are the machine names of the cross compilation targets. The process well take a long time if not parallel, it proceeds in a number of stages: 1) build a bootstrap compiler, this process will use the AdaCore compiler to build a compiler that can compile against musl C (but the bootstrap compiler itself still has some glibc) evry compile starts with building statically compiled binutils for the platform (ar, as etc) every compile of gcc takes 2 steps, first build a C compiler, then use that compiler to build musl C library then build the real compiler (with C,C++ and Ada support), compiled against the musl C library next with this gcc build gcc dependencies (mpfr, gmp etc) next with this gcc build the gprbuild tools the build takes place under 'build/build-bootstrap' 2) build a x86_64 cross-compiler this will give you a compiler that runs on x86_64 and can build x84_64 executables the build takes place under 'build/build-x86_64-musl-linux' the result will be under /install/dir/x86_64-musl-linux 3) build an aarch64 cross-compiler this will give you a compiler that runs on x86_64 and can build aarch64 executables the build takes place under 'build/build-aarch64-musl-linux' the result will be under /install/dir/aarch64-musl-linux 4) build x86_64 native compilers this will give you a compiler that runs on x86_64 and can build x86_64 executables (much like the cross compilers, but now without the triple x86_64-linux-musl- prefix) the build takes place under 'build/build-x86_64-musl-linux-native' the result will be under /install/dir/x86_64-musl-linux 5) build aarch64 native compilers this will give you a compiler that runs on aarch64 and can build aarch64 executables. the build takes place under 'build/build-aarch64-musl-linux-native' the result will be under /install/dir/aarch64-musl-linux