linux下如何交叉编译util-linux?

1. 获取源码

wget https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.34/util-linux-2.34.tar.xz

2. 解压

tar xvf util-linux-2.34.tar.gz

cd util-linux-2.34

3. 配置

export CC=aarch64-linux-gnu-gcc
./configure --host=aarch64-linux-gnu LDFLAGS=-static --without-python --without-tinfo --without-ncursesw --without-ncurses

5. 编译

make -j4

原文地址:https://www.cnblogs.com/dakewei/p/11133189.html