public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH 1/1] BaseTools: Move C tool flags before the common flags
@ 2020-09-16  1:03 gaoliming
  2020-09-29  2:39 ` [edk2-devel] " Yuwei Chen
  2020-09-29  7:50 ` Bob Feng
  0 siblings, 2 replies; 5+ messages in thread
From: gaoliming @ 2020-09-16  1:03 UTC (permalink / raw)
  To: devel; +Cc: Yuwei Chen, Bob Feng

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2938

C tool may add the additional INC include path. They should have
high priority than the common INC include path.
This fix is to resolve the structure PCD issue to refer to the same
header file defined in BaseTools and MdePkg. The one in MdePkg should
be used.

Cc: Yuwei Chen <yuwei.chen@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Signed-off-by: Liming Gao <gaoliming@byosoft.com.cn>
---
 BaseTools/Source/C/Makefiles/ms.common            | 2 +-
 BaseTools/Source/Python/Workspace/DscBuildData.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/BaseTools/Source/C/Makefiles/ms.common b/BaseTools/Source/C/Makefiles/ms.common
index f5f77fdc0bc5..b2dbcf376c04 100644
--- a/BaseTools/Source/C/Makefiles/ms.common
+++ b/BaseTools/Source/C/Makefiles/ms.common
@@ -55,7 +55,7 @@ AR = lib.exe
 LD = link.exe
 LINKER = $(LD)
 
-INC = -I . -I $(SOURCE_PATH)\Include -I $(ARCH_INCLUDE) -I $(SOURCE_PATH)\Common $(INC)
+INC = $(INC) -I . -I $(SOURCE_PATH)\Include -I $(ARCH_INCLUDE) -I $(SOURCE_PATH)\Common
 
 CFLAGS = $(CFLAGS) /nologo /Zi /c /O2 /MT /W4 /WX /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE
 CPPFLAGS = $(CPPFLAGS) /EHsc /nologo /Zi /c /O2 /MT /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE
diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/Source/Python/Workspace/DscBuildData.py
index 1afbd3eefc6c..eba65625337a 100644
--- a/BaseTools/Source/Python/Workspace/DscBuildData.py
+++ b/BaseTools/Source/Python/Workspace/DscBuildData.py
@@ -2639,7 +2639,7 @@ class DscBuildData(PlatformBuildClassObject):
         else:
             MakeApp = MakeApp + PcdGccMakefile
             MakeApp = MakeApp + 'APPFILE = %s/%s\n' % (self.OutputPath, PcdValueInitName) + 'APPNAME = %s\n' % (PcdValueInitName) + 'OBJECTS = %s/%s.o %s.o\n' % (self.OutputPath, PcdValueInitName, os.path.join(self.OutputPath, PcdValueCommonName)) + \
-                      'include $(MAKEROOT)/Makefiles/app.makefile\n' + 'INCLUDE +='
+                      'include $(MAKEROOT)/Makefiles/app.makefile\n' + 'TOOL_INCLUDE +='
 
         IncSearchList = []
         PlatformInc = OrderedDict()
-- 
2.27.0.windows.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [edk2-devel] [PATCH 1/1] BaseTools: Move C tool flags before the common flags
  2020-09-16  1:03 [PATCH 1/1] BaseTools: Move C tool flags before the common flags gaoliming
@ 2020-09-29  2:39 ` Yuwei Chen
  2020-09-29  7:50 ` Bob Feng
  1 sibling, 0 replies; 5+ messages in thread
From: Yuwei Chen @ 2020-09-29  2:39 UTC (permalink / raw)
  To: devel@edk2.groups.io, gaoliming@byosoft.com.cn; +Cc: Feng, Bob C

Reviewed-by: Yuwei Chen<yuwei.chen@intel.com>

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of
> gaoliming
> Sent: Wednesday, September 16, 2020 9:03 AM
> To: devel@edk2.groups.io
> Cc: Chen, Christine <yuwei.chen@intel.com>; Feng, Bob C
> <bob.c.feng@intel.com>
> Subject: [edk2-devel] [PATCH 1/1] BaseTools: Move C tool flags before the
> common flags
> 
> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2938
> 
> C tool may add the additional INC include path. They should have high priority
> than the common INC include path.
> This fix is to resolve the structure PCD issue to refer to the same header file
> defined in BaseTools and MdePkg. The one in MdePkg should be used.
> 
> Cc: Yuwei Chen <yuwei.chen@intel.com>
> Cc: Bob Feng <bob.c.feng@intel.com>
> Signed-off-by: Liming Gao <gaoliming@byosoft.com.cn>
> ---
>  BaseTools/Source/C/Makefiles/ms.common            | 2 +-
>  BaseTools/Source/Python/Workspace/DscBuildData.py | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/BaseTools/Source/C/Makefiles/ms.common
> b/BaseTools/Source/C/Makefiles/ms.common
> index f5f77fdc0bc5..b2dbcf376c04 100644
> --- a/BaseTools/Source/C/Makefiles/ms.common
> +++ b/BaseTools/Source/C/Makefiles/ms.common
> @@ -55,7 +55,7 @@ AR = lib.exe
>  LD = link.exe
>  LINKER = $(LD)
> 
> -INC = -I . -I $(SOURCE_PATH)\Include -I $(ARCH_INCLUDE) -I
> $(SOURCE_PATH)\Common $(INC)
> +INC = $(INC) -I . -I $(SOURCE_PATH)\Include -I $(ARCH_INCLUDE) -I
> +$(SOURCE_PATH)\Common
> 
>  CFLAGS = $(CFLAGS) /nologo /Zi /c /O2 /MT /W4 /WX /D
> _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE
> CPPFLAGS = $(CPPFLAGS) /EHsc /nologo /Zi /c /O2 /MT /D
> _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE diff --
> git a/BaseTools/Source/Python/Workspace/DscBuildData.py
> b/BaseTools/Source/Python/Workspace/DscBuildData.py
> index 1afbd3eefc6c..eba65625337a 100644
> --- a/BaseTools/Source/Python/Workspace/DscBuildData.py
> +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py
> @@ -2639,7 +2639,7 @@ class DscBuildData(PlatformBuildClassObject):
>          else:
>              MakeApp = MakeApp + PcdGccMakefile
>              MakeApp = MakeApp + 'APPFILE = %s/%s\n' % (self.OutputPath,
> PcdValueInitName) + 'APPNAME = %s\n' % (PcdValueInitName) + 'OBJECTS
> = %s/%s.o %s.o\n' % (self.OutputPath, PcdValueInitName,
> os.path.join(self.OutputPath, PcdValueCommonName)) + \
> -                      'include $(MAKEROOT)/Makefiles/app.makefile\n' + 'INCLUDE
> +='
> +                      'include $(MAKEROOT)/Makefiles/app.makefile\n' +
> 'TOOL_INCLUDE +='
> 
>          IncSearchList = []
>          PlatformInc = OrderedDict()
> --
> 2.27.0.windows.1
> 
> 
> 
> 
> 
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] BaseTools: Move C tool flags before the common flags
  2020-09-16  1:03 [PATCH 1/1] BaseTools: Move C tool flags before the common flags gaoliming
  2020-09-29  2:39 ` [edk2-devel] " Yuwei Chen
@ 2020-09-29  7:50 ` Bob Feng
  2020-09-30  0:57   ` 回复: " gaoliming
  1 sibling, 1 reply; 5+ messages in thread
From: Bob Feng @ 2020-09-29  7:50 UTC (permalink / raw)
  To: Liming Gao, devel@edk2.groups.io; +Cc: Chen, Christine

Hi Liming,

Would you explain the purpose of the change done in DscBuildData.py?

Thanks,
Bob

-----Original Message-----
From: Liming Gao <gaoliming@byosoft.com.cn> 
Sent: Wednesday, September 16, 2020 9:03 AM
To: devel@edk2.groups.io
Cc: Chen, Christine <yuwei.chen@intel.com>; Feng, Bob C <bob.c.feng@intel.com>
Subject: [PATCH 1/1] BaseTools: Move C tool flags before the common flags

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2938

C tool may add the additional INC include path. They should have high priority than the common INC include path.
This fix is to resolve the structure PCD issue to refer to the same header file defined in BaseTools and MdePkg. The one in MdePkg should be used.

Cc: Yuwei Chen <yuwei.chen@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Signed-off-by: Liming Gao <gaoliming@byosoft.com.cn>
---
 BaseTools/Source/C/Makefiles/ms.common            | 2 +-
 BaseTools/Source/Python/Workspace/DscBuildData.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/BaseTools/Source/C/Makefiles/ms.common b/BaseTools/Source/C/Makefiles/ms.common
index f5f77fdc0bc5..b2dbcf376c04 100644
--- a/BaseTools/Source/C/Makefiles/ms.common
+++ b/BaseTools/Source/C/Makefiles/ms.common
@@ -55,7 +55,7 @@ AR = lib.exe
 LD = link.exe
 LINKER = $(LD)
 
-INC = -I . -I $(SOURCE_PATH)\Include -I $(ARCH_INCLUDE) -I $(SOURCE_PATH)\Common $(INC)
+INC = $(INC) -I . -I $(SOURCE_PATH)\Include -I $(ARCH_INCLUDE) -I 
+$(SOURCE_PATH)\Common
 
 CFLAGS = $(CFLAGS) /nologo /Zi /c /O2 /MT /W4 /WX /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE  CPPFLAGS = $(CPPFLAGS) /EHsc /nologo /Zi /c /O2 /MT /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/Source/Python/Workspace/DscBuildData.py
index 1afbd3eefc6c..eba65625337a 100644
--- a/BaseTools/Source/Python/Workspace/DscBuildData.py
+++ b/BaseTools/Source/Python/Workspace/DscBuildData.py
@@ -2639,7 +2639,7 @@ class DscBuildData(PlatformBuildClassObject):
         else:
             MakeApp = MakeApp + PcdGccMakefile
             MakeApp = MakeApp + 'APPFILE = %s/%s\n' % (self.OutputPath, PcdValueInitName) + 'APPNAME = %s\n' % (PcdValueInitName) + 'OBJECTS = %s/%s.o %s.o\n' % (self.OutputPath, PcdValueInitName, os.path.join(self.OutputPath, PcdValueCommonName)) + \
-                      'include $(MAKEROOT)/Makefiles/app.makefile\n' + 'INCLUDE +='
+                      'include $(MAKEROOT)/Makefiles/app.makefile\n' + 'TOOL_INCLUDE +='
 
         IncSearchList = []
         PlatformInc = OrderedDict()
--
2.27.0.windows.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* 回复: [PATCH 1/1] BaseTools: Move C tool flags before the common flags
  2020-09-29  7:50 ` Bob Feng
@ 2020-09-30  0:57   ` gaoliming
  2020-09-30  1:16     ` [edk2-devel] " Bob Feng
  0 siblings, 1 reply; 5+ messages in thread
From: gaoliming @ 2020-09-30  0:57 UTC (permalink / raw)
  To: 'Feng, Bob C', devel; +Cc: 'Chen, Christine'

Bob:
 In edk2\BaseTools\Source\C\Makefiles\header.makefile, TOOL_INCLUDE is the
first include directory. 

 So, I update DscBuildData.py to generate Edk2 source package include
directory to TOOL_INCLUDE macro. 
 Then, PcdValueInit will search the definition from Edk2 source package
first. 

Thanks
Liming
> -----邮件原件-----
> 发件人: Feng, Bob C <bob.c.feng@intel.com>
> 发送时间: 2020年9月29日 15:50
> 收件人: Liming Gao <gaoliming@byosoft.com.cn>; devel@edk2.groups.io
> 抄送: Chen, Christine <yuwei.chen@intel.com>
> 主题: RE: [PATCH 1/1] BaseTools: Move C tool flags before the common flags
> 
> Hi Liming,
> 
> Would you explain the purpose of the change done in DscBuildData.py?
> 
> Thanks,
> Bob
> 
> -----Original Message-----
> From: Liming Gao <gaoliming@byosoft.com.cn>
> Sent: Wednesday, September 16, 2020 9:03 AM
> To: devel@edk2.groups.io
> Cc: Chen, Christine <yuwei.chen@intel.com>; Feng, Bob C
> <bob.c.feng@intel.com>
> Subject: [PATCH 1/1] BaseTools: Move C tool flags before the common flags
> 
> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2938
> 
> C tool may add the additional INC include path. They should have high
priority
> than the common INC include path.
> This fix is to resolve the structure PCD issue to refer to the same header
file
> defined in BaseTools and MdePkg. The one in MdePkg should be used.
> 
> Cc: Yuwei Chen <yuwei.chen@intel.com>
> Cc: Bob Feng <bob.c.feng@intel.com>
> Signed-off-by: Liming Gao <gaoliming@byosoft.com.cn>
> ---
>  BaseTools/Source/C/Makefiles/ms.common            | 2 +-
>  BaseTools/Source/Python/Workspace/DscBuildData.py | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/BaseTools/Source/C/Makefiles/ms.common
> b/BaseTools/Source/C/Makefiles/ms.common
> index f5f77fdc0bc5..b2dbcf376c04 100644
> --- a/BaseTools/Source/C/Makefiles/ms.common
> +++ b/BaseTools/Source/C/Makefiles/ms.common
> @@ -55,7 +55,7 @@ AR = lib.exe
>  LD = link.exe
>  LINKER = $(LD)
> 
> -INC = -I . -I $(SOURCE_PATH)\Include -I $(ARCH_INCLUDE) -I
> $(SOURCE_PATH)\Common $(INC)
> +INC = $(INC) -I . -I $(SOURCE_PATH)\Include -I $(ARCH_INCLUDE) -I
> +$(SOURCE_PATH)\Common
> 
>  CFLAGS = $(CFLAGS) /nologo /Zi /c /O2 /MT /W4 /WX /D
> _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE
> CPPFLAGS = $(CPPFLAGS) /EHsc /nologo /Zi /c /O2 /MT /D
> _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE diff
> --git a/BaseTools/Source/Python/Workspace/DscBuildData.py
> b/BaseTools/Source/Python/Workspace/DscBuildData.py
> index 1afbd3eefc6c..eba65625337a 100644
> --- a/BaseTools/Source/Python/Workspace/DscBuildData.py
> +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py
> @@ -2639,7 +2639,7 @@ class DscBuildData(PlatformBuildClassObject):
>          else:
>              MakeApp = MakeApp + PcdGccMakefile
>              MakeApp = MakeApp + 'APPFILE = %s/%s\n' %
> (self.OutputPath, PcdValueInitName) + 'APPNAME = %s\n' %
> (PcdValueInitName) + 'OBJECTS = %s/%s.o %s.o\n' % (self.OutputPath,
> PcdValueInitName, os.path.join(self.OutputPath, PcdValueCommonName)) + \
> -                      'include
> $(MAKEROOT)/Makefiles/app.makefile\n' + 'INCLUDE +='
> +                      'include
> $(MAKEROOT)/Makefiles/app.makefile\n' + 'TOOL_INCLUDE +='
> 
>          IncSearchList = []
>          PlatformInc = OrderedDict()
> --
> 2.27.0.windows.1
> 




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [edk2-devel] 回复: [PATCH 1/1] BaseTools: Move C tool flags before the common flags
  2020-09-30  0:57   ` 回复: " gaoliming
@ 2020-09-30  1:16     ` Bob Feng
  0 siblings, 0 replies; 5+ messages in thread
From: Bob Feng @ 2020-09-30  1:16 UTC (permalink / raw)
  To: devel@edk2.groups.io, gaoliming@byosoft.com.cn; +Cc: Chen, Christine

I see. Thanks.

Reviewed-by: Bob Feng <bob.c.feng@intel.com>


-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of gaoliming
Sent: Wednesday, September 30, 2020 8:57 AM
To: Feng, Bob C <bob.c.feng@intel.com>; devel@edk2.groups.io
Cc: Chen, Christine <yuwei.chen@intel.com>
Subject: [edk2-devel] 回复: [PATCH 1/1] BaseTools: Move C tool flags before the common flags

Bob:
 In edk2\BaseTools\Source\C\Makefiles\header.makefile, TOOL_INCLUDE is the first include directory. 

 So, I update DscBuildData.py to generate Edk2 source package include directory to TOOL_INCLUDE macro. 
 Then, PcdValueInit will search the definition from Edk2 source package first. 

Thanks
Liming
> -----邮件原件-----
> 发件人: Feng, Bob C <bob.c.feng@intel.com>
> 发送时间: 2020年9月29日 15:50
> 收件人: Liming Gao <gaoliming@byosoft.com.cn>; devel@edk2.groups.io
> 抄送: Chen, Christine <yuwei.chen@intel.com>
> 主题: RE: [PATCH 1/1] BaseTools: Move C tool flags before the common 
> flags
> 
> Hi Liming,
> 
> Would you explain the purpose of the change done in DscBuildData.py?
> 
> Thanks,
> Bob
> 
> -----Original Message-----
> From: Liming Gao <gaoliming@byosoft.com.cn>
> Sent: Wednesday, September 16, 2020 9:03 AM
> To: devel@edk2.groups.io
> Cc: Chen, Christine <yuwei.chen@intel.com>; Feng, Bob C 
> <bob.c.feng@intel.com>
> Subject: [PATCH 1/1] BaseTools: Move C tool flags before the common 
> flags
> 
> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2938
> 
> C tool may add the additional INC include path. They should have high
priority
> than the common INC include path.
> This fix is to resolve the structure PCD issue to refer to the same 
> header
file
> defined in BaseTools and MdePkg. The one in MdePkg should be used.
> 
> Cc: Yuwei Chen <yuwei.chen@intel.com>
> Cc: Bob Feng <bob.c.feng@intel.com>
> Signed-off-by: Liming Gao <gaoliming@byosoft.com.cn>
> ---
>  BaseTools/Source/C/Makefiles/ms.common            | 2 +-
>  BaseTools/Source/Python/Workspace/DscBuildData.py | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/BaseTools/Source/C/Makefiles/ms.common
> b/BaseTools/Source/C/Makefiles/ms.common
> index f5f77fdc0bc5..b2dbcf376c04 100644
> --- a/BaseTools/Source/C/Makefiles/ms.common
> +++ b/BaseTools/Source/C/Makefiles/ms.common
> @@ -55,7 +55,7 @@ AR = lib.exe
>  LD = link.exe
>  LINKER = $(LD)
> 
> -INC = -I . -I $(SOURCE_PATH)\Include -I $(ARCH_INCLUDE) -I 
> $(SOURCE_PATH)\Common $(INC)
> +INC = $(INC) -I . -I $(SOURCE_PATH)\Include -I $(ARCH_INCLUDE) -I 
> +$(SOURCE_PATH)\Common
> 
>  CFLAGS = $(CFLAGS) /nologo /Zi /c /O2 /MT /W4 /WX /D 
> _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE CPPFLAGS = 
> $(CPPFLAGS) /EHsc /nologo /Zi /c /O2 /MT /D _CRT_SECURE_NO_DEPRECATE 
> /D _CRT_NONSTDC_NO_DEPRECATE diff --git 
> a/BaseTools/Source/Python/Workspace/DscBuildData.py
> b/BaseTools/Source/Python/Workspace/DscBuildData.py
> index 1afbd3eefc6c..eba65625337a 100644
> --- a/BaseTools/Source/Python/Workspace/DscBuildData.py
> +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py
> @@ -2639,7 +2639,7 @@ class DscBuildData(PlatformBuildClassObject):
>          else:
>              MakeApp = MakeApp + PcdGccMakefile
>              MakeApp = MakeApp + 'APPFILE = %s/%s\n' % 
> (self.OutputPath, PcdValueInitName) + 'APPNAME = %s\n' %
> (PcdValueInitName) + 'OBJECTS = %s/%s.o %s.o\n' % (self.OutputPath, 
> PcdValueInitName, os.path.join(self.OutputPath, PcdValueCommonName)) + \
> -                      'include
> $(MAKEROOT)/Makefiles/app.makefile\n' + 'INCLUDE +='
> +                      'include
> $(MAKEROOT)/Makefiles/app.makefile\n' + 'TOOL_INCLUDE +='
> 
>          IncSearchList = []
>          PlatformInc = OrderedDict()
> --
> 2.27.0.windows.1
> 









^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-09-30  1:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-16  1:03 [PATCH 1/1] BaseTools: Move C tool flags before the common flags gaoliming
2020-09-29  2:39 ` [edk2-devel] " Yuwei Chen
2020-09-29  7:50 ` Bob Feng
2020-09-30  0:57   ` 回复: " gaoliming
2020-09-30  1:16     ` [edk2-devel] " Bob Feng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox