Skip to content

Commit

Permalink
LoongArch: Add Kconfig option AS_HAS_EXPLICIT_RELOCS
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Xi Ruoyao <[email protected]>
Signed-off-by: Huacai Chen <[email protected]>
  • Loading branch information
xry111 authored and chenhuacai committed Oct 11, 2022
1 parent 8364c82 commit 7ca8dfd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/loongarch/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 7ca8dfd

Please sign in to comment.