Makefile 1.1 KB

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