OpenBlas交叉编译安装

1.下载

https://github.com/xianyi/OpenBLAS

 

2.修改Makefile.arm文件

ifeq ($(CORE), $(filter $(CORE),ARMV7 CORTEXA9 CORTEXA15))
ifeq ($(OSNAME), Android)
CCOMMON_OPT += -mfpu=neon -march=armv7-a -mfloat-abi=hard
FCOMMON_OPT += -mfpu=neon -march=armv7-a -mfloat-abi=hard
else
CCOMMON_OPT += -mfpu=neon -march=armv7-a -mfloat-abi=hard
FCOMMON_OPT += -mfpu=neon -march=armv7-a -mfloat-abi=hard
endif
endif

ifeq ($(CORE), ARMV6)
CCOMMON_OPT += -mfpu=neon -mfloat-abi=hard
FCOMMON_OPT += -mfpu=neon -mfloat-abi=hard
endif

 

3.编译(不含Fortran

参考:https://github.com/xianyi/OpenBLAS/wiki/How-to-build-OpenBLAS-for-Android#building-openblas-with-fortran

make TARGET=ARMV7 HOSTCC=gcc CC=arm-poky-linux-gnueabi-gcc NOFORTRAN=1

 

4.安装到目录

make PREFIX=./openblas_arm install

 

5.安装完成

根目录生产openblas_arm文件夹,里面包含bin,include,lib三个文件夹,include中

lib中

posted @ 2020-08-10 16:00  朝_风  阅读(1349)  评论(1编辑  收藏  举报