Really fix cleandir after r362973

I made an attempt to fix this in r362978, but all it really did was
confine the issue to the $MACHINE_CPUARCH == "riscv" case. The real
problem is that LINKER_FEATURES is not defined here, so bsd.linker.mk
needs to be included.

This error with cleandir only occurs when META_MODE is disabled, which
explains why it was missed by both CI and myself.

Note that this effectively reverts r362978.

Reported by:	mjg
Reviewed by:	imp, kevans (in IRC)
This commit is contained in:
Mitchell Horne 2020-07-14 21:15:16 +00:00
parent 9f8d452173
commit 5e697f5f22

View File

@ -17,6 +17,7 @@ INTERNALLIB=
.endif
.include <src.opts.mk>
.include <bsd.linker.mk>
WARNS?= 1
@ -151,7 +152,7 @@ CFLAGS+= -fPIC
# Some RISC-V linkers have support for relaxations, while some (lld) do not
# yet. If this is the case we inhibit the compiler from emitting relaxations.
.if ${MACHINE_CPUARCH} == "riscv" && ${LINKER_FEATURES:Mriscv-relaxations} == ""
.if ${LINKER_FEATURES:Mriscv-relaxations} == ""
CFLAGS+= -mno-relax
.endif