Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Sep 2018 13:42:46 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r338903 - head/lib/libc
Message-ID:  <201809241342.w8ODgkFD005741@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: emaste
Date: Mon Sep 24 13:42:46 2018
New Revision: 338903
URL: https://svnweb.freebsd.org/changeset/base/338903

Log:
  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

Modified:
  head/lib/libc/Makefile

Modified: head/lib/libc/Makefile
==============================================================================
--- head/lib/libc/Makefile	Mon Sep 24 10:03:37 2018	(r338902)
+++ head/lib/libc/Makefile	Mon Sep 24 13:42:46 2018	(r338903)
@@ -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
@@ -185,6 +180,12 @@ HAS_TESTS=
 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201809241342.w8ODgkFD005741>