DLTcollab/sse2neon

Get error "Unsupported target. Must be either ARMv7-A+NEON or ARMv8-A." on armv7 system

ankith26 opened this issue · 2 comments

I am trying to compile a project using sse2neon.h inside a docker container from the base image balenalib/raspberrypi3-debian:bookworm, using QEMU for armv7 virtualization.

Here is some info as printed by the meson build system inside this container

C compiler for the host machine: cc (gcc 12.2.0 "cc (Raspbian 12.2.0-14+rpi1) 12.2.0")
C linker for the host machine: cc ld.bfd 2.40
Host machine cpu family: arm
Host machine cpu: armv7l

The build fails with "Unsupported target. Must be either ARMv7-A+NEON or ARMv8-A." in the file that the header is included but this system is clearly armv7.

I am not sure if this is something that must be fixed in this library or the compiler toolchain/distribution I am using, but I am making this issue report anyways because I believe this check can be removed or updated on the sse2neon side.

On ARMv7-A targets, you need to append the compiler option -mfpu=neon.

Hello!

I was already passing -mfpu=neon. But I just found out that on raspbian gcc defaults to doing something like -march=armv6 even on an armv7 processor, so manually passing -march=armv7-a fixed my issue