makeArmVersion.sh
#!/bin/bash sh cleanAll.sh autoreconf -i --force # -g : for gdb debug # -O0 : 默认-O2 ,0关闭编译优化,方便调式 # -ENABLE_LOG : 自定义宏,开启日志记录 export CFLAGS="-march=armv5te -O2 -D ENABLE_LOG -D LOG_LEVEL=5" export PATH=$PATH:/opt/hisi-linux/x86-arm/arm-hisiv400-linux/bin CC=arm-hisiv400-linux-gnueabi-gcc CXX=arm-hisiv400-linux-gnueabi-c++ LD=arm-hisiv400-linux-gnueabi-ld AR=arm-hisiv400-linux-gnueabi-ar AS=arm-hisiv400-linux-gnueabi-as NM=arm-hisiv400-linux-gnueabi-nm RANLIB=arm-hisiv400-linux-gnueabi-strip STRIP= OBJDUMP=arm-hisiv400-linux-gnueabi-objdump ./configure \ --build=x86_64-redhat-linux \ --host=arm-hisiv400-linux-gnueabi \ --target=arm-hisiv400-linux-gnueabi \ --cache-file=arm-hisiv400-linux-gnueabi.cache \ --prefix=/opt/hisi-linux/x86-arm/arm-hisiv400-linux \ --program-prefix="tm-" make -j8
cleanAll.sh
#!/bin/bash echo "clean all" find | grep \\.deps | xargs -i rm {} -rf find | grep \\.libs | xargs -i rm {} -rf find | grep \\.o$ | xargs -i rm {} -rf find | grep \\.lo$ | xargs -i rm {} -rf find | grep \\.la$ | xargs -i rm {} -rf find -name Makefile| xargs -i rm {} -rf find -name Makefile.in| xargs -i rm {} -rf rm m4/* -rf rm autom4te.cache -rf rm aclocal.m4 rm compile rm config.* rm configure rm depcomp rm install-sh rm libtool rm ltmain.sh rm missing
参考:https://www.cnblogs.com/louyihang-loves-baiyan/p/4171368.html
原文链接:https://www.f2er.com/centos/375303.html