diff options
author | 2022-10-12 16:36:08 +0800 | |
---|---|---|
committer | 2022-10-12 16:36:08 +0800 | |
commit | 0d8dad7048611e5ba02ae8519539ce4b8b1482d3 (patch) | |
tree | 6ccf248c67c7a279f97fe2e89eb7ac4b2f329437 | |
parent | LoongArch: Kconfig: Fix spelling mistake "delibrately" -> "deliberately" (diff) | |
download | linux-dev-0d8dad7048611e5ba02ae8519539ce4b8b1482d3.tar.xz linux-dev-0d8dad7048611e5ba02ae8519539ce4b8b1482d3.zip |
LoongArch: Add Kconfig option AS_HAS_EXPLICIT_RELOCS
GNU as >= 2.40 and GCC >= 13 will support using explicit relocation
hints in the assembly code, instead of la.* macros. The usage of
explicit relocation hints can improve code generation so it's enabled
by default by GCC >= 13.
Introduce a Kconfig option AS_HAS_EXPLICIT_RELOCS as the switch for
"use explicit relocation hints or not".
Tested-by: WANG Xuerui <git@xen0n.name>
Signed-off-by: Xi Ruoyao <xry111@xry111.site>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
-rw-r--r-- | arch/loongarch/Kconfig | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/loongarch/Kconfig b/arch/loongarch/Kconfig index f65c39eb3725..9aeecc83b480 100644 --- a/arch/loongarch/Kconfig +++ b/arch/loongarch/Kconfig @@ -195,6 +195,9 @@ config SCHED_OMIT_FRAME_POINTER bool default y +config AS_HAS_EXPLICIT_RELOCS + def_bool $(as-instr,x:pcalau12i \$t0$(comma)%pc_hi20(x)) + menu "Kernel type and options" source "kernel/Kconfig.hz" |