If things build fine with `stdenvNoCC`, let them use that. If tools
might be prefixed, prepare for that, either by directly splicing or just
using the env vars provided by the wrapper setup-hooks.
Co-authored-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
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.
We cannot have trace output if the package is marked broken, because
ofborg will consider the evaluation failed if there is any output. Hence
if there is any unsupported kernel version in nixpkgs, the trace will
show up and ofborg will complain.
Notes:
- compat: Needs a header from common merged with it's wrapper.
- librt: Needs the jemalloc sources.
- libc: install libc_pic.a
This was the behaviour on NetBSD 8.0, and ld.elf_so (in its current
configuration) requires it. We could also have disabled PIC in
ld.elf_so.
- sys: fix build
We use a more recent version of binutils than NetBSD 9.1 does, so we
need to backport a patch from CURRENT.
Co-authored-by: John Ericson <John.Ericson@Obsidian.Systems>