Skip to content

Commit

Permalink
LoongArch: Explicitly specify code model in Makefile
Browse files Browse the repository at this point in the history
commit e67e0eb 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: stable@vger.kernel.org
Tested-by: Haiyong Sun <sunhaiyong@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Huacai Chen authored and Greg Kroah-Hartman committed May 22, 2025
1 parent 9e80f36 commit 091a7f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/loongarch/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ endif

ifdef CONFIG_64BIT
ld-emul = $(64bit-emul)
cflags-y += -mabi=lp64s
cflags-y += -mabi=lp64s -mcmodel=normal
endif

cflags-y += -pipe -msoft-float
Expand Down

0 comments on commit 091a7f2

Please sign in to comment.