]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC 355428,356504: Add a new "riscv-relaxations" linker feature.
authorJohn Baldwin <jhb@FreeBSD.org>
Thu, 7 May 2020 14:20:52 +0000 (14:20 +0000)
committerJohn Baldwin <jhb@FreeBSD.org>
Thu, 7 May 2020 14:20:52 +0000 (14:20 +0000)
commit72dca97031238776a240e619a40e8f6dd8d81411
tree0f5327f2006d5915e17a630db8353f3b4688b3b5
parent9d1f903032ee5231d92108bc5b42aa95bc9e684e
MFC 355428,356504: Add a new "riscv-relaxations" linker feature.

355428:
Add a new "riscv-relaxations" linker feature.

When the linker doesn't have this feature, add -mno-relax to CFLAGS
on RISC-V.

Define the feature for ld.bfd, but not lld.  If lld gains relaxation
support in a newer version, we can enable it for those versions of lld
in bsd.linker.mk.

356504:
Add -mno-relax to CFLAGS in bsd.prog/lib.mk instead of bsd.cpu.mk.

bsd.cpu.mk is included by bsd.init.mk before bsd.linker.mk, so it
was always setting the flag since LINKER_FEATURES wasn't defined.
share/mk/bsd.lib.mk
share/mk/bsd.linker.mk
share/mk/bsd.prog.mk
sys/conf/kern.mk