* [PATCH edk2-basetools v2 0/1] Change BUILD_CFLAGS to CFLAGS to match edk2 BaseTools change
@ 2023-03-31 13:48 Rebecca Cran
2023-03-31 13:48 ` [PATCH edk2-basetools v2 1/1] " Rebecca Cran
0 siblings, 1 reply; 4+ messages in thread
From: Rebecca Cran @ 2023-03-31 13:48 UTC (permalink / raw)
To: devel, Bret Barkelew, Sean Brogan, Chris Fernald, Bob Feng,
Michael Kubacki, Oliver Steffen, Liming Gao
Cc: Rebecca Cran
Changes in v2:
Generate Makefiles with both BUILD_CFLAGS and CFLAGS for compatibility
until everyone's moved to a version of edk2 that expects CFLAGS.
Rebecca Cran (1):
Change BUILD_CFLAGS to CFLAGS to match edk2 BaseTools change
edk2basetools/Workspace/DscBuildData.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
--
2.34.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH edk2-basetools v2 1/1] Change BUILD_CFLAGS to CFLAGS to match edk2 BaseTools change
2023-03-31 13:48 [PATCH edk2-basetools v2 0/1] Change BUILD_CFLAGS to CFLAGS to match edk2 BaseTools change Rebecca Cran
@ 2023-03-31 13:48 ` Rebecca Cran
2023-04-03 16:10 ` Rebecca Cran
0 siblings, 1 reply; 4+ messages in thread
From: Rebecca Cran @ 2023-03-31 13:48 UTC (permalink / raw)
To: devel, Bret Barkelew, Sean Brogan, Chris Fernald, Bob Feng,
Michael Kubacki, Oliver Steffen, Liming Gao
Cc: Rebecca Cran
In order to support building BaseTools using non-default compilers, a
change is being made in the edk2 BaseTools directory to remove the
'BUILD_' prefix to CC, CXX, CFLAGS etc. so developers can for example
run 'make CC=clang CXX=clang++' to build using clang.
Update DscBuildData.py to generate Makefiles with both BUILD_CFLAGS and
CFLAGS for compatibility until everyone is using a version of
edk2 that expects CFLAGS.
Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
---
edk2basetools/Workspace/DscBuildData.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/edk2basetools/Workspace/DscBuildData.py b/edk2basetools/Workspace/DscBuildData.py
index ff5662f35702..f6bf326018c6 100644
--- a/edk2basetools/Workspace/DscBuildData.py
+++ b/edk2basetools/Workspace/DscBuildData.py
@@ -89,7 +89,8 @@ def _IsFieldValueAnArray (Value):
'''
WindowsCFLAGS = 'CFLAGS = $(CFLAGS) /wd4200 /wd4034 /wd4101 '
-LinuxCFLAGS = 'BUILD_CFLAGS += -Wno-pointer-to-int-cast -Wno-unused-variable '
+LinuxCFLAGS = 'CFLAGS += -Wno-pointer-to-int-cast -Wno-unused-variable '
+LinuxCFLAGS2 = 'BUILD_CFLAGS += -Wno-pointer-to-int-cast -Wno-unused-variable '
PcdMakefileEnd = '''
!INCLUDE $(BASE_TOOLS_PATH)\Source\C\Makefiles\ms.common
!INCLUDE $(BASE_TOOLS_PATH)\Source\C\Makefiles\ms.app
@@ -2891,6 +2892,7 @@ def GenerateByteArrayValue (self, StructuredPcds):
MakeApp = MakeApp + '\n'
CC_FLAGS = LinuxCFLAGS
+ CC_FLAGS2 = LinuxCFLAGS2
if sys.platform == "win32":
CC_FLAGS = WindowsCFLAGS
BuildOptions = OrderedDict()
@@ -2926,7 +2928,9 @@ def GenerateByteArrayValue (self, StructuredPcds):
ValueList = [item for item in BuildOptions['COMMON'] if item.startswith((r"/U","-U"))]
ValueList.extend([item for item in BuildOptions['COMMON'] if item.startswith((r"/D", "-D"))])
CC_FLAGS += " ".join(ValueList)
+ CC_FLAGS2 += " ".join(ValueList)
MakeApp += CC_FLAGS
+ MakeApp += "\n" + CC_FLAGS2
if sys.platform == "win32":
MakeApp = MakeApp + PcdMakefileEnd
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH edk2-basetools v2 1/1] Change BUILD_CFLAGS to CFLAGS to match edk2 BaseTools change
2023-03-31 13:48 ` [PATCH edk2-basetools v2 1/1] " Rebecca Cran
@ 2023-04-03 16:10 ` Rebecca Cran
2023-04-03 16:20 ` Michael D Kinney
0 siblings, 1 reply; 4+ messages in thread
From: Rebecca Cran @ 2023-04-03 16:10 UTC (permalink / raw)
To: devel, Bret Barkelew, Sean Brogan, Chris Fernald, Bob Feng,
Michael Kubacki, Oliver Steffen, Liming Gao, Michael D Kinney
Mike, Liming:
Could you review/approve this v2 patch please?
Thanks.
Rebecca Cran
On 3/31/23 7:48 AM, Rebecca Cran wrote:
> In order to support building BaseTools using non-default compilers, a
> change is being made in the edk2 BaseTools directory to remove the
> 'BUILD_' prefix to CC, CXX, CFLAGS etc. so developers can for example
> run 'make CC=clang CXX=clang++' to build using clang.
>
> Update DscBuildData.py to generate Makefiles with both BUILD_CFLAGS and
> CFLAGS for compatibility until everyone is using a version of
> edk2 that expects CFLAGS.
>
> Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
> ---
> edk2basetools/Workspace/DscBuildData.py | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/edk2basetools/Workspace/DscBuildData.py b/edk2basetools/Workspace/DscBuildData.py
> index ff5662f35702..f6bf326018c6 100644
> --- a/edk2basetools/Workspace/DscBuildData.py
> +++ b/edk2basetools/Workspace/DscBuildData.py
> @@ -89,7 +89,8 @@ def _IsFieldValueAnArray (Value):
> '''
>
> WindowsCFLAGS = 'CFLAGS = $(CFLAGS) /wd4200 /wd4034 /wd4101 '
> -LinuxCFLAGS = 'BUILD_CFLAGS += -Wno-pointer-to-int-cast -Wno-unused-variable '
> +LinuxCFLAGS = 'CFLAGS += -Wno-pointer-to-int-cast -Wno-unused-variable '
> +LinuxCFLAGS2 = 'BUILD_CFLAGS += -Wno-pointer-to-int-cast -Wno-unused-variable '
> PcdMakefileEnd = '''
> !INCLUDE $(BASE_TOOLS_PATH)\Source\C\Makefiles\ms.common
> !INCLUDE $(BASE_TOOLS_PATH)\Source\C\Makefiles\ms.app
> @@ -2891,6 +2892,7 @@ def GenerateByteArrayValue (self, StructuredPcds):
> MakeApp = MakeApp + '\n'
>
> CC_FLAGS = LinuxCFLAGS
> + CC_FLAGS2 = LinuxCFLAGS2
> if sys.platform == "win32":
> CC_FLAGS = WindowsCFLAGS
> BuildOptions = OrderedDict()
> @@ -2926,7 +2928,9 @@ def GenerateByteArrayValue (self, StructuredPcds):
> ValueList = [item for item in BuildOptions['COMMON'] if item.startswith((r"/U","-U"))]
> ValueList.extend([item for item in BuildOptions['COMMON'] if item.startswith((r"/D", "-D"))])
> CC_FLAGS += " ".join(ValueList)
> + CC_FLAGS2 += " ".join(ValueList)
> MakeApp += CC_FLAGS
> + MakeApp += "\n" + CC_FLAGS2
>
> if sys.platform == "win32":
> MakeApp = MakeApp + PcdMakefileEnd
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH edk2-basetools v2 1/1] Change BUILD_CFLAGS to CFLAGS to match edk2 BaseTools change
2023-04-03 16:10 ` Rebecca Cran
@ 2023-04-03 16:20 ` Michael D Kinney
0 siblings, 0 replies; 4+ messages in thread
From: Michael D Kinney @ 2023-04-03 16:20 UTC (permalink / raw)
To: Rebecca Cran, devel@edk2.groups.io, Barkelew, Bret, Sean Brogan,
Chris Fernald, Feng, Bob C, Kubacki, Michael, Oliver Steffen,
Gao, Liming
Cc: Kinney, Michael D
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
> -----Original Message-----
> From: Rebecca Cran <rebecca@bsdio.com>
> Sent: Monday, April 3, 2023 9:11 AM
> To: devel@edk2.groups.io; Barkelew, Bret <bret.barkelew@microsoft.com>; Sean Brogan <sean.brogan@microsoft.com>; Chris
> Fernald <chris.fernald@outlook.com>; Feng, Bob C <bob.c.feng@intel.com>; Kubacki, Michael <michael.kubacki@microsoft.com>;
> Oliver Steffen <osteffen@redhat.com>; Gao, Liming <gaoliming@byosoft.com.cn>; Kinney, Michael D
> <michael.d.kinney@intel.com>
> Subject: Re: [PATCH edk2-basetools v2 1/1] Change BUILD_CFLAGS to CFLAGS to match edk2 BaseTools change
>
> Mike, Liming:
>
>
> Could you review/approve this v2 patch please?
>
>
> Thanks.
> Rebecca Cran
>
>
> On 3/31/23 7:48 AM, Rebecca Cran wrote:
> > In order to support building BaseTools using non-default compilers, a
> > change is being made in the edk2 BaseTools directory to remove the
> > 'BUILD_' prefix to CC, CXX, CFLAGS etc. so developers can for example
> > run 'make CC=clang CXX=clang++' to build using clang.
> >
> > Update DscBuildData.py to generate Makefiles with both BUILD_CFLAGS and
> > CFLAGS for compatibility until everyone is using a version of
> > edk2 that expects CFLAGS.
> >
> > Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
> > ---
> > edk2basetools/Workspace/DscBuildData.py | 6 +++++-
> > 1 file changed, 5 insertions(+), 1 deletion(-)
> >
> > diff --git a/edk2basetools/Workspace/DscBuildData.py b/edk2basetools/Workspace/DscBuildData.py
> > index ff5662f35702..f6bf326018c6 100644
> > --- a/edk2basetools/Workspace/DscBuildData.py
> > +++ b/edk2basetools/Workspace/DscBuildData.py
> > @@ -89,7 +89,8 @@ def _IsFieldValueAnArray (Value):
> > '''
> >
> > WindowsCFLAGS = 'CFLAGS = $(CFLAGS) /wd4200 /wd4034 /wd4101 '
> > -LinuxCFLAGS = 'BUILD_CFLAGS += -Wno-pointer-to-int-cast -Wno-unused-variable '
> > +LinuxCFLAGS = 'CFLAGS += -Wno-pointer-to-int-cast -Wno-unused-variable '
> > +LinuxCFLAGS2 = 'BUILD_CFLAGS += -Wno-pointer-to-int-cast -Wno-unused-variable '
> > PcdMakefileEnd = '''
> > !INCLUDE $(BASE_TOOLS_PATH)\Source\C\Makefiles\ms.common
> > !INCLUDE $(BASE_TOOLS_PATH)\Source\C\Makefiles\ms.app
> > @@ -2891,6 +2892,7 @@ def GenerateByteArrayValue (self, StructuredPcds):
> > MakeApp = MakeApp + '\n'
> >
> > CC_FLAGS = LinuxCFLAGS
> > + CC_FLAGS2 = LinuxCFLAGS2
> > if sys.platform == "win32":
> > CC_FLAGS = WindowsCFLAGS
> > BuildOptions = OrderedDict()
> > @@ -2926,7 +2928,9 @@ def GenerateByteArrayValue (self, StructuredPcds):
> > ValueList = [item for item in BuildOptions['COMMON'] if item.startswith((r"/U","-U"))]
> > ValueList.extend([item for item in BuildOptions['COMMON'] if item.startswith((r"/D", "-D"))])
> > CC_FLAGS += " ".join(ValueList)
> > + CC_FLAGS2 += " ".join(ValueList)
> > MakeApp += CC_FLAGS
> > + MakeApp += "\n" + CC_FLAGS2
> >
> > if sys.platform == "win32":
> > MakeApp = MakeApp + PcdMakefileEnd
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-04-03 16:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-31 13:48 [PATCH edk2-basetools v2 0/1] Change BUILD_CFLAGS to CFLAGS to match edk2 BaseTools change Rebecca Cran
2023-03-31 13:48 ` [PATCH edk2-basetools v2 1/1] " Rebecca Cran
2023-04-03 16:10 ` Rebecca Cran
2023-04-03 16:20 ` Michael D Kinney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox