The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=96294c22f7e54a48df44c86a4ee5848e71ac4470
commit 96294c22f7e54a48df44c86a4ee5848e71ac4470 Author: Ed Maste <[email protected]> AuthorDate: 2026-03-05 19:09:19 +0000 Commit: Ed Maste <[email protected]> CommitDate: 2026-03-11 00:00:17 +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 --- 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 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 || \
