Bug#734675: fftw3: Fix configury for neon support on arm64 (armv8)

Edmund Grimley Evans edmund.grimley.evans at gmail.com
Fri Nov 28 17:12:36 UTC 2014


The patch "fftw3_3.3.3-7-arm64-neon-support-config.patch", posted to
this bug on 2014-01-09, is still basically good, I think, and there
seem to be no internal compiler errors any more.

A good set of changes against 3.3.4-2 is:

In configure.ac, do what the earlier patch says:

-       if test "$have_neon" = "yes" -a "x$NEON_CFLAGS" = x; then
+       # armhf (no flag needed on arm64)
+       if test "$host_cpu" = "arm" -a "$have_neon" = "yes" -a
"x$NEON_CFLAGS" = x; then

In debian/rules, enable NEON for arm64:

-ifneq (,$(filter $(ARCHITECTURE), armhf))
+ifneq (,$(filter $(ARCHITECTURE), arm64 armhf))

In simd-support/simd-neon.h, the earlier patch suggests:

+-#if defined(__GNUC__) && !defined(__ARM_NEON__)
++#if defined(__GNUC__) && !defined(__ARM_NEON__) && !defined (__aarch64__)
+ #error "compiling simd-neon.h requires -mfpu=neon or equivalent"

But I'd suggest doing this instead:

-#if defined(__GNUC__) && !defined(__ARM_NEON__)
+#if defined(__GNUC__) && !(defined(__ARM_NEON) || defined(__ARM_NEON__))

The macro __ARM_NEON is defined by arm64's gcc and by armhf's gcc with
"-mfpu=neon".

The macro __ARM_NEON__ is "old" and defined only by armhf's gcc with
"-mfpu=neon".

So there's no need to make an exception for __aarch64__.



More information about the debian-science-maintainers mailing list