Commit 0d8dad70 authored by Xi Ruoyao's avatar Xi Ruoyao Committed by Huacai Chen
Browse files

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: default avatarWANG Xuerui <git@xen0n.name>
Signed-off-by: default avatarXi Ruoyao <xry111@xry111.site>
Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
parent 9550dfde
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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"