summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorHuacai Chen <chenhuacai@loongson.cn>2024-11-22 15:47:47 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-05-22 14:12:25 +0200
commit6133444518b7abc53304ea4d5c636bfe029061be (patch)
treeaf0d42a28b35930b4ea17c6ce5f2466703517002 /arch
parentf521c2a0c0c4585f36d912bf62c852b88682c4f2 (diff)
downloadlinux-6133444518b7abc53304ea4d5c636bfe029061be.tar.gz
linux-6133444518b7abc53304ea4d5c636bfe029061be.tar.bz2
linux-6133444518b7abc53304ea4d5c636bfe029061be.zip
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: 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>
Diffstat (limited to 'arch')
-rw-r--r--arch/loongarch/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/loongarch/Makefile b/arch/loongarch/Makefile
index 81e8089c9c4f..9c6aff9376ec 100644
--- a/arch/loongarch/Makefile
+++ b/arch/loongarch/Makefile
@@ -43,7 +43,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