diff --git a/stand/i386/loader/Makefile b/stand/i386/loader/Makefile --- a/stand/i386/loader/Makefile +++ b/stand/i386/loader/Makefile @@ -90,7 +90,8 @@ CFLAGS+= -Wall LDFLAGS+= -static ${LDFLAGS_ORG} -Wl,--gc-sections -.if ${LINKER_TYPE} == "lld" && ${LINKER_VERSION} >= 130000 +.if (${LINKER_TYPE} == "lld" && ${LINKER_VERSION} >= 130000) || \ + (${LINKER_TYPE} == "bfd" && ${LINKER_VERSION} >= 23700) # lld 13 and higher default to garbage collecting start/stop symbols, # completely ruining our linker sets. For now, work around it by # disabling this un-feature.