Merge git://git.denx.de/u-boot-sunxi
[oweals/u-boot.git] / arch / arm / cpu / arm926ejs / Makefile
index 63fa159db6ad97c6d8d845f75013ae18b21429fc..0f730117c0e7821e8263c15ea9ecffdfbe3ed945 100644 (file)
@@ -20,3 +20,14 @@ obj-$(CONFIG_MX25) += mx25/
 obj-$(CONFIG_MX27) += mx27/
 obj-$(if $(filter mxs,$(SOC)),y) += mxs/
 obj-$(if $(filter spear,$(SOC)),y) += spear/
+
+# some files can only build in ARM or THUMB2, not THUMB1
+
+ifdef CONFIG_$(SPL_)SYS_THUMB_BUILD
+ifndef CONFIG_HAS_THUMB2
+
+CFLAGS_cpu.o := -marm
+CFLAGS_cache.o := -marm
+
+endif
+endif