文章

交叉编译用于aarch64架构的perl

  最近更新时间:2022-03-01
文章目录

操作环境

架构:X86_64
系统:Ubuntu20.04

步骤

准备

下载perl/perl-cross并解压

curl -L -O http://www.cpan.org/src/5.0/perl-5.34.0.tar.gz
curl -L -O https://github.com/arsv/perl-cross/releases/download/1.3.6/perl-cross-1.3.6.tar.gz
tar -zxf perl-5.34.0.tar.gz
cd perl-5.34.0
tar --strip-components=1 -zxf ../perl-cross-1.3.6.tar.gz

安装编译器

sudo apt install gcc-aarch64-linux-gun

编译并安装

./configure --prefix=/usr/local/perl-5.34.0 --target=aarch64-linux-gnu -Dldflags="-s -static"  -Dusethreads -Duselargefiles -Dusestrict --all-static
make -j4
make install

参考链接:
https://github.com/arsv/perl-cross
https://blog.csdn.net/wxalriss/article/details/106764065
https://blog.csdn.net/song_lee/article/details/105487177

发表评论