Author: brooks
Date: Thu Apr 16 15:34:22 2015
New Revision: 281604
URL: https://svnweb.freebsd.org/changeset/base/281604

Log:
  Make it harder to specify invalid LIBADD by causing values without
  corresponding DPADD_<lib> variables to produce a useful error message.
  
  Differential Revision:        https://reviews.freebsd.org/D2295
  Reviewed by:  bapt
  Sponsored by: DARPA, AFRL

Modified:
  head/UPDATING
  head/share/mk/src.libnames.mk

Modified: head/UPDATING
==============================================================================
--- head/UPDATING       Thu Apr 16 15:09:46 2015        (r281603)
+++ head/UPDATING       Thu Apr 16 15:34:22 2015        (r281604)
@@ -35,6 +35,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11
        The const qualifier has been removed from iconv(3) to comply with
        POSIX.  The ports tree is aware of this from r384038 onwards.
 
+20150416:
+       Libraries specified by LIBADD in Makefiles must have a corresponding
+       DPADD_<lib> variable to ensure correct dependencies.  This is now
+       enforced in src.libnames.mk.
+
 20150324:
        From legacy ata(4) driver was removed support for SATA controllers
        supported by more functional drivers ahci(4), siis(4) and mvs(4).

Modified: head/share/mk/src.libnames.mk
==============================================================================
--- head/share/mk/src.libnames.mk       Thu Apr 16 15:09:46 2015        
(r281603)
+++ head/share/mk/src.libnames.mk       Thu Apr 16 15:34:22 2015        
(r281604)
@@ -282,10 +282,14 @@ LDADD_gssapi_krb5+=       ${LDADD_pthread}
 .if ${_PRIVATELIBS:M${_l}}
 USEPRIVATELIB+=        ${_l}
 .endif
-DPADD+=                ${DPADD_${_l}}
+DPADD+=                ${DPADD_${_l}:Umissing-dpadd_${_l}}
 LDADD+=                ${LDADD_${_l}}
 .endfor
 
+.if defined(DPADD) && ${DPADD:Mmissing-dpadd_*}
+.error Missing ${DPADD:Mmissing-dpadd_*:S/missing-dpadd_//:S/^/DPADD_/} 
variable add "${DPADD:Mmissing-dpadd_*:S/missing-dpadd_//}" to _LIBRARIES, 
_INTERNALLIBS, or _PRIVATELIBS and define 
"${DPADD:Mmissing-dpadd_*:S/missing-dpadd_//:S/^/LIB/:tu}".
+.endif
+
 .if defined(USEPRIVATELIB)
 LDFLAGS+=      -rpath ${LIBPRIVATEDIR}
 .endif
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to