Commit | Line | Data |
---|---|---|
8e1a6dd2 CZ |
1 | # |
2 | # This file is subject to the terms and conditions of the GNU General Public | |
3 | # License. See the file "COPYING" in the main directory of this archive | |
4 | # for more details. | |
5 | # | |
6 | # Copyright (C) 2001 - 2005 Tensilica Inc. | |
420ae951 | 7 | # Copyright (C) 2014 Cadence Design Systems Inc. |
8e1a6dd2 CZ |
8 | # |
9 | # This file is included by the global makefile so that you can add your own | |
8212f898 | 10 | # architecture-specific flags and dependencies. |
8e1a6dd2 CZ |
11 | |
12 | # Core configuration. | |
173d6681 | 13 | # (Use VAR=<xtensa_config> to use another default compiler.) |
8e1a6dd2 | 14 | |
129ab0d2 | 15 | variant-y := $(CONFIG_XTENSA_VARIANT_NAME) |
8e1a6dd2 | 16 | |
173d6681 | 17 | VARIANT = $(variant-y) |
8e1a6dd2 | 18 | |
70cefe76 | 19 | ifneq ($(VARIANT),) |
23243c1a | 20 | ifdef cross_compiling |
70cefe76 GU |
21 | ifndef CROSS_COMPILE |
22 | CROSS_COMPILE = xtensa_$(VARIANT)- | |
23 | endif | |
24 | endif | |
25 | endif | |
26 | ||
8e1a6dd2 CZ |
27 | # Platform configuration |
28 | ||
8e1a6dd2 CZ |
29 | platform-$(CONFIG_XTENSA_PLATFORM_XT2000) := xt2000 |
30 | platform-$(CONFIG_XTENSA_PLATFORM_ISS) := iss | |
0d456bad | 31 | platform-$(CONFIG_XTENSA_PLATFORM_XTFPGA) := xtfpga |
8e1a6dd2 | 32 | |
b2444d34 | 33 | # temporarily until string.h is fixed |
a753cd9a | 34 | KBUILD_CFLAGS += -ffreestanding -D__linux__ |
f8f02ca7 | 35 | KBUILD_CFLAGS += -pipe -mlongcalls -mtext-section-literals |
cf1c0aaf | 36 | KBUILD_CFLAGS += $(call cc-option,-mforce-no-pic,) |
7bf5234d | 37 | KBUILD_CFLAGS += $(call cc-option,-mno-serialize-volatile,) |
c20e1117 MF |
38 | ifneq ($(CONFIG_KERNEL_ABI_CALL0),) |
39 | KBUILD_CFLAGS += -mabi=call0 | |
40 | KBUILD_AFLAGS += -mabi=call0 | |
41 | endif | |
cf1c0aaf | 42 | |
f8f02ca7 MF |
43 | KBUILD_AFLAGS += -mlongcalls -mtext-section-literals |
44 | ||
65501622 | 45 | ifneq ($(CONFIG_LD_NO_RELAX),) |
d503ac53 | 46 | KBUILD_LDFLAGS := --no-relax |
65501622 CZ |
47 | endif |
48 | ||
c425c546 | 49 | CHECKFLAGS += -D$(if $(CONFIG_CPU_BIG_ENDIAN),__XTENSA_EB__,__XTENSA_EL__) |
72100ed7 | 50 | |
367b8112 CZ |
51 | vardirs := $(patsubst %,arch/xtensa/variants/%/,$(variant-y)) |
52 | plfdirs := $(patsubst %,arch/xtensa/platforms/%/,$(platform-y)) | |
53 | ||
367b8112 | 54 | KBUILD_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(vardirs) $(plfdirs)) |
367b8112 | 55 | |
e7d163f7 | 56 | KBUILD_DEFCONFIG := iss_defconfig |
8e1a6dd2 | 57 | |
19c5699f | 58 | libs-y += arch/xtensa/lib/ |
8e1a6dd2 | 59 | |
e7d163f7 CZ |
60 | boot := arch/xtensa/boot |
61 | ||
7af710d9 | 62 | all Image zImage uImage xipImage: vmlinux |
8e1a6dd2 CZ |
63 | $(Q)$(MAKE) $(build)=$(boot) $@ |
64 | ||
5eacadb5 FK |
65 | archheaders: |
66 | $(Q)$(MAKE) $(build)=arch/xtensa/kernel/syscalls all | |
67 | ||
8e1a6dd2 | 68 | define archhelp |
9a736fcb | 69 | @echo '* Image - Kernel ELF image with reset vector' |
8e1a6dd2 | 70 | @echo '* zImage - Compressed kernel image (arch/xtensa/boot/images/zImage.*)' |
9a736fcb | 71 | @echo '* uImage - U-Boot wrapped image' |
7af710d9 | 72 | @echo ' xipImage - XIP image' |
8e1a6dd2 | 73 | endef |