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




  • 1
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值