1.编译环境:
- Ubuntu16.04 + arm-hisiv500-linux-gcc
- 下载地址: https://github.com/xianyi/OpenBLAS/releases
2.移植步骤
ifeq ($(CORE), ARMV7)
ifeq ($(OSNAME), Android)
CCOMMON_OPT += -marm -mfpu=neon -mfloat-abi=hard -march=armv7-a -Wl,--no-warn-mismatch
FCOMMON_OPT += -marm -mfpu=neon -mfloat-abi=hard -march=armv7-a -Wl,--no-warn-mismatch
else
#CCOMMON_OPT += -marm -mfpu=vfpv3 -mfloat-abi=hard -march=armv7-a
#FCOMMON_OPT += -marm -mfpu=vfpv3 -mfloat-abi=hard -march=armv7-a
CCOMMON_OPT += -mcpu=cortex-a17.cortex-a7 -mfloat-abi=softfp -mfpu=neon-vfpv4 -mno-unaligned-access -fno-aggressive-loop-optimizations
FCOMMON_OPT += -mcpu=cortex-a17.cortex-a7 -mfloat-abi=softfp -mfpu=neon-vfpv4 -mno-unaligned-access -fno-aggressive-loop-optimizations
endif
endif
make TARGET=ARMV7 HOSTCC=gcc CC=arm-hisiv500-linux-gcc CROSS= CROSS_SUFFIX=arm-hisiv500-linux- BINARY= NOFORTRAN= libs
make PREFIX=/home/shunzhi/software/OpenBLAS-./install install
3.移植结果
[email protected]:~/software/OpenBLAS-/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.a
└── libopenblas_armv7p-r0.a
directories, files