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 c093d3e..d422115 100644
--- a/makefile
+++ b/makefile
@@ -58,11 +58,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
-ifneq ($(shell uname -m | grep "arm.*"),)
-  CFLAGS += -fno-stack-protector
-endif
+# setup toolchain prefix
+TOOLCHAIN_PREFIX ?= arm-eabi-
+CFLAGS += -fstack-protector-all
 CFLAGS += -fno-strict-overflow
 CPPFLAGS := -fno-exceptions -fno-rtti -fno-threadsafe-statics
 #CPPFLAGS += -Weffc++