only support cross compile for arm64. They will always be up to date with the latest stable GCC (currently 7.3.x).
- 64-bit ARM64 linux based devices
To use these toolchains, you first need to do a shallow clone (to avoid pulling too much history):
git clone https://github.com/teamlions/aarch64-linux-gnu-7.3/ aarch64-linux-gnu-7.3
Then point your cross compiler to the toolchain. For kernels, you can do the following:
export CROSS_COMPILE=$(pwd)/aarch64-linux-gnu-7.3/bin/<prefix>
For kernels, you must have the following four commits:
- Makefile: Fix device not booting with GCC 7.x and above
- Revert "scripts: gcc-wrapper: Use wrapper to check compiler warnings"
- kernel: use the gnu89 standard explicitly
- compiler-gcc: integrate the various compiler-gcc[345.h] files
The last two commits are from Linux upstream. The first is only needed if your version is 3.10.79 or earlier. The second is needed for both 3.10 (3.10.101 or earlier) and 3.18 (3.18.31 or earlier). I do recommend upstreaming your kernels but if you choose not to, just pick that commit.
If you would like to learn how to compile these toolchains, please give this README a glance.
If you have any questions or issues, please open an issue on this repo or the Teamlions and I'll do my best to assist you.