diff options
author | WANG Rui <wangrui@loongson.cn> | 2024-01-17 07:43:00 +0300 |
---|---|---|
committer | Huacai Chen <chenhuacai@loongson.cn> | 2024-01-17 07:43:00 +0300 |
commit | 90868ff9cadecd46fa2a4f5501c66bfea8ade9b7 (patch) | |
tree | 7557db8f2a52fbdbe29073b101340e23a44c7025 /arch/loongarch/Makefile | |
parent | f58b0abae839f06be9d791d16196922a4b281777 (diff) | |
download | linux-90868ff9cadecd46fa2a4f5501c66bfea8ade9b7.tar.xz |
LoongArch: Enable initial Rust support
Enable initial Rust support for LoongArch.
Tested-by: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: WANG Rui <wangrui@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'arch/loongarch/Makefile')
-rw-r--r-- | arch/loongarch/Makefile | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/loongarch/Makefile b/arch/loongarch/Makefile index 4ba8d67ddb09..ba45cb7b621c 100644 --- a/arch/loongarch/Makefile +++ b/arch/loongarch/Makefile @@ -81,8 +81,11 @@ KBUILD_AFLAGS_MODULE += -Wa,-mla-global-with-abs KBUILD_CFLAGS_MODULE += -fplt -Wa,-mla-global-with-abs,-mla-local-with-abs endif +KBUILD_RUSTFLAGS_MODULE += -Crelocation-model=pic + ifeq ($(CONFIG_RELOCATABLE),y) KBUILD_CFLAGS_KERNEL += -fPIE +KBUILD_RUSTFLAGS_KERNEL += -Crelocation-model=pie LDFLAGS_vmlinux += -static -pie --no-dynamic-linker -z notext $(call ld-option, --apply-dynamic-relocs) endif |