This PR adds a new aarch64 android toolchain, which leverages the
existing crossSystem infrastructure and LLVM builders to generate a
working toolchain with minimal prebuilt components.
The only thing that is prebuilt is the bionic libc. This is because it
is practically impossible to compile bionic outside of an AOSP tree. I
tried and failed, braver souls may prevail. For now I just grab the
relevant binaries from https://android.googlesource.com/.
I also grab the msm kernel sources from there to generate headers. I've
included a minor patch to the existing kernel-headers derivation in
order to expose an internal function.
Everything else, from binutils up, is using stock code. Many thanks to
@Ericson2314 for his help on this, and for building such a powerful
system in the first place!
One motivation for this is to be able to build a toolchain which will
work on an aarch64 linux machine. To my knowledge, there is no existing
toolchain for an aarch64-linux builder and an aarch64-android target.
The diagrams libraries universe still uses monoid-extras 0.5.1 and build
failures start cropping up when upgrading it. Since no other packages I
am aware of use this, we can pin it to 0.5.1 which still uses Option
instead of Maybe (the former of which is deprecated).
Patching this seems like a lot of work that'd break other stuff because
Option is seemingly part of the public API. Let's hope they sort all of
that out themselves before base 4.15 comes around in our main package
set.
This fixes the following compilation error:
```
clBuildProgram(): CL_BUILD_PROGRAM_FAILURE
/run/user/1000/comgr-64ff7f/input/CompileSource:2252:18: fatal error:
cannot open file
'/run/user/1000/comgr-64ff7f/input/inc_comp_multi_bs.cl': No such file
or directory
#include COMPARE_M
^
/run/user/1000/comgr-64ff7f/input/CompileSource:16:19: note: expanded
from macro 'COMPARE_M'
^
1 error generated.
Error: Failed to compile opencl source (from CL or HIP source to LLVM
IR).
```
Signed-off-by: Arthur Gautier <baloo@superbaloo.net>