Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Dec 2020 17:49:35 GMT
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 581ade97d561 - main - Perform kernel linker ifunc test only for builds
Message-ID:  <202012271749.0BRHnZ6F057714@gitrepo.freebsd.org>

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

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

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



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