How to install the aarch64 toolchain for armv8 cortex-a53 on Debian?
As of Ubuntu 18.04 you can do:
sudo apt-get install gcc-aarch64-linux-gnu
aarch64-linux-gnu-gcc -mcpu=cortex-a53 hello_world.c
The package gcc-aarch64-linux-gnu
is at version 4:7.3.0-3ubuntu2
However, for Raspberry Pi, you should just download the official binaries from https://github.com/raspberrypi/tools which is the more reliable way to do it as explained at: https://raspberrypi.stackexchange.com/questions/64273/installing-raspberry-pi-cross-compiler/83215#83215
Finally, for bare metal, I was not able to find the analogue of arm-none-eabi-gcc
, I wonder why: https://github.com/cirosantilli/cirosantilli.github.io/issues/68