Re: [edk2-devel] [PATCH] BaseTools: support arm64 as a platform name in addition to aarch64

2019-05-03 Thread Laszlo Ersek
On 05/02/19 23:15, rebe...@bluestop.org wrote:
> On 2019-04-12 01:54, Laszlo Ersek wrote:
>>
>> obviously the "machine hardware name" is non-portable either, when we
>> consider FreeBSD.
>>
>> Either way I've obsessed enough about this.
>>
>> Reviewed-by: Laszlo Ersek 
> 
> 
> Could someone commit this, please?
> 
> 

[ler...@redhat.com: fix up DKIM damage in the "From:" address]

Commit fbb0ec7ea4c0.

Thanks,
Laszlo

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#39952): https://edk2.groups.io/g/devel/message/39952
Mute This Topic: https://groups.io/mt/31026994/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH] BaseTools: support arm64 as a platform name in addition to aarch64

2019-05-02 Thread rebecca
On 2019-04-12 01:54, Laszlo Ersek wrote:
>
> obviously the "machine hardware name" is non-portable either, when we
> consider FreeBSD.
>
> Either way I've obsessed enough about this.
>
> Reviewed-by: Laszlo Ersek 


Could someone commit this, please?


-- 
Rebecca Cran


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#39926): https://edk2.groups.io/g/devel/message/39926
Mute This Topic: https://groups.io/mt/31026994/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH] BaseTools: support arm64 as a platform name in addition to aarch64

2019-04-12 Thread Laszlo Ersek
On 04/11/19 22:11, Philippe Mathieu-Daudé wrote:
> On 4/11/19 9:58 PM, Rebecca Cran wrote:
>> On 2019-04-11 13:55, Philippe Mathieu-Daudé wrote:
>>>
>>> With the work around link added:
>>> Reviewed-by: Philippe Mathieu-Daude 
>>
>>
>>
>> But it's _not_ working around that bug. That was about "uname -p", but
>> the patch is about "uname -m".

That sounds convincing, thank you for the clarification. I'd still say
it's a workaround, just not for that specific FreeBSD BZ, because:

> Ah you are right, the script simply parse the 'machine hardware name' to
> extract the host architecture. We shouldn't rely on the 'processor type
> name' which is non-portable.

obviously the "machine hardware name" is non-portable either, when we
consider FreeBSD.

Either way I've obsessed enough about this.

Reviewed-by: Laszlo Ersek 

Thanks
Laszlo

> Simply checking for 'arm64' is enough.
> 
> So do not add the link, and keep my tag:
> Reviewed-by: Philippe Mathieu-Daude 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#38945): https://edk2.groups.io/g/devel/message/38945
Mute This Topic: https://groups.io/mt/31026994/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH] BaseTools: support arm64 as a platform name in addition to aarch64

2019-04-11 Thread Philippe Mathieu-Daudé
On 4/11/19 9:58 PM, Rebecca Cran wrote:
> On 2019-04-11 13:55, Philippe Mathieu-Daudé wrote:
>>
>> With the work around link added:
>> Reviewed-by: Philippe Mathieu-Daude 
> 
> 
> 
> But it's _not_ working around that bug. That was about "uname -p", but
> the patch is about "uname -m".

Ah you are right, the script simply parse the 'machine hardware name' to
extract the host architecture. We shouldn't rely on the 'processor type
name' which is non-portable. Simply checking for 'arm64' is enough.

So do not add the link, and keep my tag:
Reviewed-by: Philippe Mathieu-Daude 

Regards,

Phil.

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#38918): https://edk2.groups.io/g/devel/message/38918
Mute This Topic: https://groups.io/mt/31026994/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH] BaseTools: support arm64 as a platform name in addition to aarch64

2019-04-11 Thread rebecca via Groups.Io

On 2019-04-11 13:55, Philippe Mathieu-Daudé wrote:


With the work around link added:
Reviewed-by: Philippe Mathieu-Daude 




But it's _not_ working around that bug. That was about "uname -p", but 
the patch is about "uname -m".



--
Rebecca Cran


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#38916): https://edk2.groups.io/g/devel/message/38916
Mute This Topic: https://groups.io/mt/31026994/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH] BaseTools: support arm64 as a platform name in addition to aarch64

2019-04-11 Thread Philippe Mathieu-Daudé
On 4/11/19 7:52 PM, Laszlo Ersek wrote:
> On 04/11/19 16:23, Philippe Mathieu-Daudé wrote:
>> On 4/11/19 5:16 AM, Rebecca Cran via Groups.Io wrote:
>>> Some systems such as FreeBSD identify the platform as 'arm64'
>>> and not 'aarch64' as Linux does.
>>
>> Per https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=220297
>> this seems to be a FreeBSD bug.
> 
> You are correct, but that issue was filed on 2017-06-26. I don't think
> we should hold our breaths, as long as the workaround is simple. And, it
> does look simple. (We've worked around worse.)
> 
> I do suggest an addition to the patch, however: Rebecca, please add the
> link discovered by Phil near the "arm64" matches, in a comment.
> Something like:
> 
> # work around 

Good idea.

> Thanks,
> Laszlo
> 
>>
>>> Signed-off-by: Rebecca Cran 
>>> ---
>>>  BaseTools/Source/C/GNUmakefile   | 5 +++--
>>>  BaseTools/Source/C/Makefiles/header.makefile | 5 +++--
>>>  2 files changed, 6 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/BaseTools/Source/C/GNUmakefile b/BaseTools/Source/C/GNUmakefile
>>> index 1d048c4cc6..37bcce519c 100644
>>> --- a/BaseTools/Source/C/GNUmakefile
>>> +++ b/BaseTools/Source/C/GNUmakefile
>>> @@ -21,8 +21,9 @@ ifndef HOST_ARCH
>>>endif
>>>ifneq (,$(findstring aarch64,$(uname_m)))
>>>  HOST_ARCH=AARCH64
>>> -  endif
>>> -  ifneq (,$(findstring arm,$(uname_m)))
>>> +  else ifneq (,$(findstring arm64,$(uname_m)))

Here you change 2 different if() blocks into a single if/elif/elif.
Although not mentioned in the patch description, it is cleaner than
before your patch.

With the work around link added:
Reviewed-by: Philippe Mathieu-Daude 

Thanks,

Phil.

>>> +HOST_ARCH=AARCH64
>>> +  else ifneq (,$(findstring arm,$(uname_m)))
>>>  HOST_ARCH=ARM
>>>endif
>>>ifndef HOST_ARCH
>>> diff --git a/BaseTools/Source/C/Makefiles/header.makefile 
>>> b/BaseTools/Source/C/Makefiles/header.makefile
>>> index 90fb3453ad..d76b8283dd 100644
>>> --- a/BaseTools/Source/C/Makefiles/header.makefile
>>> +++ b/BaseTools/Source/C/Makefiles/header.makefile
>>> @@ -23,8 +23,9 @@ ifndef HOST_ARCH
>>>endif
>>>ifneq (,$(findstring aarch64,$(uname_m)))
>>>  HOST_ARCH=AARCH64
>>> -  endif
>>> -  ifneq (,$(findstring arm,$(uname_m)))
>>> +  else ifneq (,$(findstring arm64,$(uname_m)))
>>> +HOST_ARCH=AARCH64
>>> +  else ifneq (,$(findstring arm,$(uname_m)))
>>>  HOST_ARCH=ARM
>>>endif
>>>ifndef HOST_ARCH
>>>
>>
>> 
>>
> 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#38915): https://edk2.groups.io/g/devel/message/38915
Mute This Topic: https://groups.io/mt/31026994/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH] BaseTools: support arm64 as a platform name in addition to aarch64

2019-04-11 Thread Rebecca Cran via Groups.Io

On 2019-04-11 11:52, Laszlo Ersek wrote:

On 04/11/19 16:23, Philippe Mathieu-Daudé wrote:

On 4/11/19 5:16 AM, Rebecca Cran via Groups.Io wrote:

Some systems such as FreeBSD identify the platform as 'arm64'
and not 'aarch64' as Linux does.

Per https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=220297
this seems to be a FreeBSD bug.

You are correct, but that issue was filed on 2017-06-26. I don't think
we should hold our breaths, as long as the workaround is simple. And, it
does look simple. (We've worked around worse.)

I do suggest an addition to the patch, however: Rebecca, please add the
link discovered by Phil near the "arm64" matches, in a comment.
Something like:

# work around 




Thanks, I'll do that. I don't think there's anything to fix, because 
"uname -m" returns "arm64" and "uname -p" "aarch64". The EDK2 Makefiles 
use "uname -m" which I don't think anybody has complained about, but 
which return different values on Linux and FreeBSD.



--

Rebecca Cran


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#38913): https://edk2.groups.io/g/devel/message/38913
Mute This Topic: https://groups.io/mt/31026994/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH] BaseTools: support arm64 as a platform name in addition to aarch64

2019-04-11 Thread Laszlo Ersek
On 04/11/19 16:23, Philippe Mathieu-Daudé wrote:
> On 4/11/19 5:16 AM, Rebecca Cran via Groups.Io wrote:
>> Some systems such as FreeBSD identify the platform as 'arm64'
>> and not 'aarch64' as Linux does.
> 
> Per https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=220297
> this seems to be a FreeBSD bug.

You are correct, but that issue was filed on 2017-06-26. I don't think
we should hold our breaths, as long as the workaround is simple. And, it
does look simple. (We've worked around worse.)

I do suggest an addition to the patch, however: Rebecca, please add the
link discovered by Phil near the "arm64" matches, in a comment.
Something like:

# work around 

Thanks,
Laszlo

> 
>> Signed-off-by: Rebecca Cran 
>> ---
>>  BaseTools/Source/C/GNUmakefile   | 5 +++--
>>  BaseTools/Source/C/Makefiles/header.makefile | 5 +++--
>>  2 files changed, 6 insertions(+), 4 deletions(-)
>>
>> diff --git a/BaseTools/Source/C/GNUmakefile b/BaseTools/Source/C/GNUmakefile
>> index 1d048c4cc6..37bcce519c 100644
>> --- a/BaseTools/Source/C/GNUmakefile
>> +++ b/BaseTools/Source/C/GNUmakefile
>> @@ -21,8 +21,9 @@ ifndef HOST_ARCH
>>endif
>>ifneq (,$(findstring aarch64,$(uname_m)))
>>  HOST_ARCH=AARCH64
>> -  endif
>> -  ifneq (,$(findstring arm,$(uname_m)))
>> +  else ifneq (,$(findstring arm64,$(uname_m)))
>> +HOST_ARCH=AARCH64
>> +  else ifneq (,$(findstring arm,$(uname_m)))
>>  HOST_ARCH=ARM
>>endif
>>ifndef HOST_ARCH
>> diff --git a/BaseTools/Source/C/Makefiles/header.makefile 
>> b/BaseTools/Source/C/Makefiles/header.makefile
>> index 90fb3453ad..d76b8283dd 100644
>> --- a/BaseTools/Source/C/Makefiles/header.makefile
>> +++ b/BaseTools/Source/C/Makefiles/header.makefile
>> @@ -23,8 +23,9 @@ ifndef HOST_ARCH
>>endif
>>ifneq (,$(findstring aarch64,$(uname_m)))
>>  HOST_ARCH=AARCH64
>> -  endif
>> -  ifneq (,$(findstring arm,$(uname_m)))
>> +  else ifneq (,$(findstring arm64,$(uname_m)))
>> +HOST_ARCH=AARCH64
>> +  else ifneq (,$(findstring arm,$(uname_m)))
>>  HOST_ARCH=ARM
>>endif
>>ifndef HOST_ARCH
>>
> 
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#38901): https://edk2.groups.io/g/devel/message/38901
Mute This Topic: https://groups.io/mt/31026994/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH] BaseTools: support arm64 as a platform name in addition to aarch64

2019-04-11 Thread Philippe Mathieu-Daudé
On 4/11/19 5:16 AM, Rebecca Cran via Groups.Io wrote:
> Some systems such as FreeBSD identify the platform as 'arm64'
> and not 'aarch64' as Linux does.

Per https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=220297
this seems to be a FreeBSD bug.

> Signed-off-by: Rebecca Cran 
> ---
>  BaseTools/Source/C/GNUmakefile   | 5 +++--
>  BaseTools/Source/C/Makefiles/header.makefile | 5 +++--
>  2 files changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/BaseTools/Source/C/GNUmakefile b/BaseTools/Source/C/GNUmakefile
> index 1d048c4cc6..37bcce519c 100644
> --- a/BaseTools/Source/C/GNUmakefile
> +++ b/BaseTools/Source/C/GNUmakefile
> @@ -21,8 +21,9 @@ ifndef HOST_ARCH
>endif
>ifneq (,$(findstring aarch64,$(uname_m)))
>  HOST_ARCH=AARCH64
> -  endif
> -  ifneq (,$(findstring arm,$(uname_m)))
> +  else ifneq (,$(findstring arm64,$(uname_m)))
> +HOST_ARCH=AARCH64
> +  else ifneq (,$(findstring arm,$(uname_m)))
>  HOST_ARCH=ARM
>endif
>ifndef HOST_ARCH
> diff --git a/BaseTools/Source/C/Makefiles/header.makefile 
> b/BaseTools/Source/C/Makefiles/header.makefile
> index 90fb3453ad..d76b8283dd 100644
> --- a/BaseTools/Source/C/Makefiles/header.makefile
> +++ b/BaseTools/Source/C/Makefiles/header.makefile
> @@ -23,8 +23,9 @@ ifndef HOST_ARCH
>endif
>ifneq (,$(findstring aarch64,$(uname_m)))
>  HOST_ARCH=AARCH64
> -  endif
> -  ifneq (,$(findstring arm,$(uname_m)))
> +  else ifneq (,$(findstring arm64,$(uname_m)))
> +HOST_ARCH=AARCH64
> +  else ifneq (,$(findstring arm,$(uname_m)))
>  HOST_ARCH=ARM
>endif
>ifndef HOST_ARCH
> 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#38891): https://edk2.groups.io/g/devel/message/38891
Mute This Topic: https://groups.io/mt/31026994/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH] BaseTools: support arm64 as a platform name in addition to aarch64

2019-04-11 Thread Liming Gao
Reviewed-by: Liming Gao 

> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Rebecca 
> Cran via Groups.Io
> Sent: Thursday, April 11, 2019 11:17 AM
> To: devel@edk2.groups.io; Gao, Liming ; Zhu, Yonghong 
> 
> Cc: Rebecca Cran 
> Subject: [edk2-devel] [PATCH] BaseTools: support arm64 as a platform name in 
> addition to aarch64
> 
> Some systems such as FreeBSD identify the platform as 'arm64'
> and not 'aarch64' as Linux does.
> 
> Signed-off-by: Rebecca Cran 
> ---
>  BaseTools/Source/C/GNUmakefile   | 5 +++--
>  BaseTools/Source/C/Makefiles/header.makefile | 5 +++--
>  2 files changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/BaseTools/Source/C/GNUmakefile b/BaseTools/Source/C/GNUmakefile
> index 1d048c4cc6..37bcce519c 100644
> --- a/BaseTools/Source/C/GNUmakefile
> +++ b/BaseTools/Source/C/GNUmakefile
> @@ -21,8 +21,9 @@ ifndef HOST_ARCH
>endif
>ifneq (,$(findstring aarch64,$(uname_m)))
>  HOST_ARCH=AARCH64
> -  endif
> -  ifneq (,$(findstring arm,$(uname_m)))
> +  else ifneq (,$(findstring arm64,$(uname_m)))
> +HOST_ARCH=AARCH64
> +  else ifneq (,$(findstring arm,$(uname_m)))
>  HOST_ARCH=ARM
>endif
>ifndef HOST_ARCH
> diff --git a/BaseTools/Source/C/Makefiles/header.makefile 
> b/BaseTools/Source/C/Makefiles/header.makefile
> index 90fb3453ad..d76b8283dd 100644
> --- a/BaseTools/Source/C/Makefiles/header.makefile
> +++ b/BaseTools/Source/C/Makefiles/header.makefile
> @@ -23,8 +23,9 @@ ifndef HOST_ARCH
>endif
>ifneq (,$(findstring aarch64,$(uname_m)))
>  HOST_ARCH=AARCH64
> -  endif
> -  ifneq (,$(findstring arm,$(uname_m)))
> +  else ifneq (,$(findstring arm64,$(uname_m)))
> +HOST_ARCH=AARCH64
> +  else ifneq (,$(findstring arm,$(uname_m)))
>  HOST_ARCH=ARM
>endif
>ifndef HOST_ARCH
> --
> 2.20.1
> 
> 
> -=-=-=-=-=-=
> Groups.io Links: You receive all messages sent to this group.
> 
> View/Reply Online (#38845): https://edk2.groups.io/g/devel/message/38845
> Mute This Topic: https://groups.io/mt/31026994/1759384
> Group Owner: devel+ow...@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub  [liming@intel.com]
> -=-=-=-=-=-=


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#3): https://edk2.groups.io/g/devel/message/3
Mute This Topic: https://groups.io/mt/31026994/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH] BaseTools: support arm64 as a platform name in addition to aarch64

2019-04-10 Thread Rebecca Cran via Groups.Io
Some systems such as FreeBSD identify the platform as 'arm64'
and not 'aarch64' as Linux does.

Signed-off-by: Rebecca Cran 
---
 BaseTools/Source/C/GNUmakefile   | 5 +++--
 BaseTools/Source/C/Makefiles/header.makefile | 5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/BaseTools/Source/C/GNUmakefile b/BaseTools/Source/C/GNUmakefile
index 1d048c4cc6..37bcce519c 100644
--- a/BaseTools/Source/C/GNUmakefile
+++ b/BaseTools/Source/C/GNUmakefile
@@ -21,8 +21,9 @@ ifndef HOST_ARCH
   endif
   ifneq (,$(findstring aarch64,$(uname_m)))
 HOST_ARCH=AARCH64
-  endif
-  ifneq (,$(findstring arm,$(uname_m)))
+  else ifneq (,$(findstring arm64,$(uname_m)))
+HOST_ARCH=AARCH64
+  else ifneq (,$(findstring arm,$(uname_m)))
 HOST_ARCH=ARM
   endif
   ifndef HOST_ARCH
diff --git a/BaseTools/Source/C/Makefiles/header.makefile 
b/BaseTools/Source/C/Makefiles/header.makefile
index 90fb3453ad..d76b8283dd 100644
--- a/BaseTools/Source/C/Makefiles/header.makefile
+++ b/BaseTools/Source/C/Makefiles/header.makefile
@@ -23,8 +23,9 @@ ifndef HOST_ARCH
   endif
   ifneq (,$(findstring aarch64,$(uname_m)))
 HOST_ARCH=AARCH64
-  endif
-  ifneq (,$(findstring arm,$(uname_m)))
+  else ifneq (,$(findstring arm64,$(uname_m)))
+HOST_ARCH=AARCH64
+  else ifneq (,$(findstring arm,$(uname_m)))
 HOST_ARCH=ARM
   endif
   ifndef HOST_ARCH
-- 
2.20.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#38845): https://edk2.groups.io/g/devel/message/38845
Mute This Topic: https://groups.io/mt/31026994/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-