Ubantu16.4下loongarch64交叉编译

1、在龙芯开源社区下载最新交叉编译工具链,下载地址龙芯 GNU 编译工具链 | 龙芯开源社区 (loongnix.cn)

Ubantu16.4下loongarch64交叉编译_第1张图片

 2、拷贝到ubantu目录下,执行sudo tar -vxf toolchain-loongarch64-linux-gnu-cross-830-rc1.0-2022-04-22.tar.xz

我选择使用的编译工具如下:

用该编译工具编译出helloworld,在龙芯3a5000笔记本上正常运行。

3、编译一些库,运行sudo ./configure 报错下

configure: error: cannot guess build type; you must specify one

参考解决方法

(113条消息) config.guess: unable to guess system type、config.sub: missing argument_柳鲲鹏的博客-CSDN博客

 将下面两个地址中的内容直接替换config.guess和config.sub的内容即可。

  https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
  https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub

然后依次sudo make 、 sudo make install
 

你可能感兴趣的:(linux,ubuntu,运维)