FFTW库在ARM平台上的使用(1) 交叉编译FFTW库

(转载请说明出处)

1.

下载源码

http://www.vesperix.com/arm/fftw-arm/source/index.html

2.

配置   重点是配置这块

查看解压源码中的 readme 和install 文本

在终端 进入源码目录   ./configure --help   查看配置帮助

./configure --enable-single --enable-neon --prefix=/usr/local/fftw_arm --host=arm-linux CC=arm-linux-gcc CFLAGS="-march=armv4t -mfloat-abi=softfp -mtune=arm920t -O3 -mfpu=neon -ftree-vectorize -ffast-math" --build=i686-pc-linux-gnu --target=arm-linux --disable-fortran  --enable-shared=yes --with-gcc-arch=armv4t --enable-armv7a-cycle-counter  ARM_CPU_TYPE=ARM920T ARM_FLOAT_ABI=softfp


 --build=i686-pc-linux-gnu     本地的GCC

不然出现如下错误信息

configure:4273: checking whether we are cross compiling
configure:4281: arm-linux-gcc -o conftest    conftest.c  >&5
configure:4285: $? = 0
configure:4292: ./conftest
./configure: line 4294: ./conftest: cannot execute binary file
configure:4296: $? = 126
configure:4303: error: in `/opt_qt4.5/opt/EmbedSky/fftw-3.2.2-arm':
configure:4305: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details

 

--host=arm-linux  CC=arm-linux-gcc  交叉编译器  用于ARM9  平台  

 

CFLAGS="-march=armv4t -mfloat-abi=softfp -mtune=arm920t -O3 -mfpu=neon -ftree-vectorize -ffast-math"    编译配置选项 

不然出现如下错误信息:
/tmp/ccBN5kXd.s: Assembler messages:
/tmp/ccBN5kXd.s:90: Error: bad instruction `vmov.f32 d0,#0.0'
make[3]: *** [neon.lo] 错误 1
make[3]: Leaving directory `/opt_qt4.5/opt/EmbedSky/fftw-3.2.2-arm/simd'
make[2]: *** [all-recursive] 错误 1
make[2]: Leaving directory `/opt_qt4.5/opt/EmbedSky/fftw-3.2.2-arm/simd'
make[1]: *** [all-recursive] 错误 1
make[1]: Leaving directory `/opt_qt4.5/opt/EmbedSky/fftw-3.2.2-arm'
make: *** [all] 错误 2

上面这个编译选项 搞了我一天  SIMD  neon 指令相关

看这篇文章就知道 上面的参数时什么意思  

http://www.360doc.com/content/11/0322/09/3700464_103410946.shtml

3.
make
4.
make install




你可能感兴趣的:(QT,fftw,Linux)