svn commit: r274849 - head/share/mk

Baptiste Daroussin bapt at FreeBSD.org
Sat Nov 22 12:48:10 UTC 2014


Author: bapt
Date: Sat Nov 22 12:48:09 2014
New Revision: 274849
URL: https://svnweb.freebsd.org/changeset/base/274849

Log:
  Enforce -lpthread and -lc to always be the 2 last components of the link list
  
  Differential Revision:	https://reviews.freebsd.org/D1118
  Suggested by:		kib

Modified:
  head/share/mk/bsd.libnames.mk

Modified: head/share/mk/bsd.libnames.mk
==============================================================================
--- head/share/mk/bsd.libnames.mk	Sat Nov 22 12:44:31 2014	(r274848)
+++ head/share/mk/bsd.libnames.mk	Sat Nov 22 12:48:09 2014	(r274849)
@@ -161,3 +161,13 @@ LIBZ?=		${DESTDIR}${LIBDIR}/libz.a
 LIBZFS?=	${DESTDIR}${LIBDIR}/libzfs.a
 LIBZFS_CORE?=	${DESTDIR}${LIBDIR}/libzfs_core.a
 LIBZPOOL?=	${DESTDIR}${LIBDIR}/libzpool.a
+
+# enforce the 2 -lpthread and -lc to always be the last in that exact order
+.if defined(LDADD)
+.if ${LDADD:M-lpthread}
+LDADD:=	${LDADD:N-lpthread} -lpthread
+.endif
+.if ${LDADD:M-lc}
+LDADD:=	${LDADD:N-lc} -lc
+.endif
+.endif


More information about the svn-src-all mailing list