summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrabhakar Kushwaha <prabhakar@freescale.com>2015-07-02 12:00:17 +0530
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2015-12-15 13:41:56 +0100
commita76377388ed74c69a9e0c129d31cb953b34ebbc5 (patch)
tree00b4d66a862dbe341cffcd629678444e305c3fc4
parent1ef4a29e8cea0239411dde64f9617ad76248fd02 (diff)
Makefile:Add GCC flag -fno-delete-null-pointer-checks
-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> (cherry picked from commit 687a7518a1b1e40e005711603dcb14e0f6942d6d) Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
-rw-r--r--Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 645499d179..ef54b023ff 100644
--- a/Makefile
+++ b/Makefile
@@ -565,6 +565,7 @@ KBUILD_CFLAGS += -DBUILD_TAG='"$(BUILD_TAG)"'
endif
KBUILD_CFLAGS += $(call cc-option,-fno-stack-protector)
+KBUILD_CFLAGS += $(call cc-option,-fno-delete-null-pointer-checks)
KBUILD_CFLAGS += -g
# $(KBUILD_AFLAGS) sets -g, which causes gcc to pass a suitable -g<format>