本章节介绍用户如何安装相应的交叉编译工具链到编译程序所在的Linux系统。
环境准备:一台带网络端口且操作系统为x86 Ubuntu 22.04的Linux服务器。
su - root
mkdir /opt/compiler
cd /opt/compiler
tar -xvf toolchain.tar.gz -C ./
echo "export PATH=/opt/compiler/toolchain/bin:\$PATH: " >> /etc/profile
source /etc/profile
aarch64-target-linux-gnu-gcc -v
显示有版本信息,则表明安装工具链成功。具体版本号请以实际情况为准。
gcc version 7.3.0 (Do-Compiler V100R003C01B001)