audk/BaseTools/Source/Python
Michael D Kinney b47fe2655d BaseTools/DscBuildData: Fix PCD autogen include file conflict
https://bugzilla.tianocore.org/show_bug.cgi?id=2494

When using structured PCDs, a C application is auto generated
to fill in the structured PCD value.  The C application uses
the standard include files <stdio.h>, <stdlib.h>, and <string.h>.
This C application also supports include paths from package DEC
files when a structured PCD declaration provides a <Packages>
list.  The complete list of include paths are -I options for
include paths from package DEC files and the compiler's standard
include paths.

-I include paths are higher priority than the standard include
paths.  If the -I included paths from package DEC files contain
<stdio.h>, <stdlib.h>, or <string.h> the wrong include files are
used to compile the C application for the structured PCD value.

Update GenerateByteArrayValue() to skip a package DEC include
paths that contain <stdio.h>, <stdlib.h>, or <string.h>.

Build failures were observed when adding a structured PCD to
CryptoPkg.  CryptoPkg contains <stdio.h>, <stdlib.h>, and
<string.h> in the path CryptoPkg/Library/Include to support
building Open SSL.  The Library/Include path is listed as a
private include path in CryptoPkg.dec.  Without this change, the
standard include files designed to support build OpenSLL are
used to build the structured PCD C application, and that build
fails.

Other packages that provide a standard C lib or a gasket for
a subset of the standard C lib will run into this same issue
if they also define and use a Structured PCD.  So this issue
is not limited to the CryptoPkg.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2020-02-04 20:46:22 +00:00
..
AutoGen BaseTools: Fixed a incremental build bug 2020-01-19 07:46:18 +00:00
BPDG BaseTools: Fix various typos 2019-07-08 08:59:29 +08:00
Capsule BaseTools/Capsule: Add capsule dependency support 2020-01-15 03:16:46 +00:00
Common BaseTools/Capsule: Add capsule dependency support 2020-01-15 03:16:46 +00:00
CommonDataClass BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
Ecc BaseTools:Change the case rules for ECC check pointer names 2020-01-13 02:08:46 +00:00
Eot BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
GenFds BaseTools:Fix GenFds issue for BuildOption replace GenFdsOption 2020-01-13 02:08:46 +00:00
GenPatchPcdTable BaseTools: Add map file parsing support for CLANG9 2019-11-08 08:29:36 +08:00
PatchPcdValue BaseTools: Decouple AutoGen Objects 2019-08-09 23:15:52 +08:00
Pkcs7Sign BaseTools:Updata the output encoding of the Popen function 2019-08-01 15:36:48 +08:00
Rsa2048Sha256Sign BaseTools:Updata the output encoding of the Popen function 2019-08-01 15:36:48 +08:00
Table BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
TargetTool BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
Trim BaseTools: Generate dependent files for ASL and ASM files 2019-12-10 01:31:55 +00:00
UPT BaseTools: Fix various typos 2019-07-08 08:59:29 +08:00
Workspace BaseTools/DscBuildData: Fix PCD autogen include file conflict 2020-02-04 20:46:22 +00:00
build BaseTools: Fixed a incremental build bug 2020-01-19 07:46:18 +00:00
GNUmakefile BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
Makefile BaseTools: strip trailing whitespace 2019-10-04 11:18:22 +01:00
basetool_tiano_python_path_env.yaml BaseTools: Add YAML files with path env and tool extdeps 2019-11-11 13:01:53 -08:00
sitecustomize.py BaseTools: Do not call sys.setdefaultencoding with python 3 2019-10-23 14:25:23 +08:00