Add -marm -fno-stack-protector to CFLAGS on ARM
authorLoïMinier <loic.minier@linaro.org>
Mon, 14 Mar 2011 07:31:36 +0000 (13:01 +0530)
committerAnand Gadiyar <gadiyar@ti.com>
Mon, 14 Mar 2011 08:22:28 +0000 (13:52 +0530)
The Linaro-based arm-linux-gnueabi cross-compiler in Ubuntu defaults to
Thumb 2 and enables the stack protector by default, both of which can
break x-loader at runtime (the former breaks the build).

Signed-off-by: LoïMinier <loic.minier@linaro.org>
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
config.mk

index f4c58e9..80bc0ad 100644 (file)
--- a/config.mk
+++ b/config.mk
@@ -148,6 +148,9 @@ CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes \
 else
 CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes
 endif
+ifeq ($(ARCH),arm)
+CFLAGS += -marm -fno-stack-protector
+endif
 
 AFLAGS_DEBUG := -Wa,-gstabs
 AFLAGS := $(AFLAGS_DEBUG) -D__ASSEMBLY__ $(CPPFLAGS)