如何为AArch64(带NDK)交叉编译FFTW3?

时间:2014-10-30 03:33:38

标签: android-ndk configure fftw

我已经关注this blog,我确实成功地为ARM v7-A交叉编译了FFTW3。但是,当谈到AArch64时,我总是在C编译器检查中失败。

running CONFIG_SHELL=/bin/bash /bin/bash ./configure --disable-shared

--enable-maintainer-mode  --host=arm-eabi --enable-single --enable-neon host_alias=arm-eabi CC=arm-linux-androideabi-gcc -O2 -march=armv7-a -mfpu=neon -mfloat-abi=softfp --sysroot=$NDK_ROOT/platforms/android-L/arch-arm/ -fPIE -pie -lm --no-create --no-recursion configure: WARNING: if you wanted to set the --build type, don't use --host.

    If a cross compiler is detected then cross compile mode will be used checking for a BSD-compatible install... /usr/bin/install -c

checking whether build environment is sane... yes checking for

arm-eabi-strip... arm-linux-androideabi-strip checking for a

thread-safe mkdir -p... /bin/mkdir -p checking for gawk... gawk

checking whether make sets $(MAKE)... yes checking whether to enable

maintainer-specific portions of Makefiles... yes checking build system

type... x86_64-unknown-linux-gnu checking host system type...

arm-unknown-eabi checking for arm-eabi-gcc...

arm-linux-androideabi-gcc -O2 -march=armv7-a -mfpu=neon

-mfloat-abi=softfp --sysroot=$NDK_ROOT/platforms/android-L/arch-arm/ -fPIE -pie -lm checking whether the C compiler works... no configure: error: in `$FFTW_ROOT': configure: error: C compiler cannot create

executables

为什么检查CC=arm-linux-androideabi-gcc而不是我设置的$CC? 是因为我在配置中误解了--host标志?我将其设置为--host=aarch64

1 个答案:

答案 0 :(得分:0)

FFTW3 bug 25可以通过在configure脚本调用中添加命令行参数来解决:

./configure .... NEON_CFLAGS=-D__ARM_NEON__

这是因为检查-mfpu=neon的条件仅在NEON_CFLAGS不为空时,然后代码需要设置__ARM_NEON__

也就是说,还有其他阻止者,因为根本没有可用的Aarch64 SIMD支持代码。 所以,直到有,在aarch64模式下编译FFTW3是徒劳的;)