Linux 3.17-rc2
[linux/fpc-iii.git] / arch / hexagon / Makefile
blob207711a0fd0c3a63220675a3752b636a33f6e762
1 # Makefile for the Hexagon arch
3 KBUILD_DEFCONFIG = comet_defconfig
5 # Do not use GP-relative jumps
6 KBUILD_CFLAGS += -G0
7 LDFLAGS_vmlinux += -G0
9 # Do not use single-byte enums; these will overflow.
10 KBUILD_CFLAGS += -fno-short-enums
12 # Modules must use either long-calls, or use pic/plt.
13 # Use long-calls for now, it's easier. And faster.
14 # CFLAGS_MODULE += -fPIC
15 # LDFLAGS_MODULE += -shared
16 CFLAGS_MODULE += -mlong-calls
18 cflags-y += $(call cc-option,-mv${CONFIG_HEXAGON_ARCH_VERSION})
19 aflags-y += $(call cc-option,-mv${CONFIG_HEXAGON_ARCH_VERSION})
20 ldflags-y += $(call cc-option,-mv${CONFIG_HEXAGON_ARCH_VERSION})
22 KBUILD_CFLAGS += $(cflags-y)
23 KBUILD_AFLAGS += $(aflags-y)
25 # no KBUILD_LDFLAGS?
26 LDFLAGS += $(ldflags-y)
28 # Thread-info register will be r19. This value is not configureable;
29 # it is hard-coded in several files.
30 TIR_NAME := r19
31 KBUILD_CFLAGS += -ffixed-$(TIR_NAME) -DTHREADINFO_REG=$(TIR_NAME) -D__linux__
32 KBUILD_AFLAGS += -DTHREADINFO_REG=$(TIR_NAME)
34 LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
35 libs-y += $(LIBGCC)
37 head-y := arch/hexagon/kernel/head.o
39 core-y += arch/hexagon/kernel/ \
40 arch/hexagon/mm/ \
41 arch/hexagon/lib/