ubuntu 18.04.3 ISO下载地址:
http://mirrors.aliyun.com/ubuntu-releases/18.04.3/ubuntu-18.04.3-desktop-amd64.iso
imhqq@ubuntu:~$ cat /proc/version
Linux version 5.0.0-30-generic (buildd@lgw01-amd64-033) (gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1)) #32~18.04.1-Ubuntu SMP Wed Sep 18 12:50:22 UTC 2019
如何在x64的Ubuntu系统下安装64bit的交叉编译工具aarch64-linux-gnu-gcc
sudo apt-cache search aarch64
查看哪些版本可以安装;
sudo apt-get install gcc-7-aarch64-linux-gnu
安装一个gcc开头的7版本的支持64bit ARM linux的交叉编译工具;
sudo apt-get install g++-7-aarch64-linux-gnu
sudo apt-get install g++-aarch64-linux-gnu
安装g++编译工具
sudo apt-get install gcc-aarch64-linux-gnu
然后再安装一个没有版本号的gcc-aarch64-linux-gnu;
以上步骤是安装支持ARM64位系统的交叉编译工具,
安装之后,用aarch64-linux-gnu-gcc -v可以查看里边的版本信息,里边有host是什么,target是什么。
imhqq@ubuntu:~$ ls -l /usr/bin/aa*
-rwxr-xr-x 1 root root 22696 Sep 27 2018 /usr/bin/aa-enabled
-rwxr-xr-x 1 root root 22696 Sep 27 2018 /usr/bin/aa-exec
-rwxr-xr-x 1 root root 31160 May 8 01:14 /usr/bin/aarch64-linux-gnu-addr2line
-rwxr-xr-x 1 root root 59648 May 8 01:14 /usr/bin/aarch64-linux-gnu-ar
-rwxr-xr-x 1 root root 402840 May 8 01:14 /usr/bin/aarch64-linux-gnu-as
-rwxr-xr-x 1 root root 26744 May 8 01:14 /usr/bin/aarch64-linux-gnu-c++filt
lrwxrwxrwx 1 root root 23 May 20 09:08 /usr/bin/aarch64-linux-gnu-cpp -> aarch64-linux-gnu-cpp-7
-rwxr-xr-x 1 root root 1035264 May 20 08:41 /usr/bin/aarch64-linux-gnu-cpp-7
-rwxr-xr-x 1 root root 3443976 May 8 01:14 /usr/bin/aarch64-linux-gnu-dwp
-rwxr-xr-x 1 root root 31184 May 8 01:14 /usr/bin/aarch64-linux-gnu-elfedit
lrwxrwxrwx 1 root root 23 May 20 09:08 /usr/bin/aarch64-linux-gnu-gcc -> aarch64-linux-gnu-gcc-7
-rwxr-xr-x 1 root root 1035264 May 20 08:41 /usr/bin/aarch64-linux-gnu-gcc-7
lrwxrwxrwx 1 root root 26 May 20 09:08 /usr/bin/aarch64-linux-gnu-gcc-ar -> aarch64-linux-gnu-gcc-ar-7
-rwxr-xr-x 1 root root 27112 May 20 08:41 /usr/bin/aarch64-linux-gnu-gcc-ar-7
lrwxrwxrwx 1 root root 26 May 20 09:08 /usr/bin/aarch64-linux-gnu-gcc-nm -> aarch64-linux-gnu-gcc-nm-7
-rwxr-xr-x 1 root root 27112 May 20 08:41 /usr/bin/aarch64-linux-gnu-gcc-nm-7
lrwxrwxrwx 1 root root 30 May 20 09:08 /usr/bin/aarch64-linux-gnu-gcc-ranlib -> aarch64-linux-gnu-gcc-ranlib-7
-rwxr-xr-x 1 root root 27112 May 20 08:41 /usr/bin/aarch64-linux-gnu-gcc-ranlib-7
lrwxrwxrwx 1 root root 24 May 20 09:08 /usr/bin/aarch64-linux-gnu-gcov -> aarch64-linux-gnu-gcov-7
-rwxr-xr-x 1 root root 630880 May 20 08:41 /usr/bin/aarch64-linux-gnu-gcov-7
lrwxrwxrwx 1 root root 29 May 20 09:08 /usr/bin/aarch64-linux-gnu-gcov-dump -> aarch64-linux-gnu-gcov-dump-7
-rwxr-xr-x 1 root root 499640 May 20 08:41 /usr/bin/aarch64-linux-gnu-gcov-dump-7
lrwxrwxrwx 1 root root 29 May 20 09:08 /usr/bin/aarch64-linux-gnu-gcov-tool -> aarch64-linux-gnu-gcov-tool-7
-rwxr-xr-x 1 root root 520184 May 20 08:41 /usr/bin/aarch64-linux-gnu-gcov-tool-7
-rwxr-xr-x 1 root root 102120 May 8 01:14 /usr/bin/aarch64-linux-gnu-gprof
lrwxrwxrwx 1 root root 24 May 8 01:14 /usr/bin/aarch64-linux-gnu-ld -> aarch64-linux-gnu-ld.bfd
-rwxr-xr-x 1 root root 1710824 May 8 01:14 /usr/bin/aarch64-linux-gnu-ld.bfd
-rwxr-xr-x 1 root root 5747048 May 8 01:14 /usr/bin/aarch64-linux-gnu-ld.gold
-rwxr-xr-x 1 root root 44184 May 8 01:14 /usr/bin/aarch64-linux-gnu-nm
-rwxr-xr-x 1 root root 235720 May 8 01:14 /usr/bin/aarch64-linux-gnu-objcopy
-rwxr-xr-x 1 root root 414128 May 8 01:14 /usr/bin/aarch64-linux-gnu-objdump
-rwxr-xr-x 1 root root 59680 May 8 01:14 /usr/bin/aarch64-linux-gnu-ranlib
-rwxr-xr-x 1 root root 596440 May 8 01:14 /usr/bin/aarch64-linux-gnu-readelf
-rwxr-xr-x 1 root root 31032 May 8 01:14 /usr/bin/aarch64-linux-gnu-size
-rwxr-xr-x 1 root root 31232 May 8 01:14 /usr/bin/aarch64-linux-gnu-strings
-rwxr-xr-x 1 root root 235728 May 8 01:14 /usr/bin/aarch64-linux-gnu-strip
imhqq@ubuntu:~$
网友评论