Building GNAT on MUSL, now with partial and parallel build support

15/05/18, modified 17/09/18

An update on the previous version.

The previous version needed git for getting the source of libelf-compat, this was ripped out1.
The previous version cleaned and reused the build directory for different stages, this was changed to use a separate build directory for each stage and no more cleanup. Last, the script now builds with parallel make options, further speeding up the build process2.

  1. A tarred version of libelf-compat does exist on the internets, however that version does not match the one in the git repository. []
  2. The problem with building in parallel seemed to be with some of the ada specific build rules. But changing those rules did nothing to fix the problem. In fact, the installation of a previous step had failed. Which was a direct result of using the environment variable MAKEFLAGS, this environment variable is used in the scripts but also read in the make program. So, make install was run with parallel jobs and promptly failed. The actions of one of the rules used a variable in a loop and that variable was changed by an action in another rule. The fix was 2-fold, use MAKEOPTS, change the install step to always use make -j1. []

3 Responses to “Building GNAT on MUSL, now with partial and parallel build support”

  1. [...] incarnations of Ave1's GNAT: the ZCX variant which is obtained as a straight compilation using Ave1's scripts from the 15th of July 2018; the SJLJ-compilation of the same (i.e. supporting both dynamic and static linking); the SJLJ [...]

  2. [...] Ave1's GNAT version 2018-05-15 adding parallel build support that effectively cuts significantly the time required for the full build4 [...]

  3. [...] Now that we have a proper keccak-vtron, which requires Ada to build, I wanted to get ave1's musltronic GNAT built statically, so I could try it out on my Cuntoo box. I began with ave1's version 2018-05-15, [...]

Leave a Reply to ZCX vs SJLJ - Data Set « Ossasepia