I was doing native compilation of FFTW library with NEON enabled successfully.
Now I need to switch to a cross-compile development flow. I tried two different compiler: 1) “GCC Tool Chain for 64-bit BSP” from download center 2) “aarch64-linux-gnu-gcc-4.8” from apt packages
The build environment is a x86_64 Linux Ubuntu 16.04 machine.
The problem is that the compiler cannot recognize option “-mfpu=neon” or “-mfloat-abi=softfp”. Do I need to install other libraries on the build machine? And what is the correct options for NEON and floating point passed to compiler to build target for TX2?
The ARMv8-a architecture is the native 64-bit for the TX2. The compatibility mode for 32-bit is ARMv8 (no “-a”), and is actually a superset of ARMv7 32-bit…ARMv8 runs 32-bit ARMv7, but some ARMv8 does not run on ARMv7 platforms (ARMv8 has more in it than ARMv7, but much of ARMv8 would run on a purely ARMv7 CPU…there is no ARMv8 mode which does not support NEON). Basically the ARMv8 is armhf plus certain features which are always present on ARMv8…one of those is NEON. There is no need to specify NEON in compatibility mode, and this is in fact an error because NEON is not optional for this case.
I guess your point is that “using NEON” is default for this CPU architecture. Maybe my question is more related to this third-party library FFTW. But any hint is appreciated:
This library follows standard configure-make-make install steps.
According to documentation, I need to pass “–enable-NEON” to configure scripts to make FFT algorithm use SIMD vectorization. But if I do that in cross-compiling environment, there is an error in the make step:
…/…/…/simd-support/simd-neon.h:47:2: error: #error “compiling simd-neon.h requires -mfpu=neon or equivalent” #error “compiling simd-neon.h requires -mfpu=neon or equivalent”
Someone may have some specific options for your case, but basically the NEON is already there and it cannot be optionally enabled…it is always there. If the compiler has knowledge of ARMv8, versus an ARMv7 compiler, then the two would differ in what options they use.