Page MenuHome GnuPG

Respect --disable-neon-support configure option
Closed, ResolvedPublic

Description

When specifying --disable-neon-support during configure, NEON support for ARM is
still built if the system is detected as being able to build NEON. The files
listed below check for HAVE_GCC_INLINE_ASM_NEON==1, defined by the configure
check to see if NEON is supported, but do not check if ENABLE_NEON_SUPPORT is
disabled, which is set by --disable-neon-support:
cipher/serpent.c:53
cipher/salsa20-armv7-neon.S:25
cipher/salsa20.c:54
cipher/sha512.c:62
cipher/sha512-armv7-neon.S:25

A possible solution, shown for serpent.c, would be to add a check for
defined(ENABLE_NEON_SUPPORT):

/* USE_NEON indicates whether to enable ARM NEON assembly code. */
#undef USE_NEON
#if defined(HAVE_ARM_ARCH_V6) && defined(ARMEL) &&
defined(ENABLE_NEON_SUPPORT)

  1. if defined(HAVE_COMPATIBLE_GCC_ARM_PLATFORM_AS) && \ defined(HAVE_GCC_INLINE_ASM_NEON)
  2. define USE_NEON 1
  3. endif

#endif

Details

Version
1.6.0

Event Timeline

Fixed in master with commit 52f7c48.
Can you test it with master or should I do a backport to 1.6 first?

I just tested with the changes applied to the LIBGCRYPT-1-6-BRANCH head, minus
the sha1.c changes (since the NEON parts weren't there), and it is building and
running fine for me. I assume it should work fine in master given this, and can
test that later if you would like, I'm just currently missing the libgpg-error >=
1.13 dependency for doing that. Thanks for your help getting this fixed up.

Thanks. I backport it tomorrow.

werner claimed this task.
werner removed a project: Restricted Project.

Did you intend to include the changes in 1.6.1? It doesn't appear that they made
it into the release.

Oh no!

I recall that I looked up the commit id this morning but obviously was disturbed
and thus didn't actually complete the cherry-pick. Sorry. I just pushed the
change. We need to wait some time before we can do a 1.6.2.

I attach a patch for 1.6.1.

Thanks, it's no problem to wait until 1.6.2. I just tested the patch and it's
working as intended.