public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: York Sun <yorksun@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] powerpc/mpc85xx:Add GCC flag -fno-delete-null-pointer-checks
Date: Wed, 20 May 2015 10:10:47 -0700	[thread overview]
Message-ID: <555CC017.5040507@freescale.com> (raw)
In-Reply-To: <1430978853-10337-1-git-send-email-prabhakar@freescale.com>

Scott,

Please comment on this patch.

York

On 05/06/2015 11:07 PM, Prabhakar Kushwaha wrote:
>  -fdelete-null-pointer-checks flag controls global dataflow analyses and
>  eliminate useless checks for null pointers; It assume that if a pointer is
>  checked after it has already been dereferenced, it cannot be null.
>  This flag is enabled by default.
> 
>  gcc v4.9 has more optimizations added to this option. Hence it is very
>  aggressive with GCC v4.9 series. Add -fno-delete-null-pointer-checks to
>  disable the optimization
> 
> Signed-off-by: Rohit Dharmakan <rohitarulraj@freescale.com>
> Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
> ---
>  arch/powerpc/cpu/mpc85xx/config.mk | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/powerpc/cpu/mpc85xx/config.mk b/arch/powerpc/cpu/mpc85xx/config.mk
> index 72c964c..2aedd24 100644
> --- a/arch/powerpc/cpu/mpc85xx/config.mk
> +++ b/arch/powerpc/cpu/mpc85xx/config.mk
> @@ -5,7 +5,8 @@
>  # SPDX-License-Identifier:	GPL-2.0+
>  #
>  
> -PLATFORM_CPPFLAGS += -Wa,-me500 -msoft-float -mno-string
> +PLATFORM_CPPFLAGS += -Wa,-me500 -msoft-float -mno-string \
> +					-fno-delete-null-pointer-checks
>  
>  # -mspe=yes is needed to have -mno-spe accepted by a buggy GCC;
>  # see "[PATCH,rs6000] make -mno-spe work as expected" on
> 

  reply	other threads:[~2015-05-20 17:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-07  6:07 [U-Boot] [PATCH] powerpc/mpc85xx:Add GCC flag -fno-delete-null-pointer-checks Prabhakar Kushwaha
2015-05-20 17:10 ` York Sun [this message]
2015-05-20 17:33   ` Scott Wood
2015-06-30  4:18     ` Kushwaha Prabhakar
2015-06-30 14:58       ` Simon Glass
2015-06-30 18:22         ` Tom Rini
2015-07-01  3:10         ` Kushwaha Prabhakar

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-all 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=555CC017.5040507@freescale.com \
    --to=yorksun@freescale.com \
    --cc=u-boot@lists.denx.de \
    /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