File Index
Files and directories
Sign in
FILE

Makefile

File preview with syntax highlighting.

linux-6.19.14/arch/hexagon/Makefile MAKEFILE
 1# SPDX-License-Identifier: GPL-2.0
 2#  Makefile for the Hexagon arch
 3
 4KBUILD_DEFCONFIG = comet_defconfig
 5
 6# Do not use GP-relative jumps
 7KBUILD_CFLAGS += -G0
 8LDFLAGS_vmlinux += -G0
 9
10# Do not use single-byte enums; these will overflow.
11KBUILD_CFLAGS += -fno-short-enums
12
13# We must use long-calls:
14KBUILD_CFLAGS += -mlong-calls
15
16# Modules must use either long-calls, or use pic/plt.
17# Use long-calls for now, it's easier.  And faster.
18# KBUILD_CFLAGS_MODULE += -fPIC
19# KBUILD_LDFLAGS_MODULE += -shared
20KBUILD_CFLAGS_MODULE += -mlong-calls
21
22cflags-y += $(call cc-option,-mv${CONFIG_HEXAGON_ARCH_VERSION})
23aflags-y += $(call cc-option,-mv${CONFIG_HEXAGON_ARCH_VERSION})
24ldflags-y += $(call cc-option,-mv${CONFIG_HEXAGON_ARCH_VERSION})
25
26KBUILD_CFLAGS += $(cflags-y)
27KBUILD_AFLAGS += $(aflags-y)
28KBUILD_LDFLAGS += $(ldflags-y)
29
30# Thread-info register will be r19.  This value is not configureable;
31# it is hard-coded in several files.
32TIR_NAME := r19
33KBUILD_CFLAGS += -ffixed-$(TIR_NAME) -DTHREADINFO_REG=$(TIR_NAME) -D__linux__
34KBUILD_AFLAGS += -DTHREADINFO_REG=$(TIR_NAME)
35
36# Disable HexagonConstExtenders pass for LLVM versions prior to 19.1.0
37# https://github.com/llvm/llvm-project/issues/99714
38ifneq ($(call clang-min-version, 190100),y)
39KBUILD_CFLAGS += -mllvm -hexagon-cext=false
40endif
~/ Read-only file preview.