Move libc linker ifunc test to build target only

Targets like 'cleandir' must not depend on toolchain capabilities.

Reported by:	delphij, Shawn Webb
Approved by:	re (kib)
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Ed Maste 2018-09-24 13:42:46 +00:00
parent 9afff6b1c0
commit 2417a95e02
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=338903

View File

@ -21,11 +21,6 @@ LIBC_ARCH=${MACHINE_ARCH}
LIBC_ARCH=${MACHINE_CPUARCH}
.endif
.if (${LIBC_ARCH} == amd64 || ${LIBC_ARCH} == i386) && \
defined(LINKER_FEATURES) && ${LINKER_FEATURES:Mifunc} == ""
.error ${LIBC_ARCH} libc requires linker ifunc support
.endif
# All library objects contain FreeBSD revision strings by default; they may be
# excluded as a space-saving measure. To produce a library that does
# not contain these strings, add -DSTRIP_FBSDID (see <sys/cdefs.h>) to CFLAGS
@ -186,6 +181,12 @@ 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