aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/tile/Makefile20
1 files changed, 11 insertions, 9 deletions
diff --git a/arch/tile/Makefile b/arch/tile/Makefile
index 07c4318c0629..fd8f6bb5face 100644
--- a/arch/tile/Makefile
+++ b/arch/tile/Makefile
@@ -8,20 +8,22 @@
8# for "archclean" and "archdep" for cleaning up and making dependencies for 8# for "archclean" and "archdep" for cleaning up and making dependencies for
9# this architecture 9# this architecture
10 10
11ifeq ($(CROSS_COMPILE),)
12# If building with TILERA_ROOT set (i.e. using the Tilera Multicore 11# If building with TILERA_ROOT set (i.e. using the Tilera Multicore
13# Development Environment) we can set CROSS_COMPILE based on that. 12# Development Environment) we can set CROSS_COMPILE based on that.
14ifdef TILERA_ROOT
15CROSS_COMPILE = $(TILERA_ROOT)/bin/tile-
16endif
17endif
18
19# If we're not cross-compiling, make sure we're on the right architecture. 13# If we're not cross-compiling, make sure we're on the right architecture.
14# Only bother to test for a few common targets, to avoid useless errors.
20ifeq ($(CROSS_COMPILE),) 15ifeq ($(CROSS_COMPILE),)
21HOST_ARCH = $(shell uname -m) 16 ifdef TILERA_ROOT
22ifneq ($(HOST_ARCH),$(ARCH)) 17 CROSS_COMPILE := $(TILERA_ROOT)/bin/tile-
18 else
19 goals := $(if $(MAKECMDGOALS), $(MAKECMDGOALS), all)
20 ifneq ($(strip $(filter vmlinux modules all,$(goals))),)
21 HOST_ARCH := $(shell uname -m)
22 ifneq ($(HOST_ARCH),$(ARCH))
23$(error Set TILERA_ROOT or CROSS_COMPILE when building $(ARCH) on $(HOST_ARCH)) 23$(error Set TILERA_ROOT or CROSS_COMPILE when building $(ARCH) on $(HOST_ARCH))
24endif 24 endif
25 endif
26 endif
25endif 27endif
26 28
27 29