Perform kernel linker ifunc test only for builds

dvl reported that "make installkernel" failed with "amd64/arm64/i386
kernel requires linker ifunc support."  This test should apply to builds
only; the linker is not used at install time.

I think the same (ifunc-supporting) linker used to build the kernel
should be detected at install time in usual cases (and so not trigger
this error).  However, there is no reason to disallow the install, if
for some reason the expected linker isn't the one tested at install
time.

PR:		251580
Reported by:	dvl
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Ed Maste 2020-12-26 19:34:24 -05:00
parent 6dbb07ed68
commit 581ade97d5

View File

@ -148,7 +148,8 @@ LDFLAGS+= --build-id=sha1
.if (${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \
${MACHINE_CPUARCH} == "i386" || ${MACHINE} == "powerpc") && \
defined(LINKER_FEATURES) && ${LINKER_FEATURES:Mifunc} == ""
defined(LINKER_FEATURES) && ${LINKER_FEATURES:Mifunc} == "" && \
!make(install)
.error amd64/arm64/i386/ppc* kernel requires linker ifunc support
.endif
.if ${MACHINE_CPUARCH} == "amd64"