aboutsummaryrefslogtreecommitdiffstats
path: root/arch/xtensa/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'arch/xtensa/Makefile')
-rw-r--r--arch/xtensa/Makefile34
1 files changed, 14 insertions, 20 deletions
diff --git a/arch/xtensa/Makefile b/arch/xtensa/Makefile
index f973754ddf90..bb5ba61723f7 100644
--- a/arch/xtensa/Makefile
+++ b/arch/xtensa/Makefile
@@ -21,6 +21,18 @@ variant-$(CONFIG_XTENSA_VARIANT_LINUX_CUSTOM) := custom
21VARIANT = $(variant-y) 21VARIANT = $(variant-y)
22export VARIANT 22export VARIANT
23 23
24# Test for cross compiling
25
26ifneq ($(VARIANT),)
27 COMPILE_ARCH = $(shell uname -m)
28
29 ifneq ($(COMPILE_ARCH), xtensa)
30 ifndef CROSS_COMPILE
31 CROSS_COMPILE = xtensa_$(VARIANT)-
32 endif
33 endif
34endif
35
24# Platform configuration 36# Platform configuration
25 37
26platform-$(CONFIG_XTENSA_PLATFORM_XT2000) := xt2000 38platform-$(CONFIG_XTENSA_PLATFORM_XT2000) := xt2000
@@ -31,7 +43,7 @@ PLATFORM = $(platform-y)
31export PLATFORM 43export PLATFORM
32 44
33# temporarily until string.h is fixed 45# temporarily until string.h is fixed
34KBUILD_CFLAGS += -ffreestanding 46KBUILD_CFLAGS += -ffreestanding -D__linux__
35 47
36KBUILD_CFLAGS += -pipe -mlongcalls 48KBUILD_CFLAGS += -pipe -mlongcalls
37 49
@@ -48,24 +60,6 @@ endif
48 60
49KBUILD_DEFCONFIG := iss_defconfig 61KBUILD_DEFCONFIG := iss_defconfig
50 62
51# ramdisk/initrd support
52# You need a compressed ramdisk image, named ramdisk.gz in
53# arch/xtensa/boot/ramdisk
54
55core-$(CONFIG_EMBEDDED_RAMDISK) += arch/xtensa/boot/ramdisk/
56
57# Test for cross compiling
58
59ifneq ($(VARIANT),)
60 COMPILE_ARCH = $(shell uname -m)
61
62 ifneq ($(COMPILE_ARCH), xtensa)
63 ifndef CROSS_COMPILE
64 CROSS_COMPILE = xtensa_$(VARIANT)-
65 endif
66 endif
67endif
68
69# Only build variant and/or platform if it includes a Makefile 63# Only build variant and/or platform if it includes a Makefile
70 64
71buildvar := $(shell test -e $(srctree)/arch/xtensa/variants/$(VARIANT)/Makefile && echo arch/xtensa/variants/$(VARIANT)/) 65buildvar := $(shell test -e $(srctree)/arch/xtensa/variants/$(VARIANT)/Makefile && echo arch/xtensa/variants/$(VARIANT)/)
@@ -87,7 +81,7 @@ all: zImage
87 81
88bzImage : zImage 82bzImage : zImage
89 83
90zImage zImage.initrd: vmlinux 84zImage: vmlinux
91 $(Q)$(MAKE) $(build)=$(boot) $@ 85 $(Q)$(MAKE) $(build)=$(boot) $@
92 86
93define archhelp 87define archhelp