Re: [OE-core] [pyro][PATCH] goarch.bbclass: Replace logic for setting GOARM

2017-10-19 Thread Will Newton
On Wed, Sep 27, 2017 at 4:08 AM, akuster808  wrote:

Hi Armin,

> On 09/26/2017 09:36 AM, Will Newton wrote:
>> Hi,
>>
>> Is this change ok for the stable branch?
> merged into staging.

Do you have a feel for when these changes might make their way to the
pyro branch?

Thanks,

>> On Mon, Sep 18, 2017 at 4:43 PM, Will Newton  wrote:
>>> From: Will Newton 
>>>
>>> The previous logic applied a regex to TUNE_FEATURES which could
>>> set the GOARM value to 7 incorrectly, for example when dealing
>>> with an arm1176 core. Simplify to check for the presence of
>>> "armv7" instead. At the same time add a check for "armv6" and
>>> set GOARM to 6 in that case.
>>>
>>> (From OE-Core rev: 07b60c15e9ef650940afdde37bf3f3b9c50a336d)
>>>
>>> Signed-off-by: Will Newton 
>>> Signed-off-by: Otavio Salvador 
>>> Signed-off-by: Richard Purdie 
>>> ---
>>>  meta/classes/goarch.bbclass | 7 +--
>>>  1 file changed, 5 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/meta/classes/goarch.bbclass b/meta/classes/goarch.bbclass
>>> index 4a5b2ec787..12df88f8c4 100644
>>> --- a/meta/classes/goarch.bbclass
>>> +++ b/meta/classes/goarch.bbclass
>>> @@ -38,8 +38,11 @@ def go_map_arch(a, d):
>>>
>>>  def go_map_arm(a, f, d):
>>>  import re
>>> -if re.match('arm.*', a) and re.match('arm.*7.*', f):
>>> -return '7'
>>> +if re.match('arm.*', a):
>>> +if 'armv7' in f:
>>> +return '7'
>>> +elif 'armv6' in f:
>>> +return '6'
>>>  return ''
>>>
>>>  def go_map_os(o, d):
>>> --
>>> 2.13.5
>>>
>
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [pyro][PATCH] goarch.bbclass: Replace logic for setting GOARM

2017-09-26 Thread Will Newton
Hi,

Is this change ok for the stable branch?

On Mon, Sep 18, 2017 at 4:43 PM, Will Newton  wrote:
> From: Will Newton 
>
> The previous logic applied a regex to TUNE_FEATURES which could
> set the GOARM value to 7 incorrectly, for example when dealing
> with an arm1176 core. Simplify to check for the presence of
> "armv7" instead. At the same time add a check for "armv6" and
> set GOARM to 6 in that case.
>
> (From OE-Core rev: 07b60c15e9ef650940afdde37bf3f3b9c50a336d)
>
> Signed-off-by: Will Newton 
> Signed-off-by: Otavio Salvador 
> Signed-off-by: Richard Purdie 
> ---
>  meta/classes/goarch.bbclass | 7 +--
>  1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/meta/classes/goarch.bbclass b/meta/classes/goarch.bbclass
> index 4a5b2ec787..12df88f8c4 100644
> --- a/meta/classes/goarch.bbclass
> +++ b/meta/classes/goarch.bbclass
> @@ -38,8 +38,11 @@ def go_map_arch(a, d):
>
>  def go_map_arm(a, f, d):
>  import re
> -if re.match('arm.*', a) and re.match('arm.*7.*', f):
> -return '7'
> +if re.match('arm.*', a):
> +if 'armv7' in f:
> +return '7'
> +elif 'armv6' in f:
> +return '6'
>  return ''
>
>  def go_map_os(o, d):
> --
> 2.13.5
>
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [pyro][PATCH] goarch.bbclass: Replace logic for setting GOARM

2017-09-18 Thread Will Newton
From: Will Newton 

The previous logic applied a regex to TUNE_FEATURES which could
set the GOARM value to 7 incorrectly, for example when dealing
with an arm1176 core. Simplify to check for the presence of
"armv7" instead. At the same time add a check for "armv6" and
set GOARM to 6 in that case.

(From OE-Core rev: 07b60c15e9ef650940afdde37bf3f3b9c50a336d)

Signed-off-by: Will Newton 
Signed-off-by: Otavio Salvador 
Signed-off-by: Richard Purdie 
---
 meta/classes/goarch.bbclass | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/meta/classes/goarch.bbclass b/meta/classes/goarch.bbclass
index 4a5b2ec787..12df88f8c4 100644
--- a/meta/classes/goarch.bbclass
+++ b/meta/classes/goarch.bbclass
@@ -38,8 +38,11 @@ def go_map_arch(a, d):
 
 def go_map_arm(a, f, d):
 import re
-if re.match('arm.*', a) and re.match('arm.*7.*', f):
-return '7'
+if re.match('arm.*', a):
+if 'armv7' in f:
+return '7'
+elif 'armv6' in f:
+return '6'
 return ''
 
 def go_map_os(o, d):
-- 
2.13.5

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH v5 04/26] goarch.bbclass: Replace logic for setting GOARM

2017-09-18 Thread Will Newton
Hi Armin,

Would it be possible to get this patch backported to the Pyro branch?

It fixes running Go programs on Raspberry Pi 1 systems which without
this will die with illegal instruction errors.

Thanks,


On Mon, Sep 11, 2017 at 1:45 PM, Otavio Salvador
 wrote:
> From: Will Newton 
>
> The previous logic applied a regex to TUNE_FEATURES which could
> set the GOARM value to 7 incorrectly, for example when dealing
> with an arm1176 core. Simplify to check for the presence of
> "armv7" instead. At the same time add a check for "armv6" and
> set GOARM to 6 in that case.
>
> Signed-off-by: Will Newton 
> Signed-off-by: Otavio Salvador 
> ---
>
> Changes in v6: None
> Changes in v5: None
> Changes in v4:
> - new patch to consolidade in a single patchset all golang changes
>
> Changes in v3: None
> Changes in v2: None
>
>  meta/classes/goarch.bbclass | 7 +--
>  1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/meta/classes/goarch.bbclass b/meta/classes/goarch.bbclass
> index 7960ac5f9e..0f0d8b6a60 100644
> --- a/meta/classes/goarch.bbclass
> +++ b/meta/classes/goarch.bbclass
> @@ -45,8 +45,11 @@ def go_map_arch(a, d):
>
>  def go_map_arm(a, f, d):
>  import re
> -if re.match('arm.*', a) and re.match('arm.*7.*', f):
> -return '7'
> +if re.match('arm.*', a):
> +if 'armv7' in f:
> +return '7'
> +elif 'armv6' in f:
> +return '6'
>  return ''
>
>  def go_map_os(o, d):
> --
> 2.14.1
>
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH v3 05/11] goarch.bbclass: Add support for ARMv5

2017-09-08 Thread Will Newton
On Fri, Sep 8, 2017 at 2:47 PM, Otavio Salvador  wrote:
> This adds support to return the proper ARMv5 format.
>
> This change is based on the meta-golang[1] layer. Thanks to Matt
> Madison  for his work on this.
>
> 1. https://github.com/madisongh/meta-golang
>
> Signed-off-by: Otavio Salvador 
> ---
>
> Changes in v3: None
> Changes in v2: None
>
>  meta/classes/goarch.bbclass | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/meta/classes/goarch.bbclass b/meta/classes/goarch.bbclass
> index 7960ac5f9e..dbec6ee2c8 100644
> --- a/meta/classes/goarch.bbclass
> +++ b/meta/classes/goarch.bbclass
> @@ -47,6 +47,8 @@ def go_map_arm(a, f, d):
>  import re
>  if re.match('arm.*', a) and re.match('arm.*7.*', f):
>  return '7'
> +if re.match('arm.*', a) and re.match('arm.*5.*', f):
> +return '5'

I suspect this regular expression is overly general, see:

http://lists.openembedded.org/pipermail/openembedded-core/2017-September/141938.html

The Go toolchain default is for ARMv5 when cross-compiling so as far
as I know setting this explicitly should have no effect at the moment,
although it may be valuable to protect against changes to the default.

>  return ''
>
>  def go_map_os(o, d):
> --
> 2.14.1
>
> --
> ___
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] goarch.bbclass: Replace logic for setting GOARM

2017-09-08 Thread Will Newton
On Thu, Sep 7, 2017 at 7:17 PM, Andre McCurdy  wrote:
> On Thu, Sep 7, 2017 at 5:31 AM, Will Newton  wrote:
>> The previous logic applied a regex to TUNE_FEATURES which could
>> set the GOARM value to 7 incorrectly, for example when dealing
>> with an arm1176 core. Simplify to check for the presence of
>> "armv7a" instead. At the same time add a check for "armv6" and
>> set GOARM to 6 in that case.
>>
>> Signed-off-by: Will Newton 
>> ---
>>  meta/classes/goarch.bbclass | 7 +--
>>  1 file changed, 5 insertions(+), 2 deletions(-)
>>
>> diff --git a/meta/classes/goarch.bbclass b/meta/classes/goarch.bbclass
>> index 4a5b2ec..35f2987 100644
>> --- a/meta/classes/goarch.bbclass
>> +++ b/meta/classes/goarch.bbclass
>> @@ -38,8 +38,11 @@ def go_map_arch(a, d):
>>
>>  def go_map_arm(a, f, d):
>>  import re
>> -if re.match('arm.*', a) and re.match('arm.*7.*', f):
>> -return '7'
>> +if re.match('arm.*', a):
>> +if 'armv7a' in f:
>
> You need to test for both armv7a (Cortex A9, etc) and armv7ve (Cortex
> A7, A15, etc).

Thanks, I've done a v2 that should take care of that.
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2] goarch.bbclass: Replace logic for setting GOARM

2017-09-08 Thread Will Newton
The previous logic applied a regex to TUNE_FEATURES which could
set the GOARM value to 7 incorrectly, for example when dealing
with an arm1176 core. Simplify to check for the presence of
"armv7" instead. At the same time add a check for "armv6" and
set GOARM to 6 in that case.

Signed-off-by: Will Newton 
---
 meta/classes/goarch.bbclass | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

Changes in v2:
 - Look for armv7 rather than armv7a

diff --git a/meta/classes/goarch.bbclass b/meta/classes/goarch.bbclass
index 4a5b2ec..35f2987 100644
--- a/meta/classes/goarch.bbclass
+++ b/meta/classes/goarch.bbclass
@@ -38,8 +38,11 @@ def go_map_arch(a, d):
 
 def go_map_arm(a, f, d):
 import re
-if re.match('arm.*', a) and re.match('arm.*7.*', f):
-return '7'
+if re.match('arm.*', a):
+if 'armv7' in f:
+return '7'
+elif 'armv6' in f:
+return '6'
 return ''
 
 def go_map_os(o, d):
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] goarch.bbclass: Replace logic for setting GOARM

2017-09-07 Thread Will Newton
The previous logic applied a regex to TUNE_FEATURES which could
set the GOARM value to 7 incorrectly, for example when dealing
with an arm1176 core. Simplify to check for the presence of
"armv7a" instead. At the same time add a check for "armv6" and
set GOARM to 6 in that case.

Signed-off-by: Will Newton 
---
 meta/classes/goarch.bbclass | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/meta/classes/goarch.bbclass b/meta/classes/goarch.bbclass
index 4a5b2ec..35f2987 100644
--- a/meta/classes/goarch.bbclass
+++ b/meta/classes/goarch.bbclass
@@ -38,8 +38,11 @@ def go_map_arch(a, d):
 
 def go_map_arm(a, f, d):
 import re
-if re.match('arm.*', a) and re.match('arm.*7.*', f):
-return '7'
+if re.match('arm.*', a):
+if 'armv7a' in f:
+return '7'
+elif 'armv6' in f:
+return '6'
 return ''
 
 def go_map_os(o, d):
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core