summaryrefslogtreecommitdiffstats
path: root/arch/arc/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arc/Makefile')
-rw-r--r--arch/arc/Makefile9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arc/Makefile b/arch/arc/Makefile
index 29b5fcd9c4b6..5c98fc19d99d 100644
--- a/arch/arc/Makefile
+++ b/arch/arc/Makefile
@@ -20,6 +20,15 @@ export PLATFORM
cflags-y += -Iarch/arc/plat-$(PLATFORM)/include
cflags-y += -mA7 -fno-common -pipe -fno-builtin -D__linux__
+ifdef CONFIG_ARC_CURR_IN_REG
+# For a global register defintion, make sure it gets passed to every file
+# We had a customer reported bug where some code built in kernel was NOT using
+# any kernel headers, and missing the r25 global register
+# Can't do unconditionally (like above) because of recursive include issues
+# due to <linux/thread_info.h>
+LINUXINCLUDE += -include ${src}/arch/arc/include/asm/current.h
+endif
+
atleast_gcc44 := $(call cc-ifversion, -gt, 0402, y)
cflags-$(atleast_gcc44) += -fsection-anchors