Skip to content

Commit

Permalink
Move libc linker ifunc test to build target only
Browse files Browse the repository at this point in the history
Targets like 'cleandir' must not depend on toolchain capabilities.

Reported by:	delphij, Shawn Webb
Approved by:	re (kib)
Sponsored by:	The FreeBSD Foundation
  • Loading branch information
emaste committed Sep 24, 2018
1 parent e3c2d3a commit a066070
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions lib/libc/Makefile
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit a066070

Please sign in to comment.