lib: debug: add common stack protection feature in lk

-fstack-protector is added in lk and corresponding
__stack_chk_fail function and __stack_chk_guard.

CRs-Fixed: 671500
Change-Id: I2ac186affa311005c4d727c8cd00a93c8f5014c9
diff --git a/makefile b/makefile
index f6f9061..40cb9f0 100644
--- a/makefile
+++ b/makefile
@@ -60,13 +60,9 @@
   CFLAGS += -D_SIGNED_KERNEL=1
 endif
 
-# When the host arch is ARM, ensure stack protection code is not emitted since
-# it's not supported by the bootloader's libc
 # setup toolchain prefix
 TOOLCHAIN_PREFIX ?= arm-eabi-
-ifneq ($(shell uname -m | grep "arm.*"),)
-  CFLAGS += -fno-stack-protector
-endif
+CFLAGS += -fstack-protector-all
 CPPFLAGS := -fno-exceptions -fno-rtti -fno-threadsafe-statics
 #CPPFLAGS += -Weffc++
 ASMFLAGS := -DASSEMBLY