Skip to content

Commit 091a7f2

Browse files
chenhuacaigregkh
authored andcommitted
LoongArch: Explicitly specify code model in Makefile
commit e67e0eb6a98b261caf45048f9eb95fd7609289c0 upstream. LoongArch's toolchain may change the default code model from normal to medium. This is unnecessary for kernel, and generates some relocations which cannot be handled by the module loader. So explicitly specify the code model to normal in Makefile (for Rust 'normal' is 'small'). Cc: [email protected] Tested-by: Haiyong Sun <[email protected]> Signed-off-by: Huacai Chen <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 9e80f36 commit 091a7f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/loongarch/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ endif
3838

3939
ifdef CONFIG_64BIT
4040
ld-emul = $(64bit-emul)
41-
cflags-y += -mabi=lp64s
41+
cflags-y += -mabi=lp64s -mcmodel=normal
4242
endif
4343

4444
cflags-y += -pipe -msoft-float

0 commit comments

Comments
 (0)