Skip to content

A upto-date GCC toolchain for x86_64 host machine which targets aarch64,aarch32,x86_64 architectures.(A bare-metal toolchain optimized with LTO and O3 for optimum perfomance in linux kernel development)

License

Notifications You must be signed in to change notification settings

user-why-red/san_gcc_toolchain_x86_64

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

SAN-GCC

This is a GCC compiler toolchain that is built for kernel development. Builds are always made from the latest GCC(stable releases).

SUPPORTED HOST MACHINE ARCHITECTURES:

• X86_64.

SUPPORTED TARGET ARCHITECTURES:

• Arm(64bit/32bit).

• x86_64.

This toolchain targets the AArch32, AArch64 and x86_64 architectures. It is built with LTO and O3 optimizations to reduce compile times as much as possible. Note that this toolchain is not suitable for anything other than bare-metal development; it has not been built with support for any libc or userspace development in mind.

binutils is also included for convenience. SAN-GCC uses binutils source from the HEAD of the latest release branch, which allows us to have more upto date binutils compared to latest stable release as well as avoiding instability or breakage compared to bleeding edge binutils.

COMPILING LINUX KERNEL WITH SAN-GCC:

Make sure you have this toolchain in your PATH:

[+] export PATH="$HOME/toolchains/san-gcc/bin:$PATH"

For an AArch64 cross-compilation setup, you must set the following variables. Some of them can be environment variables, but some must be passed directly to make as a command-line argument. It is recommended to pass all of them as make arguments to avoid confusing errors:

[+] ARCH=arm64

[+] CC=aarch64-linux-gcc (must be passed directly to make)

[+] CROSS_COMPILE=aarch64-linux-

If your kernel has a 32-bit vDSO:

[+] CROSS_COMPILE_ARM32=arm-linux-gnueabi-

Note: Android kernels 4.19 and newer use the upstream variable CROSS_COMPILE_COMPAT. When building these kernels, replace CROSS_COMPILE_ARM32 in your commands and scripts with CROSS_COMPILE_COMPAT.

About

A upto-date GCC toolchain for x86_64 host machine which targets aarch64,aarch32,x86_64 architectures.(A bare-metal toolchain optimized with LTO and O3 for optimum perfomance in linux kernel development)

Resources

License

Stars

Watchers

Forks

Packages

No packages published