Android ndk 如何交叉编译AArch64的FFTW3(使用NDK)?

Android ndk 如何交叉编译AArch64的FFTW3(使用NDK)?,android-ndk,configure,fftw,Android Ndk,Configure,Fftw,我遵循了这一原则,并成功地为ARMV7-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-g

我遵循了这一原则,并成功地为ARMV7-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=armlinux androideabigcc
而不是我设置的
$CC
? 是因为我误解了configure中的主机标志吗?我将其设置为
--host=aarch64

可以通过向配置脚本调用添加命令行参数来解决:

/configure。。。。霓虹灯闪烁=-D_uu臂_u霓虹灯

这是因为检查
-mfpu=neon
的条件仅在
neon\CFLAGS
不为空时,然后代码要求设置
\uu ARM\uneon\uu

也就是说,还有其他拦截器,因为根本没有可用的Aarch64 SIMD支持代码。
因此,除非有,否则在aarch64模式下编译FFTW3是徒劳的;)

我已尝试设置
--host=aarch64 eabi
。它确实通过了CC检查。然后我遇到了另一个错误<代码>aarch64-*-gcc不接受标志
-mfpu=neon
。我想知道在哪里删除此标志。这很有意义,请尝试使用
-mfpu=fp-armv8
。您可以将其添加为
/配置。。。CFLAGS=“-mfpu=fp-armv8”
@AlexCohn I get”错误:无法识别的命令行选项“-mfpu=fp-armv8”“。但是在您的Q中,您设置了
CC=arm-linux-androidabi-gcc
,而我期望
CC=aarch64-linux-android-gcc
@AlexCohn,在第一条注释中,我试图设置--host=aarch64-eabi。这里,CC=aarch64 linux-android-gcc。然后我通过了CC检查,但我遇到了另一个错误:AARC64 linux android gcc无法识别-mfpu=neon。这