From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 772111A1E3A for ; Mon, 24 Oct 2016 14:38:10 -0700 (PDT) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP; 24 Oct 2016 14:38:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,543,1473145200"; d="scan'208";a="777072446" Received: from mxma-desk2.amr.corp.intel.com ([134.134.155.154]) by FMSMGA003.fm.intel.com with ESMTP; 24 Oct 2016 14:38:10 -0700 From: Maurice Ma To: edk2-devel@lists.01.org Cc: Maurice Ma , Prince Agyeman Date: Mon, 24 Oct 2016 14:38:02 -0700 Message-Id: X-Mailer: git-send-email 1.9.5.msysgit.0 Subject: [PATCH] CorebootPayloadPkg DSC: Add build option to disable deprecated APIs X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2016 21:38:10 -0000 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 Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=163 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Maurice Ma --- 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