git: 581ade97d561 - main - Perform kernel linker ifunc test only for builds

Ed Maste emaste at FreeBSD.org
Sun Dec 27 17:49:35 UTC 2020


The branch main has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=581ade97d561e136dbb7cf7a413128c343a23199

commit 581ade97d561e136dbb7cf7a413128c343a23199
Author:     Ed Maste <emaste at FreeBSD.org>
AuthorDate: 2020-12-27 00:34:24 +0000
Commit:     Ed Maste <emaste at FreeBSD.org>
CommitDate: 2020-12-27 17:46:51 +0000

    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
---
 sys/conf/kern.pre.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk
index 4754092694c1..75f59a90484d 100644
--- a/sys/conf/kern.pre.mk
+++ b/sys/conf/kern.pre.mk
@@ -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"


More information about the dev-commits-src-all mailing list