From owner-p4-projects@FreeBSD.ORG Mon Sep 8 04:50:07 2014 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6FAC172A; Mon, 8 Sep 2014 04:50:07 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5D7703D9 for ; Mon, 8 Sep 2014 04:49:40 +0000 (UTC) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:1900:2254:2068::682:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B8F71B37 for ; Mon, 8 Sep 2014 04:49:40 +0000 (UTC) Received: from skunkworks.freebsd.org ([127.0.1.74]) by skunkworks.freebsd.org (8.14.9/8.14.9) with ESMTP id s884neNU021694 for ; Mon, 8 Sep 2014 04:49:40 GMT (envelope-from brooks@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.9/8.14.9/Submit) id s884neE7021690 for perforce@freebsd.org; Mon, 8 Sep 2014 04:49:40 GMT (envelope-from brooks@freebsd.org) Date: Mon, 8 Sep 2014 04:49:40 GMT Message-Id: <201409080449.s884neE7021690@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to brooks@freebsd.org using -f From: Brooks Davis Subject: PERFORCE change 1198871 for review To: Perforce Change Reviews Precedence: bulk X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.18-1 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 04:50:07 -0000 http://p4web.freebsd.org/@@1198871?ac=10 Change 1198871 by brooks@brooks_vica on 2014/08/18 16:10:41 Add a new variable LIBADD which itends to replace manual setting of DPADD and LDADD thus eliminating the possiblity of getting them out of sync, allowing easier transtions between libaries, and enabling more complex linking options such as whole program analysis via LLVM-IR. Affected files ... .. //depot/projects/ctsrd/tesla/src/share/mk/bsd.README#2 edit .. //depot/projects/ctsrd/tesla/src/share/mk/bsd.libnames.mk#5 edit Differences ... ==== //depot/projects/ctsrd/tesla/src/share/mk/bsd.README#2 (text+ko) ==== @@ -228,10 +228,19 @@ For example, to load with the compatibility and utility libraries, use: - LDADD=-lutil -lcompat + LDADD=-lcompat -lutil LDFLAGS Additional loader flags. +LIBADD Replacement for LDADD and DPADD taking a list of lowercase + library names. A corresponding LIB variable must + be defined and will be added to DPADD. A MINUSL + variable will be added to LDADD if define and if not -l + will be added. For example, to use the compatibility and + utility libraries, use: + + LIBADD=compat util + LINKS The list of binary links; should be full pathnames, the linked-to file coming first, followed by the linked file. The files are hard-linked. For example, to link ==== //depot/projects/ctsrd/tesla/src/share/mk/bsd.libnames.mk#5 (text+ko) ==== @@ -177,3 +177,6 @@ LIBZFS?= ${DESTDIR}${LIBDIR}/libzfs.a LIBZFS_CORE?= ${DESTDIR}${LIBDIR}/libzfs_core.a LIBZPOOL?= ${DESTDIR}${LIBDIR}/libzpool.a + +DPADD+= ${LIBADD:@L@${LIB${L:tu}:U"No LIB${L:tu} variable defined"}@} +LDADD+= ${LIBADD:@L@${MINUSL${L:tu}:U${L:S/^/-l/}}@}