public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Maurice Ma <maurice.ma@intel.com>
To: edk2-devel@lists.01.org
Cc: Maurice Ma <maurice.ma@intel.com>,
	Prince Agyeman <prince.agyeman@intel.com>
Subject: [PATCH] CorebootPayloadPkg DSC: Add build option to disable deprecated APIs
Date: Mon, 24 Oct 2016 14:38:02 -0700	[thread overview]
Message-ID: <f4790e48e8984ffe8af7a03c97733c07d6ca3986.1477345025.git.maurice.ma@intel.com> (raw)

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>
---
 CorebootModulePkg/CbSupportPei/CbSupportPei.c    | 3 ++-
 CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc    | 1 +
 CorebootPayloadPkg/CorebootPayloadPkgIa32X64.dsc | 1 +
 3 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/CorebootModulePkg/CbSupportPei/CbSupportPei.c b/CorebootModulePkg/CbSupportPei/CbSupportPei.c
index 366682b32d11..9d5803449e25 100755
--- a/CorebootModulePkg/CbSupportPei/CbSupportPei.c
+++ b/CorebootModulePkg/CbSupportPei/CbSupportPei.c
@@ -329,7 +329,8 @@ CbPeiEntryPoint (
   if ((CbParseGetCbHeader (1, &pCbHeader) == RETURN_SUCCESS)
     && ((UINTN)pCbHeader > BASE_4KB)) {
     DEBUG((EFI_D_ERROR, "Actual Coreboot header: %p.\n", pCbHeader));
-    PcdSet32 (PcdCbHeaderPointer, (UINT32)(UINTN)pCbHeader);
+    Status = PcdSet32S (PcdCbHeaderPointer, (UINT32)(UINTN)pCbHeader);
+    ASSERT_EFI_ERROR (Status);
   }
 
   //
diff --git a/CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc b/CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc
index 435743329674..3f053317abb0 100644
--- a/CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc
+++ b/CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc
@@ -83,6 +83,7 @@
   DEFINE SHELL_TYPE              = FULL_BIN
 
 [BuildOptions]
+  *_*_*_CC_FLAGS                 = /D DISABLE_NEW_DEPRECATED_INTERFACES
   GCC:*_UNIXGCC_*_CC_FLAGS       = -DMDEPKG_NDEBUG
   GCC:RELEASE_*_*_CC_FLAGS       = -DMDEPKG_NDEBUG
   INTEL:RELEASE_*_*_CC_FLAGS     = /D MDEPKG_NDEBUG
diff --git a/CorebootPayloadPkg/CorebootPayloadPkgIa32X64.dsc b/CorebootPayloadPkg/CorebootPayloadPkgIa32X64.dsc
index 3ddc81b457ce..763d1c53023a 100644
--- a/CorebootPayloadPkg/CorebootPayloadPkgIa32X64.dsc
+++ b/CorebootPayloadPkg/CorebootPayloadPkgIa32X64.dsc
@@ -83,6 +83,7 @@
   DEFINE SHELL_TYPE              = FULL_BIN
 
 [BuildOptions]
+  *_*_*_CC_FLAGS                 = /D DISABLE_NEW_DEPRECATED_INTERFACES
   GCC:DEBUG_*_*_CC_FLAGS         = -Og -flto
   GCC:DEBUG_*_*_DLINK_FLAGS      = -flto
   GCC:*_UNIXGCC_*_CC_FLAGS       = -DMDEPKG_NDEBUG
-- 
1.9.5.msysgit.0



                 reply	other threads:[~2016-10-24 21:38 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f4790e48e8984ffe8af7a03c97733c07d6ca3986.1477345025.git.maurice.ma@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox