blob: 207711a0fd0c3a63220675a3752b636a33f6e762 [file] [log] [blame]
Richard Kuoe95bf452011-10-31 18:55:58 -05001# Makefile for the Hexagon arch
2
3KBUILD_DEFCONFIG = comet_defconfig
4
5# Do not use GP-relative jumps
6KBUILD_CFLAGS += -G0
7LDFLAGS_vmlinux += -G0
8
9# Do not use single-byte enums; these will overflow.
10KBUILD_CFLAGS += -fno-short-enums
11
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
16CFLAGS_MODULE += -mlong-calls
17
Richard Kuo66b03db2012-03-27 17:37:33 -050018cflags-y += $(call cc-option,-mv${CONFIG_HEXAGON_ARCH_VERSION})
19aflags-y += $(call cc-option,-mv${CONFIG_HEXAGON_ARCH_VERSION})
20ldflags-y += $(call cc-option,-mv${CONFIG_HEXAGON_ARCH_VERSION})
Richard Kuoe95bf452011-10-31 18:55:58 -050021
22KBUILD_CFLAGS += $(cflags-y)
23KBUILD_AFLAGS += $(aflags-y)
24
25# no KBUILD_LDFLAGS?
26LDFLAGS += $(ldflags-y)
27
28# Thread-info register will be r19. This value is not configureable;
29# it is hard-coded in several files.
30TIR_NAME := r19
31KBUILD_CFLAGS += -ffixed-$(TIR_NAME) -DTHREADINFO_REG=$(TIR_NAME) -D__linux__
32KBUILD_AFLAGS += -DTHREADINFO_REG=$(TIR_NAME)
33
34LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
35libs-y += $(LIBGCC)
36
Thomas Gleixnere336e052012-05-03 09:02:54 +000037head-y := arch/hexagon/kernel/head.o
Richard Kuoe95bf452011-10-31 18:55:58 -050038
39core-y += arch/hexagon/kernel/ \
40 arch/hexagon/mm/ \
41 arch/hexagon/lib/