mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-31 16:57:10 +00:00
Reapply r362235 (by kp):
llvm: Default to -mno-relax on RISC-V Compiling on a RISC-V system fails with 'relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax'. Our default linker (ld.lld) doesn't support relaxation, so default to no-relax so we don't generate object files the linker can't handle. Reviewed by: mhorne Sponsored by: Axiado Differential Revision: https://reviews.freebsd.org/D25210
This commit is contained in:
parent
ec280e9ec4
commit
82343267e3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/projects/clang1100-import/; revision=363981
@ -536,8 +536,9 @@ void riscv::getRISCVTargetFeatures(const Driver &D, const llvm::Triple &Triple,
|
||||
if (Args.hasArg(options::OPT_ffixed_x31))
|
||||
Features.push_back("+reserve-x31");
|
||||
|
||||
// -mrelax is default, unless -mno-relax is specified.
|
||||
if (Args.hasFlag(options::OPT_mrelax, options::OPT_mno_relax, true))
|
||||
// FreeBSD local, because ld.lld doesn't support relaxations
|
||||
// -mno-relax is default, unless -mrelax is specified.
|
||||
if (Args.hasFlag(options::OPT_mrelax, options::OPT_mno_relax, false))
|
||||
Features.push_back("+relax");
|
||||
else
|
||||
Features.push_back("-relax");
|
||||
|
Loading…
Reference in New Issue
Block a user