git: 4fde25a4b239 - stable/15 - build: Stop testing LINKER_FEATURES for ifunc and build-id
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 10 Jul 2026 15:43:48 UTC
The branch stable/15 has been updated by mhorne:
URL: https://cgit.FreeBSD.org/src/commit/?id=4fde25a4b2393858177913fd695778bbb9e94293
commit 4fde25a4b2393858177913fd695778bbb9e94293
Author: Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2026-03-05 19:09:19 +0000
Commit: Mitchell Horne <mhorne@FreeBSD.org>
CommitDate: 2026-07-10 15:43:32 +0000
build: Stop testing LINKER_FEATURES for ifunc and build-id
These features are available in all supported linkers, and we can expect
that they'll be supported by any GNU-compatible linker that we'd use to
link FreeBSD.
Reviewed by: imp, kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55676
(cherry picked from commit 96294c22f7e54a48df44c86a4ee5848e71ac4470)
---
lib/libc/Makefile | 6 ------
stand/i386/Makefile.inc | 2 --
sys/conf/kern.pre.mk | 6 ------
sys/conf/kmod.mk | 2 --
4 files changed, 16 deletions(-)
diff --git a/lib/libc/Makefile b/lib/libc/Makefile
index 56818e07aa96..fd546dfcef61 100644
--- a/lib/libc/Makefile
+++ b/lib/libc/Makefile
@@ -190,12 +190,6 @@ SUBDIR.${MK_TESTS}+= tests
.include <bsd.lib.mk>
-.if (${LIBC_ARCH} == amd64 || ${LIBC_ARCH} == i386) && \
- ${.TARGETS:Mall} == all && \
- defined(LINKER_FEATURES) && ${LINKER_FEATURES:Mifunc} == ""
-.error ${LIBC_ARCH} libc requires linker ifunc support
-.endif
-
.if !defined(_SKIP_BUILD)
# We need libutil.h, get it directly to avoid
# recording a build dependency
diff --git a/stand/i386/Makefile.inc b/stand/i386/Makefile.inc
index 324c211420ae..bd4b893df0ac 100644
--- a/stand/i386/Makefile.inc
+++ b/stand/i386/Makefile.inc
@@ -23,9 +23,7 @@ CFLAGS+= -I${BTXLIB}
LDSCRIPT= ${BOOTSRC}/i386/boot.ldscript
LDFLAGS_ORG= -Wl,--defsym,ORG=${ORG},-T,${LDSCRIPT}
LDFLAGS_BIN= -e start ${LDFLAGS_ORG} -Wl,-N,-S,--oformat,binary
-.if ${LINKER_FEATURES:Mbuild-id} != ""
LDFLAGS_BIN+= -Wl,--build-id=none
-.endif
LD_FLAGS_BIN= -static -N --gc-sections
.if ${MACHINE_CPUARCH} == "amd64"
diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk
index 9a343e5e338c..73551f56f8b8 100644
--- a/sys/conf/kern.pre.mk
+++ b/sys/conf/kern.pre.mk
@@ -114,14 +114,8 @@ CFLAGS+= ${GCOV_CFLAGS}
# the others.
CFLAGS+= ${CONF_CFLAGS}
-.if defined(LINKER_FEATURES) && ${LINKER_FEATURES:Mbuild-id}
LDFLAGS+= --build-id=sha1
-.endif
-.if defined(LINKER_FEATURES) && ${LINKER_FEATURES:Mifunc} == "" && \
- !make(install)
-.error kernel requires linker ifunc support
-.endif
.if ${MACHINE_CPUARCH} == "amd64"
LDFLAGS+= -z max-page-size=2097152
.if ${LINKER_TYPE} != "lld"
diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk
index b466dca4f0e4..4bc69b95a25c 100644
--- a/sys/conf/kmod.mk
+++ b/sys/conf/kmod.mk
@@ -158,9 +158,7 @@ LDFLAGS+= -d
.endif
LDFLAGS+= -warn-common
-.if defined(LINKER_FEATURES) && ${LINKER_FEATURES:Mbuild-id}
LDFLAGS+= --build-id=sha1
-.endif
CFLAGS+= ${DEBUG_FLAGS}
.if ${MACHINE_CPUARCH} == aarch64 || ${MACHINE_CPUARCH} == amd64 || \