我遵循了这篇博客,并成功地将FFTW3交叉编译为ARM v7-A。然而,在尝试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 。
--host=aarch64-eabi
。它通过了 CC 检查。然后我遇到了另一个错误。aarch64-*-gcc
不接受-mfpu=neon
标志。我想知道在哪里删除这个标志。 - PhilWong-mfpu=fp-armv8
。您可以将其添加为./configure ... CFLAGS="-mfpu=fp-armv8"
。 - Alex CohnCC=arm-linux-androideabi-gcc
,然而我期望的是CC=aarch64-linux-android-gcc
。 - Alex Cohn./configure ... CFLAGS="-mfpu=fp-armv8" CC=aarch64-linux-android-gcc
时,出现了什么错误? - Alex Cohn