Date: Mon, 8 Sep 2014 04:49:40 GMT From: Brooks Davis <brooks@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 1198871 for review Message-ID: <201409080449.s884neE7021690@skunkworks.freebsd.org>
next in thread | raw e-mail | index | archive | help
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<LIBNAME> variable must + be defined and will be added to DPADD. A MINUSL<LIB> + variable will be added to LDADD if define and if not -l<lib> + 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/}}@}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409080449.s884neE7021690>