diff options
Diffstat (limited to 'arch/xtensa/Makefile')
-rw-r--r-- | arch/xtensa/Makefile | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/arch/xtensa/Makefile b/arch/xtensa/Makefile index 3a3a4c66ef87..95f836db38fa 100644 --- a/arch/xtensa/Makefile +++ b/arch/xtensa/Makefile | |||
@@ -11,13 +11,13 @@ | |||
11 | # this architecture | 11 | # this architecture |
12 | 12 | ||
13 | # Core configuration. | 13 | # Core configuration. |
14 | # (Use CPU=<xtensa_config> to use another default compiler.) | 14 | # (Use VAR=<xtensa_config> to use another default compiler.) |
15 | 15 | ||
16 | cpu-$(CONFIG_XTENSA_CPU_LINUX_BE) := linux_be | 16 | variant-$(CONFIG_XTENSA_VARIANT_FSF) := fsf |
17 | cpu-$(CONFIG_XTENSA_CPU_LINUX_CUSTOM) := linux_custom | 17 | variant-$(CONFIG_XTENSA_VARIANT_LINUX_CUSTOM) := custom |
18 | 18 | ||
19 | CPU = $(cpu-y) | 19 | VARIANT = $(variant-y) |
20 | export CPU | 20 | export VARIANT |
21 | 21 | ||
22 | # Platform configuration | 22 | # Platform configuration |
23 | 23 | ||
@@ -27,8 +27,6 @@ platform-$(CONFIG_XTENSA_PLATFORM_ISS) := iss | |||
27 | PLATFORM = $(platform-y) | 27 | PLATFORM = $(platform-y) |
28 | export PLATFORM | 28 | export PLATFORM |
29 | 29 | ||
30 | CPPFLAGS += $(if $(KBUILD_SRC),-I$(srctree)/include/asm-xtensa/) | ||
31 | CPPFLAGS += -Iinclude/asm | ||
32 | CFLAGS += -pipe -mlongcalls | 30 | CFLAGS += -pipe -mlongcalls |
33 | 31 | ||
34 | KBUILD_DEFCONFIG := iss_defconfig | 32 | KBUILD_DEFCONFIG := iss_defconfig |
@@ -41,12 +39,12 @@ core-$(CONFIG_EMBEDDED_RAMDISK) += arch/xtensa/boot/ramdisk/ | |||
41 | 39 | ||
42 | # Test for cross compiling | 40 | # Test for cross compiling |
43 | 41 | ||
44 | ifneq ($(CPU),) | 42 | ifneq ($(VARIANT),) |
45 | COMPILE_ARCH = $(shell uname -m) | 43 | COMPILE_ARCH = $(shell uname -m) |
46 | 44 | ||
47 | ifneq ($(COMPILE_ARCH), xtensa) | 45 | ifneq ($(COMPILE_ARCH), xtensa) |
48 | ifndef CROSS_COMPILE | 46 | ifndef CROSS_COMPILE |
49 | CROSS_COMPILE = xtensa_$(CPU)- | 47 | CROSS_COMPILE = xtensa_$(VARIANT)- |
50 | endif | 48 | endif |
51 | endif | 49 | endif |
52 | endif | 50 | endif |
@@ -68,14 +66,13 @@ archinc := include/asm-xtensa | |||
68 | 66 | ||
69 | archprepare: $(archinc)/.platform | 67 | archprepare: $(archinc)/.platform |
70 | 68 | ||
71 | # Update machine cpu and platform symlinks if something which affects | 69 | # Update processor variant and platform symlinks if something which affects |
72 | # them changed. | 70 | # them changed. |
73 | 71 | ||
74 | $(archinc)/.platform: $(wildcard include/config/arch/*.h) include/config/auto.conf | 72 | $(archinc)/.platform: $(wildcard include/config/arch/*.h) include/config/auto.conf |
75 | @echo ' SYMLINK $(archinc)/xtensa/config -> $(archinc)/xtensa/config-$(CPU)' | 73 | @echo ' SYMLINK $(archinc)/variant -> $(archinc)/variant-$(VARIANT)' |
76 | $(Q)mkdir -p $(archinc) | 74 | $(Q)mkdir -p $(archinc) |
77 | $(Q)mkdir -p $(archinc)/xtensa | 75 | $(Q)ln -fsn $(srctree)/$(archinc)/variant-$(VARIANT) $(archinc)/variant |
78 | $(Q)ln -fsn $(srctree)/$(archinc)/xtensa/config-$(CPU) $(archinc)/xtensa/config | ||
79 | @echo ' SYMLINK $(archinc)/platform -> $(archinc)/platform-$(PLATFORM)' | 76 | @echo ' SYMLINK $(archinc)/platform -> $(archinc)/platform-$(PLATFORM)' |
80 | $(Q)ln -fsn $(srctree)/$(archinc)/platform-$(PLATFORM) $(archinc)/platform | 77 | $(Q)ln -fsn $(srctree)/$(archinc)/platform-$(PLATFORM) $(archinc)/platform |
81 | @touch $@ | 78 | @touch $@ |
@@ -89,7 +86,7 @@ zImage zImage.initrd: vmlinux | |||
89 | $(Q)$(MAKE) $(build)=$(boot) $@ | 86 | $(Q)$(MAKE) $(build)=$(boot) $@ |
90 | 87 | ||
91 | CLEAN_FILES += arch/xtensa/vmlinux.lds \ | 88 | CLEAN_FILES += arch/xtensa/vmlinux.lds \ |
92 | $(archinc)/platform $(archinc)/xtensa/config \ | 89 | $(archinc)/platform $(archinc)/variant \ |
93 | $(archinc)/.platform | 90 | $(archinc)/.platform |
94 | 91 | ||
95 | define archhelp | 92 | define archhelp |