Use -fno-delete-null-pointer-checks for optimized build
[oweals/u-boot_mod.git] / u-boot / config.mk
index 2199e1a1b56906ada84f26718892346d511f4356..4b9a4773ca9d3bf84e9586a22d590875bc911be5 100644 (file)
@@ -118,8 +118,8 @@ ifdef COMPRESSED_UBOOT
 endif
 
 ifeq ($(BUILD_OPTIMIZED),y)
-  CFLAGS += -Os -fno-reorder-functions
-  CPPFLAGS += -Os -fno-reorder-functions
+  CFLAGS += -Os -fno-reorder-functions -fno-delete-null-pointer-checks
+  CPPFLAGS += -Os -fno-reorder-functions -fno-delete-null-pointer-checks
 endif
 
 AFLAGS_DEBUG :=