Patchwork [PATCHv2] nettle: fix ARM NEON breakage

login
register
mail settings
Submitter Gustavo Zacarias
Date May 5, 2013, 12:35 p.m.
Message ID <1367757308-18176-1-git-send-email-gustavo@zacarias.com.ar>
Download mbox | patch
Permalink /patch/241509/
State Accepted
Commit 59c360bdae993908ec1a2fa4a8a19c173aed8427
Headers show

Comments

Gustavo Zacarias - May 5, 2013, 12:35 p.m.
Nettle's ARM NEON optimizations use some assembly constructs that aren't
friendly with binutils < 2.21, so just disable it for external
toolchains or internal with an unsupported version.
http://autobuild.buildroot.net/results/3c6f91379f90d438b4da3dd330cf89e1dd746aaf/

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 package/nettle/nettle.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Peter Korsgaard - May 5, 2013, 7 p.m.
>>>>> "Gustavo" == Gustavo Zacarias <gustavo@zacarias.com.ar> writes:

 Gustavo> Nettle's ARM NEON optimizations use some assembly constructs
 Gustavo> that aren't friendly with binutils < 2.21, so just disable it
 Gustavo> for external toolchains or internal with an unsupported
 Gustavo> version.
 Gustavo> http://autobuild.buildroot.net/results/3c6f91379f90d438b4da3dd330cf89e1dd746aaf/

Committed, thanks.

Patch

diff --git a/package/nettle/nettle.mk b/package/nettle/nettle.mk
index b3d2730..131826e 100644
--- a/package/nettle/nettle.mk
+++ b/package/nettle/nettle.mk
@@ -10,8 +10,8 @@  ifeq ($(BR2_arm7tdmi)$(BR2_arm720t)$(BR2_arm920t)$(BR2_arm922t)$(BR2_arm926t)$(B
 NETTLE_CONF_OPT += --disable-assembler
 endif
 
-# ARM NEON
-ifeq ($(BR2_ARM_CPU_HAS_NEON),y)
+# ARM NEON, requires binutils 2.21+
+ifeq ($(BR2_ARM_CPU_HAS_NEON)$(BR2_TOOLCHAIN_BUILDROOT)$(BR2_BINUTILS_VERSION_2_20_1),yy)
 NETTLE_CONF_OPT += --enable-arm-neon
 else
 NETTLE_CONF_OPT += --disable-arm-neon