aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2026-03-05 19:09:19 +0000
committerEd Maste <emaste@FreeBSD.org>2026-03-11 00:00:17 +0000
commit96294c22f7e54a48df44c86a4ee5848e71ac4470 (patch)
treecdc913a144b792f16a5cfb4ca30aa57024fdaf99
parentbfb2fd5f66183454cfe8771595df09c0f23c7efb (diff)
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
-rw-r--r--lib/libc/Makefile6
-rw-r--r--stand/i386/Makefile.inc2
-rw-r--r--sys/conf/kern.pre.mk6
-rw-r--r--sys/conf/kmod.mk2
4 files changed, 0 insertions, 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 cf5e4a96ad49..d4b29aac5e63 100644
--- a/sys/conf/kern.pre.mk
+++ b/sys/conf/kern.pre.mk
@@ -115,14 +115,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 4f1509592483..aacd7a17ef99 100644
--- a/sys/conf/kmod.mk
+++ b/sys/conf/kmod.mk
@@ -159,9 +159,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 || \