交叉编译tslib
不扯长篇大论,直接告诉你怎么编译
第一步把源码git下来
git clone https://github.com/libts/tslib.git
第二步 进入源码路径执行这个脚本
./autogen.sh
有报错的话就安装一下依赖
sudo apt install autoconf automake libtool pkg-config
第三步 配置编译命令
./configure \
--host=aarch64-linux-gnu \ # 目标架构
--prefix=/path/to/install \ # 安装路径 就是make install的时候放到哪
CC=aarch64-linux-gnu-gcc \ # 指定编译器
CXX=aarch64-linux-gnu-g++ \
--enable-static=no \ # 推荐动态库
ac_cv_func_malloc_0_nonnull=yes # 避免 malloc 检查错误
复制这个:
./configure \
--host=aarch64-linux-gnu \
--prefix=/path/to/install \
CC=aarch64-linux-gnu-gcc \
CXX=aarch64-linux-gnu-g++ \
--enable-static=no \
ac_cv_func_malloc_0_nonnull=yes
第四步 编译安装
make -j$(nproc)
make install
就这么简单!没其他的了
4203

被折叠的 条评论
为什么被折叠?



