* [Buildroot] [PATCH] nettle: disable assembly optimizations for ARMv7M
@ 2016-07-25 0:15 Gustavo Zacarias
2016-07-25 20:48 ` Thomas Petazzoni
0 siblings, 1 reply; 7+ messages in thread
From: Gustavo Zacarias @ 2016-07-25 0:15 UTC (permalink / raw)
To: buildroot
It's thumb2-only and it requires ARM instructions.
Since V4 and V5 aren't enough either use the V7M knob to avoid
over-complicating the conditional. Fixes:
http://autobuild.buildroot.net/results/354/35418d33efa902d3a1a82b2cd58d8db1b1172e49/
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
package/nettle/nettle.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/nettle/nettle.mk b/package/nettle/nettle.mk
index c133839..a94a7fc 100644
--- a/package/nettle/nettle.mk
+++ b/package/nettle/nettle.mk
@@ -15,7 +15,7 @@ NETTLE_LICENSE_FILES = COPYING.LESSERv3 COPYINGv2
NETTLE_CONF_OPTS = --disable-openssl
# ARM assembly requires v6+ ISA
-ifeq ($(BR2_ARM_CPU_ARMV4)$(BR2_ARM_CPU_ARMV5),y)
+ifeq ($(BR2_ARM_CPU_ARMV4)$(BR2_ARM_CPU_ARMV5)$(BR2_ARM_CPU_ARMV7M),y)
NETTLE_CONF_OPTS += --disable-assembler
endif
--
2.7.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH] nettle: disable assembly optimizations for ARMv7M
2016-07-25 0:15 [Buildroot] [PATCH] nettle: disable assembly optimizations for ARMv7M Gustavo Zacarias
@ 2016-07-25 20:48 ` Thomas Petazzoni
2016-07-26 21:18 ` Peter Korsgaard
0 siblings, 1 reply; 7+ messages in thread
From: Thomas Petazzoni @ 2016-07-25 20:48 UTC (permalink / raw)
To: buildroot
Hello,
On Sun, 24 Jul 2016 21:15:59 -0300, Gustavo Zacarias wrote:
> It's thumb2-only and it requires ARM instructions.
> Since V4 and V5 aren't enough either use the V7M knob to avoid
> over-complicating the conditional. Fixes:
> http://autobuild.buildroot.net/results/354/35418d33efa902d3a1a82b2cd58d8db1b1172e49/
>
> Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
> ---
> package/nettle/nettle.mk | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/package/nettle/nettle.mk b/package/nettle/nettle.mk
> index c133839..a94a7fc 100644
> --- a/package/nettle/nettle.mk
> +++ b/package/nettle/nettle.mk
> @@ -15,7 +15,7 @@ NETTLE_LICENSE_FILES = COPYING.LESSERv3 COPYINGv2
> NETTLE_CONF_OPTS = --disable-openssl
>
> # ARM assembly requires v6+ ISA
> -ifeq ($(BR2_ARM_CPU_ARMV4)$(BR2_ARM_CPU_ARMV5),y)
> +ifeq ($(BR2_ARM_CPU_ARMV4)$(BR2_ARM_CPU_ARMV5)$(BR2_ARM_CPU_ARMV7M),y)
I've applied, but in the end, I'm wondering if the condition wouldn't
be simpler as:
ifeq ($(BR2_ARM_CPU_ARMV6)$(BR2_ARM_CPU_ARMV6),)
NETTLE_CONF_OPTS += --disable-assembler
endif
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH] nettle: disable assembly optimizations for ARMv7M
2016-07-25 20:48 ` Thomas Petazzoni
@ 2016-07-26 21:18 ` Peter Korsgaard
2016-07-27 7:15 ` Thomas Petazzoni
0 siblings, 1 reply; 7+ messages in thread
From: Peter Korsgaard @ 2016-07-26 21:18 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
> Hello,
> On Sun, 24 Jul 2016 21:15:59 -0300, Gustavo Zacarias wrote:
>> It's thumb2-only and it requires ARM instructions.
>> Since V4 and V5 aren't enough either use the V7M knob to avoid
>> over-complicating the conditional. Fixes:
>> http://autobuild.buildroot.net/results/354/35418d33efa902d3a1a82b2cd58d8db1b1172e49/
>>
>> Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
>> ---
>> package/nettle/nettle.mk | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/package/nettle/nettle.mk b/package/nettle/nettle.mk
>> index c133839..a94a7fc 100644
>> --- a/package/nettle/nettle.mk
>> +++ b/package/nettle/nettle.mk
>> @@ -15,7 +15,7 @@ NETTLE_LICENSE_FILES = COPYING.LESSERv3 COPYINGv2
>> NETTLE_CONF_OPTS = --disable-openssl
>>
>> # ARM assembly requires v6+ ISA
>> -ifeq ($(BR2_ARM_CPU_ARMV4)$(BR2_ARM_CPU_ARMV5),y)
>> +ifeq ($(BR2_ARM_CPU_ARMV4)$(BR2_ARM_CPU_ARMV5)$(BR2_ARM_CPU_ARMV7M),y)
> I've applied, but in the end, I'm wondering if the condition wouldn't
> be simpler as:
> ifeq ($(BR2_ARM_CPU_ARMV6)$(BR2_ARM_CPU_ARMV6),)
I take it that you mean:
ifeq ($(BR2_ARM_CPU_ARMV6)$(BR2_ARM_CPU_ARMV7A),)
We could also simply check for ARM and THUMB2 instructions, E.G.:
# needs thumb2 and arm instructions support
ifneq ($(BR2_ARM_CPU_HAS_ARM)$(BR2_ARM_CPU_HAS_THUMB2),yy)
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH] nettle: disable assembly optimizations for ARMv7M
2016-07-26 21:18 ` Peter Korsgaard
@ 2016-07-27 7:15 ` Thomas Petazzoni
2016-07-27 8:03 ` Peter Korsgaard
0 siblings, 1 reply; 7+ messages in thread
From: Thomas Petazzoni @ 2016-07-27 7:15 UTC (permalink / raw)
To: buildroot
Hello,
On Tue, 26 Jul 2016 23:18:37 +0200, Peter Korsgaard wrote:
> > ifeq ($(BR2_ARM_CPU_ARMV6)$(BR2_ARM_CPU_ARMV6),)
>
> I take it that you mean:
>
> ifeq ($(BR2_ARM_CPU_ARMV6)$(BR2_ARM_CPU_ARMV7A),)
Indeed, bad copy/paste.
> We could also simply check for ARM and THUMB2 instructions, E.G.:
>
> # needs thumb2 and arm instructions support
> ifneq ($(BR2_ARM_CPU_HAS_ARM)$(BR2_ARM_CPU_HAS_THUMB2),yy)
I don't think this is equivalent. Indeed, ARMv6 doesn't have Thumb2 (at
least from Buildroot point of view), while the assembly code in Nettle
is OK for ARMv6.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH] nettle: disable assembly optimizations for ARMv7M
2016-07-27 7:15 ` Thomas Petazzoni
@ 2016-07-27 8:03 ` Peter Korsgaard
2016-07-27 8:13 ` Thomas Petazzoni
0 siblings, 1 reply; 7+ messages in thread
From: Peter Korsgaard @ 2016-07-27 8:03 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
Hi,
>> We could also simply check for ARM and THUMB2 instructions, E.G.:
>>
>> # needs thumb2 and arm instructions support
>> ifneq ($(BR2_ARM_CPU_HAS_ARM)$(BR2_ARM_CPU_HAS_THUMB2),yy)
> I don't think this is equivalent. Indeed, ARMv6 doesn't have Thumb2 (at
> least from Buildroot point of view), while the assembly code in Nettle
> is OK for ARMv6.
True, but then the commit message doesn't make any sense as it said it
required thumb2 and classic in structions.
--
Venlig hilsen,
Peter Korsgaard
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH] nettle: disable assembly optimizations for ARMv7M
2016-07-27 8:03 ` Peter Korsgaard
@ 2016-07-27 8:13 ` Thomas Petazzoni
2016-07-27 9:23 ` Peter Korsgaard
0 siblings, 1 reply; 7+ messages in thread
From: Thomas Petazzoni @ 2016-07-27 8:13 UTC (permalink / raw)
To: buildroot
Hello,
On Wed, 27 Jul 2016 10:03:17 +0200, Peter Korsgaard wrote:
> > I don't think this is equivalent. Indeed, ARMv6 doesn't have Thumb2 (at
> > least from Buildroot point of view), while the assembly code in Nettle
> > is OK for ARMv6.
>
> True, but then the commit message doesn't make any sense as it said it
> required thumb2 and classic in structions.
That's not what the commit message said. The commit message said:
"""
nettle: disable assembly optimizations for ARMv7M
It's thumb2-only and it requires ARM instructions.
"""
So it did not say at all that nettle requires Thumb-2 *and* classic. It
said that ARMv7M provides only thumb2, and that nettle requires ARM
instructions.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 7+ messages in thread* [Buildroot] [PATCH] nettle: disable assembly optimizations for ARMv7M
2016-07-27 8:13 ` Thomas Petazzoni
@ 2016-07-27 9:23 ` Peter Korsgaard
0 siblings, 0 replies; 7+ messages in thread
From: Peter Korsgaard @ 2016-07-27 9:23 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
Hi,
> That's not what the commit message said. The commit message said:
> """
> nettle: disable assembly optimizations for ARMv7M
> It's thumb2-only and it requires ARM instructions.
> """
> So it did not say at all that nettle requires Thumb-2 *and* classic. It
> said that ARMv7M provides only thumb2, and that nettle requires ARM
> instructions.
Ahh, I read "It" as referring to the nettle code, not ARMv7M cores.
--
Venlig hilsen,
Peter Korsgaard
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-07-27 9:23 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-25 0:15 [Buildroot] [PATCH] nettle: disable assembly optimizations for ARMv7M Gustavo Zacarias
2016-07-25 20:48 ` Thomas Petazzoni
2016-07-26 21:18 ` Peter Korsgaard
2016-07-27 7:15 ` Thomas Petazzoni
2016-07-27 8:03 ` Peter Korsgaard
2016-07-27 8:13 ` Thomas Petazzoni
2016-07-27 9:23 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox