Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Jan 2021 19:44:36 GMT
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: df592782db90 - stable/12 - Perform kernel linker ifunc test only for builds
Message-ID:  <202101051944.105JiaE6062186@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by emaste:

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

commit df592782db906594c7f7ee0bdb9ed502401cd532
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2020-12-27 00:34:24 +0000
Commit:     Ed Maste <emaste@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"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202101051944.105JiaE6062186>