镜像下载路径:https://gitcode.net/mirrors/sysstat/sysstat/-/tree/v12.5.5
2. 下载ndk镜像下载路径:https://developer.android.google.cn/ndk/downloads?hl=zh-cn
3. 写编译脚本build.sh
脚本如下:
#!/bin/bash ################################### #### build script for sysstat_v12.5.5 #### url:https://gitcode.net/mirrors/sysstat/sysstat/-/tree/v12.5.5 #### Date: 2021-12-28 #### Author: Tim ################################### # ndk for linux https://developer.android.google.cn/ndk/downloads?hl=zh-cn NDKROOT_PATH=/home/xxxx/workspace/tools/android-ndk-r23b # current dir CUR_PATH=$(pwd) # only choose one of these, depending on your build machine... export TOOLCHAIN=$NDKROOT_PATH/toolchains/llvm/prebuilt/linux-x86_64 # only choose one of these, depending on your device... export TARGET=aarch64-linux-android #export TARGET=armv7a-linux-androideabi # Set this to your minSdkVersion. export API=28 # Configure and build. export AR=$TOOLCHAIN/bin/llvm-ar export CC=$TOOLCHAIN/bin/$TARGET$API-clang export AS=$CC export CXX=$TOOLCHAIN/bin/$TARGET$API-clang++ export LD=$TOOLCHAIN/bin/ld export RANLIB=$TOOLCHAIN/bin/llvm-ranlib export STRIP=$TOOLCHAIN/bin/llvm-strip # make install output dir. if [ ! -d $CUR_PATH/out ]; then mkdir -p $CUR_PATH/out fi ./configure --host $TARGET --cache-file=$CUR_PATH/cache_file_0 --prefix=$CUR_PATH/out --exec-prefix=$CUR_PATH/out make make install
编译:# sudo ./build.sh
4. 拷贝编译后的文件欢迎分享,转载请注明来源:内存溢出
评论列表(0条)