public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Leif Lindholm" <leif@nuviainc.com>
To: Pankaj Bansal <pankaj.bansal@oss.nxp.com>
Cc: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>,
	Michael D Kinney <michael.d.kinney@intel.com>,
	devel@edk2.groups.io, Varun Sethi <V.Sethi@nxp.com>,
	Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>,
	Jon Nettleton <jon@solid-run.com>,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>
Subject: Re: [PATCH edk2-platforms v2 3/9] Silicon/NXP: Use edk2 recommended compilation flags
Date: Thu, 28 May 2020 15:48:12 +0100	[thread overview]
Message-ID: <20200528144812.GF1923@vanye> (raw)
In-Reply-To: <20200527085135.16717-4-pankaj.bansal@oss.nxp.com>

On Wed, May 27, 2020 at 14:21:29 +0530, Pankaj Bansal wrote:
> From: Pankaj Bansal <pankaj.bansal@nxp.com>
> 
> edk2 recommends to use MDEPKG_NDEBUG for release builds and to use
> DISABLE_NEW_DEPRECATED_INTERFACES for all new platforms.
> 
> Therefore, enable these flags for NXP platforms as well
> 
> Signed-off-by: Pankaj Bansal <pankaj.bansal@nxp.com>

Unfortunately, this patch now causes the RELEASE build to fail with

/work/git/edk2-platforms/Silicon/NXP/Library/PciHostBridgeLib/PciHostBridgeLib.c:172:9:
error: ‘mPciHostBridgeLibAcpiAddressSpaceTypeStr’ defined but not used [-Werror=unused-variable]
 CHAR16 *mPciHostBridgeLibAcpiAddressSpaceTypeStr[] = {
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This was caused by 5068692c82b7a
("Silicon/NXP: Implement PciHostBridgeLib support") being merged
between v1 and v2.

So we need another patch that does

--- a/Silicon/NXP/Library/PciHostBridgeLib/PciHostBridgeLib.c
+++ b/Silicon/NXP/Library/PciHostBridgeLib/PciHostBridgeLib.c
@@ -167,11 +167,13 @@ STATIC CONST EFI_PCI_ROOT_BRIDGE_DEVICE_PATH
mEfiPciRootBridgeDevicePath[] = {
   }
    };

+#ifndef MDEPKG_NDEBUG
 STATIC
 GLOBAL_REMOVE_IF_UNREFERENCED
 CHAR16 *mPciHostBridgeLibAcpiAddressSpaceTypeStr[] = {
   L"Mem", L"I/O", L"Bus"
 };
+#endif

preceding this one.

Best Regards,

Leif

> ---
> 
> Notes:
>     V2:
>     - No change
> 
>  Silicon/NXP/NxpQoriqLs.dsc.inc | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/Silicon/NXP/NxpQoriqLs.dsc.inc b/Silicon/NXP/NxpQoriqLs.dsc.inc
> index 12e2b89fac58..ee639d552483 100644
> --- a/Silicon/NXP/NxpQoriqLs.dsc.inc
> +++ b/Silicon/NXP/NxpQoriqLs.dsc.inc
> @@ -173,7 +173,12 @@
>    NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
>  
>  [BuildOptions]
> -  RVCT:*_*_ARM_PLATFORM_FLAGS == --cpu cortex-a9
> +  GCC:RELEASE_*_*_CC_FLAGS  = -DMDEPKG_NDEBUG
> +
> +  #
> +  # Disable deprecated APIs.
> +  #
> +  GCC:*_*_*_CC_FLAGS = -DDISABLE_NEW_DEPRECATED_INTERFACES
>  
>  [BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER]
>    GCC:*_*_ARM_DLINK_FLAGS = -z common-page-size=0x1000
> -- 
> 2.17.1
> 

  reply	other threads:[~2020-05-28 14:48 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-27  8:51 [PATCH edk2-platforms v2 0/9] Add LX2160ARDB Platform Pankaj Bansal
2020-05-27  8:51 ` [PATCH edk2-platforms v2 1/9] Silicon/NXP: Use Metronome implementation from MdeModulePkg Pankaj Bansal
2020-05-27  8:51 ` [PATCH edk2-platforms v2 2/9] Platform/NXP: Use Monotonic counter " Pankaj Bansal
2020-05-27  8:51 ` [PATCH edk2-platforms v2 3/9] Silicon/NXP: Use edk2 recommended compilation flags Pankaj Bansal
2020-05-28 14:48   ` Leif Lindholm [this message]
2020-05-27  8:51 ` [PATCH edk2-platforms v2 4/9] Platform/NXP/LX2160ARDB: Add ArmPlatformLib Pankaj Bansal
2020-05-27  8:51 ` [PATCH edk2-platforms v2 5/9] Silicon/NXP: Implement PL011UartClockLib for NXP platforms Pankaj Bansal
2020-05-27  8:51 ` [PATCH edk2-platforms v2 6/9] Silicon/NXP: Add Chassis3V2 Package Pankaj Bansal
2020-05-27  8:51 ` [PATCH edk2-platforms v2 7/9] Silicon/NXP: Add LX2160A Soc package Pankaj Bansal
2020-05-27  8:51 ` [PATCH edk2-platforms v2 8/9] Platform/NXP: Add LX2160ARDB Platform Pankaj Bansal
2020-05-28 15:00   ` Leif Lindholm
2020-05-29  5:21     ` Pankaj Bansal
2020-05-29 11:49       ` Leif Lindholm
2020-05-29 12:25         ` Pankaj Bansal
2020-05-29 14:03           ` Leif Lindholm
2020-05-30 12:19             ` Pankaj Bansal
2020-05-27  8:51 ` [PATCH edk2-platforms v2 9/9] Platform/NXP/LX2160aRdbPkg: Add VarStore Pankaj Bansal
2020-05-28 14:58 ` [PATCH edk2-platforms v2 0/9] Add LX2160ARDB Platform Leif Lindholm

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=20200528144812.GF1923@vanye \
    --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