[edk2-devel] [PATCH v3 0/3] BaseTools: fix gcc workaround

Gerd Hoffmann posted 3 patches 2 years ago
Failed in applying to current master (apply log)
BaseTools/Source/C/DevicePath/GNUmakefile     |  3 +-
.../Source/C/Makefiles/compiler.makefile      | 76 +++++++++++++++++++
2 files changed, 78 insertions(+), 1 deletion(-)
create mode 100644 BaseTools/Source/C/Makefiles/compiler.makefile
[edk2-devel] [PATCH v3 0/3] BaseTools: fix gcc workaround
Posted by Gerd Hoffmann 2 years ago
The linux kernel has a bunch of useful macros to check whenever a given
compiler supports specific flags.  Import them, adapt them for edk2, then
put them into use to make both gcc5 and gcc12 work for BaseTools.

Gerd Hoffmann (3):
  BaseTools: import compiler check macros from linux kernel
  BaseTools: adapt comniler checks mmacros for edk2
  BaseTools: fix gcc workaround

 BaseTools/Source/C/DevicePath/GNUmakefile     |  3 +-
 .../Source/C/Makefiles/compiler.makefile      | 76 +++++++++++++++++++
 2 files changed, 78 insertions(+), 1 deletion(-)
 create mode 100644 BaseTools/Source/C/Makefiles/compiler.makefile

-- 
2.35.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#88405): https://edk2.groups.io/g/devel/message/88405
Mute This Topic: https://groups.io/mt/90237796/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH v3 0/3] BaseTools: fix gcc workaround
Posted by Pedro Falcato 2 years ago
Hi Gerd,

These patches are a great idea but I don't know if we can take GPLv2 code
like that. Are they even mergeable into the main edk2 repo (as it's not
compatible with BSD-2-clause)?

Thanks,
Pedro

On Mon, Apr 4, 2022 at 10:32 AM Gerd Hoffmann <kraxel@redhat.com> wrote:

> The linux kernel has a bunch of useful macros to check whenever a given
> compiler supports specific flags.  Import them, adapt them for edk2, then
> put them into use to make both gcc5 and gcc12 work for BaseTools.
>
> Gerd Hoffmann (3):
>   BaseTools: import compiler check macros from linux kernel
>   BaseTools: adapt comniler checks mmacros for edk2
>   BaseTools: fix gcc workaround
>
>  BaseTools/Source/C/DevicePath/GNUmakefile     |  3 +-
>  .../Source/C/Makefiles/compiler.makefile      | 76 +++++++++++++++++++
>  2 files changed, 78 insertions(+), 1 deletion(-)
>  create mode 100644 BaseTools/Source/C/Makefiles/compiler.makefile
>
> --
> 2.35.1
>
>
>
> 
>
>
>

-- 
Pedro Falcato


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#88409): https://edk2.groups.io/g/devel/message/88409
Mute This Topic: https://groups.io/mt/90237796/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [PATCH v3 0/3] BaseTools: fix gcc workaround
Posted by Gerd Hoffmann 2 years ago
On Mon, Apr 04, 2022 at 04:18:56PM +0100, Pedro Falcato wrote:
> Hi Gerd,
> 
> These patches are a great idea but I don't know if we can take GPLv2 code
> like that. Are they even mergeable into the main edk2 repo (as it's not
> compatible with BSD-2-clause)?

It's build system, doesn't end up being linked into firmware code, so
not sure license compatibility is actually a problem here.

In any case I strongly prefer to fix that in some automatic way which
does *not* require a new GCC12 tool chain definition.

So, any comments how to move forward with this?
Can we take the series as-is?
If not, other suggestions?
Second-best idea I've seen on the list is using 'gcc -dumpversion'.

Is it an option to just raise the minimum required gcc version to
something newer?  gcc5 was released almost 7 years ago ...

take care,
  Gerd



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#88517): https://edk2.groups.io/g/devel/message/88517
Mute This Topic: https://groups.io/mt/90237796/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH v3 0/3] BaseTools: fix gcc workaround
Posted by Bob Feng 2 years ago
Hi Gerd,

Your patches are great but I think we can't take them because of the incompatible license.
I think the new Toolchain definition, like GCC12, can not resolve this issue because Toolchain is not used for building BaseTools.
So I'd prefer the second option of using 'gcc -dumpversion'.

And also we have the task to convert the tools implemented by C to python implementation. After we have done that, there will be no BaseTools build issue.
https://github.com/tianocore/edk2-staging/tree/PyBaseTools

@Gao, Liming @Chen, Christine
Could you review the corresponding patch?

Thanks,
Bob

-----Original Message-----
From: Gerd Hoffmann <kraxel@redhat.com> 
Sent: Thursday, April 7, 2022 6:12 PM
To: Pedro Falcato <pedro.falcato@gmail.com>
Cc: edk2-devel-groups-io <devel@edk2.groups.io>; Chen, Christine <yuwei.chen@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>; Pawel Polawski <ppolawsk@redhat.com>; Feng, Bob C <bob.c.feng@intel.com>; Oliver Steffen <osteffen@redhat.com>; Rebecca Cran <rebecca@bsdio.com>
Subject: Re: [edk2-devel] [PATCH v3 0/3] BaseTools: fix gcc workaround

On Mon, Apr 04, 2022 at 04:18:56PM +0100, Pedro Falcato wrote:
> Hi Gerd,
> 
> These patches are a great idea but I don't know if we can take GPLv2 
> code like that. Are they even mergeable into the main edk2 repo (as 
> it's not compatible with BSD-2-clause)?

It's build system, doesn't end up being linked into firmware code, so not sure license compatibility is actually a problem here.

In any case I strongly prefer to fix that in some automatic way which does *not* require a new GCC12 tool chain definition.

So, any comments how to move forward with this?
Can we take the series as-is?
If not, other suggestions?
Second-best idea I've seen on the list is using 'gcc -dumpversion'.

Is it an option to just raise the minimum required gcc version to something newer?  gcc5 was released almost 7 years ago ...

take care,
  Gerd



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#88659): https://edk2.groups.io/g/devel/message/88659
Mute This Topic: https://groups.io/mt/90237796/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-