linux-brain/arch/riscv
Khem Raj 527f70f767 riscv: Use -mno-relax when using lld linker
[ Upstream commit ec3a5cb61146c91f0f7dcec8b7e7157a4879a9ee ]

lld does not implement the RISCV relaxation optimizations like GNU ld
therefore disable it when building with lld, Also pass it to
assembler when using external GNU assembler ( LLVM_IAS != 1 ), this
ensures that relevant assembler option is also enabled along. if these
options are not used then we see following relocations in objects

0000000000000000 R_RISCV_ALIGN     *ABS*+0x0000000000000002

These are then rejected by lld
ld.lld: error: capability.c:(.fixup+0x0): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax but the .o is already compiled with -mno-relax

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-06-18 09:58:58 +02:00
..
boot dts: phy: fix missing mdio device and probe failure of vsc8541-01 device 2021-01-27 11:47:45 +01:00
configs riscv: defconfig: enable gpio support for HiFive Unleashed 2021-01-27 11:47:45 +01:00
include riscv: Workaround mcount name prior to clang-13 2021-05-22 11:38:29 +02:00
kernel riscv: Workaround mcount name prior to clang-13 2021-05-22 11:38:29 +02:00
lib riscv: Using CSR numbers to access CSRs 2019-08-30 11:04:19 -07:00
mm riscv: Add sfence.vma after early page table changes 2020-09-23 12:40:43 +02:00
net riscv, bpf: Fix broken BPF tail calls 2020-02-11 04:35:28 -08:00
Kbuild riscv: add arch/riscv/Kbuild 2019-08-30 17:34:00 -07:00
Kconfig riscv: Fix spelling mistake "SPARSEMEM" to "SPARSMEM" 2021-04-21 12:56:16 +02:00
Kconfig.debug RISC-V: Remove EARLY_PRINTK support 2018-12-17 10:23:46 -08:00
Kconfig.socs riscv: select SiFive platform drivers with SOC_SIFIVE 2019-07-01 13:20:01 -07:00
Makefile riscv: Use -mno-relax when using lld linker 2021-06-18 09:58:58 +02:00