Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Nov 2014 12:48:09 +0000 (UTC)
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r274849 - head/share/mk
Message-ID:  <201411221248.sAMCm9rY046370@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



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