projects
/
linux-2.6-microblaze.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
riscv: Use -mno-relax when using lld linker
[linux-2.6-microblaze.git]
/
arch
/
riscv
/
Makefile
diff --git
a/arch/riscv/Makefile
b/arch/riscv/Makefile
index
3eb9590
..
4be0206
100644
(file)
--- a/
arch/riscv/Makefile
+++ b/
arch/riscv/Makefile
@@
-38,6
+38,15
@@
else
KBUILD_LDFLAGS += -melf32lriscv
endif
KBUILD_LDFLAGS += -melf32lriscv
endif
+ifeq ($(CONFIG_LD_IS_LLD),y)
+ KBUILD_CFLAGS += -mno-relax
+ KBUILD_AFLAGS += -mno-relax
+ifneq ($(LLVM_IAS),1)
+ KBUILD_CFLAGS += -Wa,-mno-relax
+ KBUILD_AFLAGS += -Wa,-mno-relax
+endif
+endif
+
# ISA string setting
riscv-march-$(CONFIG_ARCH_RV32I) := rv32ima
riscv-march-$(CONFIG_ARCH_RV64I) := rv64ima
# ISA string setting
riscv-march-$(CONFIG_ARCH_RV32I) := rv32ima
riscv-march-$(CONFIG_ARCH_RV64I) := rv64ima