From 5e697f5f22417954a1c62e69da430bed4ee64be1 Mon Sep 17 00:00:00 2001 From: Mitchell Horne Date: Tue, 14 Jul 2020 21:15:16 +0000 Subject: [PATCH] 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) --- stand/defs.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stand/defs.mk b/stand/defs.mk index 16a1871eff1b..bcc06f459b63 100644 --- a/stand/defs.mk +++ b/stand/defs.mk @@ -17,6 +17,7 @@ INTERNALLIB= .endif .include +.include 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