build/riscv64: Disable relaxation linker optimization under clang/lld
* Fixes errors compiling under clang around 'R_RISCV_ALIGN requires unimplemented linker relaxation' * Same fix FreeBSD applied https://reviews.freebsd.org/D25210 Change-Id: I680cac5e3e73d3ebb84aa0741bcee61530405db0 Reviewed-on: https://review.haiku-os.org/c/haiku/+/4986 Reviewed-by: Alex von Gluck IV <[email protected]> Reviewed-by: Adrien Destugues <[email protected]> Tested-by: Commit checker robot <[email protected]>
This commit is contained in:
committed by
Alex von Gluck IV
parent
86e5dd70f6
commit
e9541a68ed
@@ -48,6 +48,11 @@ rule ArchitectureSetup architecture
|
||||
# TODO: These should be included in Clang's compiler specs.
|
||||
ccBaseFlags += -fPIC ;
|
||||
HAIKU_LINKFLAGS_$(architecture) += -shared ;
|
||||
|
||||
# lld doesn't currently implement R_RISCV_ALIGN relaxation
|
||||
if $(cpu) = riscv64 {
|
||||
ccBaseFlags += -mno-relax ;
|
||||
}
|
||||
}
|
||||
ccBaseFlags += $(archFlags) ;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user