CorebootPayloadPkg DSC: Add build option to disable deprecated APIs
authorMaurice Ma <maurice.ma@intel.com>
Mon, 24 Oct 2016 21:34:52 +0000 (14:34 -0700)
committerMaurice Ma <maurice.ma@intel.com>
Wed, 26 Oct 2016 21:56:34 +0000 (14:56 -0700)
Add the following definition in the [BuildOptions] section in package DSC
files to disable APIs that are deprecated. As a result replaced PcdSet32
with PcdSet32S accordingly to make the build pass.

[BuildOptions]
  *_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES

Cc: Prince Agyeman <prince.agyeman@intel.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=163
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
Reviewed-by: Prince Agyeman <prince.agyeman@intel.com>
CorebootModulePkg/CbSupportPei/CbSupportPei.c
CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc
CorebootPayloadPkg/CorebootPayloadPkgIa32X64.dsc

index 366682b..9d58034 100755 (executable)
@@ -329,7 +329,8 @@ CbPeiEntryPoint (
   if ((CbParseGetCbHeader (1, &pCbHeader) == RETURN_SUCCESS)\r
     && ((UINTN)pCbHeader > BASE_4KB)) {\r
     DEBUG((EFI_D_ERROR, "Actual Coreboot header: %p.\n", pCbHeader));\r
-    PcdSet32 (PcdCbHeaderPointer, (UINT32)(UINTN)pCbHeader);\r
+    Status = PcdSet32S (PcdCbHeaderPointer, (UINT32)(UINTN)pCbHeader);\r
+    ASSERT_EFI_ERROR (Status);\r
   }\r
 \r
   //\r
index 7a4ee2b..83b1f9a 100644 (file)
@@ -83,6 +83,7 @@
   DEFINE SHELL_TYPE              = FULL_BIN\r
 \r
 [BuildOptions]\r
+  *_*_*_CC_FLAGS                 = /D DISABLE_NEW_DEPRECATED_INTERFACES\r
   GCC:*_UNIXGCC_*_CC_FLAGS       = -DMDEPKG_NDEBUG\r
   GCC:RELEASE_*_*_CC_FLAGS       = -DMDEPKG_NDEBUG\r
   INTEL:RELEASE_*_*_CC_FLAGS     = /D MDEPKG_NDEBUG\r
index c49f05e..b0aec3d 100644 (file)
@@ -83,6 +83,7 @@
   DEFINE SHELL_TYPE              = FULL_BIN\r
 \r
 [BuildOptions]\r
+  *_*_*_CC_FLAGS                 = /D DISABLE_NEW_DEPRECATED_INTERFACES\r
   GCC:DEBUG_*_*_CC_FLAGS         = -Og -flto\r
   GCC:DEBUG_*_*_DLINK_FLAGS      = -flto\r
   GCC:*_UNIXGCC_*_CC_FLAGS       = -DMDEPKG_NDEBUG\r