From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Tue, 30 Jun 2015 14:22:30 -0400 Subject: [U-Boot] [PATCH] powerpc/mpc85xx:Add GCC flag -fno-delete-null-pointer-checks In-Reply-To: References: <1430978853-10337-1-git-send-email-prabhakar@freescale.com> <555CC017.5040507@freescale.com> <1432143212.27761.85.camel@freescale.com> Message-ID: <20150630182230.GD28577@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tue, Jun 30, 2015 at 08:58:26AM -0600, Simon Glass wrote: > Hi, > > On 29 June 2015 at 22:18, Kushwaha Prabhakar wrote: > > Hi Simon, Tom, > > > > -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. It is also well documented in the GCC v4.9 release notes: > > https://gcc.gnu.org/gcc-4.9/porting_to.html > > > > There is possibility after moving to gcc-4.9 some platform may/may not work properly. > > I tested this patch for freescale powerpc platforms. > > But It may needs be taken care by all architecture like ARM, powerpc. If this is the case; this flag should be in top level Makefile (not sure) > > > > I suspect a top-level option would be best, perhaps near this one in Makefile: > > KBUILD_CFLAGS += $(call cc-option,-fno-stack-protector) I also agree with Scott and Simon, default, top level, using cc-option just like the Linux kernel please, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: