FFTW ARM cross compile

7 篇文章 0 订阅
4 篇文章 0 订阅


1.使用版本和平台

FFTW版本:fftw-3.2.2-arm 和  fftw-3.3.4 (两个版本均成功编译)

本人所适用的arm平台是单核cortex-A7平台。

2. 配置:

2.1 查看配置参数

./configure --help

其中最后有一段话:

Some influential environment variables:
  CC          C compiler command
  CFLAGS      C compiler flags
  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
              nonstandard directory <lib dir>
  LIBS        libraries to pass to the linker, e.g. -l<library>
  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
              you have headers in a nonstandard directory <include dir>
  CPP         C preprocessor
  MPICC       MPI C compiler command
  F77         Fortran 77 compiler command
  FFLAGS      Fortran 77 compiler flags

因为,随后的配置中,我们需要配置CC 和CFLAGS这两个变量。


2.2 设置配置参数

./configure --prefix=/home/zhouxiaoyong/fftw3_test --disable-fortran --with-slow-timer --host=arm-none-linux-gnueabi --enable-single  --enable-neon   --enable-shared CC=arm-none-linux-gnueabi-gcc CFLAGS="-march=armv7-a -mfpu=neon -fPIC -ldl -mfloat-abi=softfp"


2.3  配置参数含义

CC=arm-none-linux-gnueabi-gcc

CFLAGS="-march=armv7-a -mfpu=neon -fPIC -ldl -mfloat-abi=softfp" 

-march=armv7-a:  选择armv7系列指令集a系列,适用于cortex A系列指令集;

-mfpu=neon: 选择neon协处理器作为浮点处理器;

-fPIC : Position Independent Code means that the generated machine code is not dependent on being located at a specific address in order to work

-ldl: link dynamic linking library,  libdl.so

-mfloat-abi=softfp: 选择软浮点ABI


3.编译:

make -j8

make install


4. 参考:

http://blog.csdn.net/zwjzwj108108/article/details/24305547

http://blog.163.com/qimo601@126/blog/static/15822093201382524244772/

http://blog.jimjh.com/compiling-open-source-libraries-with-android-ndk-part-2.html

http://stackoverflow.com/questions/26644610/how-to-cross-compile-fftw3-for-aarch64-with-ndk

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值