Back to home page

LXR

 
 

    


0001 #  Makefile for the Hexagon arch
0002 
0003 KBUILD_DEFCONFIG = comet_defconfig
0004 
0005 # Do not use GP-relative jumps
0006 KBUILD_CFLAGS += -G0
0007 LDFLAGS_vmlinux += -G0
0008 
0009 # Do not use single-byte enums; these will overflow.
0010 KBUILD_CFLAGS += -fno-short-enums
0011 
0012 # Modules must use either long-calls, or use pic/plt.
0013 # Use long-calls for now, it's easier.  And faster.
0014 # CFLAGS_MODULE += -fPIC
0015 # LDFLAGS_MODULE += -shared
0016 CFLAGS_MODULE += -mlong-calls
0017 
0018 cflags-y += $(call cc-option,-mv${CONFIG_HEXAGON_ARCH_VERSION})
0019 aflags-y += $(call cc-option,-mv${CONFIG_HEXAGON_ARCH_VERSION})
0020 ldflags-y += $(call cc-option,-mv${CONFIG_HEXAGON_ARCH_VERSION})
0021 
0022 KBUILD_CFLAGS += $(cflags-y)
0023 KBUILD_AFLAGS += $(aflags-y)
0024 
0025 #  no KBUILD_LDFLAGS?
0026 LDFLAGS += $(ldflags-y)
0027 
0028 # Thread-info register will be r19.  This value is not configureable;
0029 # it is hard-coded in several files.
0030 TIR_NAME := r19
0031 KBUILD_CFLAGS += -ffixed-$(TIR_NAME) -DTHREADINFO_REG=$(TIR_NAME) -D__linux__
0032 KBUILD_AFLAGS += -DTHREADINFO_REG=$(TIR_NAME)
0033 
0034 LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
0035 libs-y += $(LIBGCC)
0036 
0037 head-y := arch/hexagon/kernel/head.o
0038 
0039 core-y += arch/hexagon/kernel/ \
0040         arch/hexagon/mm/ \
0041         arch/hexagon/lib/