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>
else
CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes
endif
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)
AFLAGS_DEBUG := -Wa,-gstabs
AFLAGS := $(AFLAGS_DEBUG) -D__ASSEMBLY__ $(CPPFLAGS)