git: df592782db90 - stable/12 - Perform kernel linker ifunc test only for builds

Ed Maste emaste at FreeBSD.org
Tue Jan 5 19:44:36 UTC 2021


The branch stable/12 has been updated by emaste:

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

commit df592782db906594c7f7ee0bdb9ed502401cd532
Author:     Ed Maste <emaste at FreeBSD.org>
AuthorDate: 2020-12-27 00:34:24 +0000
Commit:     Ed Maste <emaste at FreeBSD.org>
CommitDate: 2021-01-05 19:44:31 +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
    Sponsored by:   The FreeBSD Foundation
    
    (cherry picked from commit 581ade97d561e136dbb7cf7a413128c343a23199)
---
 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 65646da42faa..7f0099344d18 100644
--- a/sys/conf/kern.pre.mk
+++ b/sys/conf/kern.pre.mk
@@ -131,7 +131,8 @@ LDFLAGS+=	--build-id=sha1
 
 .if (${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \
     ${MACHINE_CPUARCH} == "i386") && \
-    defined(LINKER_FEATURES) && ${LINKER_FEATURES:Mifunc} == ""
+    defined(LINKER_FEATURES) && ${LINKER_FEATURES:Mifunc} == "" && \
+    !make(install)
 .error amd64/arm64/i386 kernel requires linker ifunc support
 .endif
 .if ${MACHINE_CPUARCH} == "amd64"


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