PERFORCE change 1198871 for review
Brooks Davis
brooks at FreeBSD.org
Mon Sep 8 04:50:07 UTC 2014
http://p4web.freebsd.org/@@1198871?ac=10
Change 1198871 by brooks at 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/}}@}
More information about the p4-projects
mailing list