diff --git a/stand/defs.mk b/stand/defs.mk index a36bfb9acfa..16a1871eff1 100644 --- a/stand/defs.mk +++ b/stand/defs.mk @@ -151,7 +151,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 ${LINKER_FEATURES:Mriscv-relaxations} == "" +.if ${MACHINE_CPUARCH} == "riscv" && ${LINKER_FEATURES:Mriscv-relaxations} == "" CFLAGS+= -mno-relax .endif