1.编译环境:
- Ubuntu16.04 + arm-hisiv500-linux-gcc
- 下载地址: https://github.com/xianyi/OpenBLAS/releases
2.移植步骤
12 ifeq ($(CORE), ARMV7)
13 ifeq ($(OSNAME), Android)
14 CCOMMON_OPT += -marm -mfpu=neon -mfloat-abi=hard -march=armv7-a -Wl,--no-warn-mismatch
15 FCOMMON_OPT += -marm -mfpu=neon -mfloat-abi=hard -march=armv7-a -Wl,--no-warn-mismatch
16 else
17 #CCOMMON_OPT += -marm -mfpu=vfpv3 -mfloat-abi=hard -march=armv7-a
18 #FCOMMON_OPT += -marm -mfpu=vfpv3 -mfloat-abi=hard -march=armv7-a
19 CCOMMON_OPT += -mcpu=cortex-a17.cortex-a7 -mfloat-abi=softfp -mfpu=neon-vfpv4 -mno-unaligned-access -fno-aggressive-loop-optimizations
20 FCOMMON_OPT += -mcpu=cortex-a17.cortex-a7 -mfloat-abi=softfp -mfpu=neon-vfpv4 -mno-unaligned-access -fno-aggressive-loop-optimizations
21 endif
22 endif
make TARGET=ARMV7 HOSTCC=gcc CC=arm-hisiv500-linux-gcc CROSS=1 CROSS_SUFFIX=arm-hisiv500-linux- BINARY=32 NOFORTRAN=1 libs
make PREFIX=/home/shunzhi/software/OpenBLAS-0.2.19/install install
3.移植结果
shunzhi@ubuntu:~/software/OpenBLAS-0.2.19/install$ tree
.
├── bin
├── include
│ ├── cblas.h
│ ├── f77blas.h
│ ├── lapacke_config.h
│ ├── lapacke.h
│ ├── lapacke_mangling.h
│ ├── lapacke_utils.h
│ └── openblas_config.h
└── lib
├── cmake
│ └── openblas
├── libopenblas.a -> libopenblas_armv7p-r0.2.19.a
└── libopenblas_armv7p-r0.2.19.a
5 directories, 9 files