rk: fix -fstack-protector support when build zImage
author黄涛 <huangtao@rock-chips.com>
Fri, 22 Nov 2013 10:49:13 +0000 (18:49 +0800)
committer黄涛 <huangtao@rock-chips.com>
Fri, 22 Nov 2013 10:49:13 +0000 (18:49 +0800)
arch/arm/boot/compressed/Makefile

index 120b83bfde20e5b8f3d46b4f13ff4c82ef75a471..e6779a2e3884af81969f0053b0581b5f9c2d228d 100644 (file)
@@ -124,6 +124,11 @@ ORIG_CFLAGS := $(KBUILD_CFLAGS)
 KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS))
 endif
 
+ifeq ($(CONFIG_CC_STACKPROTECTOR),y)
+ORIG_CFLAGS := $(KBUILD_CFLAGS)
+KBUILD_CFLAGS = $(subst -fstack-protector, , $(ORIG_CFLAGS))
+endif
+
 ccflags-y := -fpic -mno-single-pic-base -fno-builtin -I$(obj)
 asflags-y := -DZIMAGE