From owner-svn-src-head@freebsd.org Fri Dec 4 03:17:19 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7BF77A40C04; Fri, 4 Dec 2015 03:17:19 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a: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 479891CD1; Fri, 4 Dec 2015 03:17:19 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB43HIw2047269; Fri, 4 Dec 2015 03:17:18 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB43HIDM047266; Fri, 4 Dec 2015 03:17:18 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512040317.tB43HIDM047266@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 03:17:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291735 - in head: sbin/ipf/libipf share/mk usr.sbin/fifolog/lib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 03:17:19 -0000 Author: bdrewery Date: Fri Dec 4 03:17:17 2015 New Revision: 291735 URL: https://svnweb.freebsd.org/changeset/base/291735 Log: For INTERNALLIB always add in the corresponding _DP_ and use LIBADD in the real build file. This lessens the need to define DPADD_ and LDADD_ to just very special cases. Sponsored by: EMC / Isilon Storage Division Modified: head/sbin/ipf/libipf/Makefile head/share/mk/src.libnames.mk head/usr.sbin/fifolog/lib/Makefile Modified: head/sbin/ipf/libipf/Makefile ============================================================================== --- head/sbin/ipf/libipf/Makefile Fri Dec 4 03:17:14 2015 (r291734) +++ head/sbin/ipf/libipf/Makefile Fri Dec 4 03:17:17 2015 (r291735) @@ -43,4 +43,6 @@ SRCS= addicmp.c addipopt.c alist_free.c tcp_flags.c tcpflags.c tcpoptnames.c v6ionames.c v6optvalue.c \ var.c verbose.c +LIBADD= kvm + .include Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Fri Dec 4 03:17:14 2015 (r291734) +++ head/share/mk/src.libnames.mk Fri Dec 4 03:17:17 2015 (r291735) @@ -271,6 +271,8 @@ _DP_panelw= ncursesw _DP_rpcsec_gss= gssapi _DP_smb= kiconv _DP_ulog= md +_DP_fifolog= z +_DP_ipf= kvm # Define special cases LDADD_supcplusplus= -lsupc++ @@ -293,7 +295,9 @@ LDADD_${_l}?= -lprivate${_l} .else LDADD_${_l}?= ${LDADD_${_l}_L} -l${_l} .endif -.if defined(_DP_${_l}) && defined(NO_SHARED) && (${NO_SHARED} != "no" && ${NO_SHARED} != "NO") +# Add in all dependencies for static linkage. +.if defined(_DP_${_l}) && (${_INTERNALLIBS:M${_l}} || \ + (defined(NO_SHARED) && (${NO_SHARED} != "no" && ${NO_SHARED} != "NO"))) .for _d in ${_DP_${_l}} DPADD_${_l}+= ${DPADD_${_d}} LDADD_${_l}+= ${LDADD_${_d}} @@ -302,23 +306,17 @@ LDADD_${_l}+= ${LDADD_${_d}} .endfor # These are special cases where the library is broken and anything that uses -# it needs to add more dependencies. Many _INTERNALLIBS fall into this -# category. Unless the library itself is broken then the proper place to -# define dependencies is _DP_* above. +# it needs to add more dependencies. Broken usually means that it has a +# cyclic dependency and cannot link its own dependencies. This is bad, please +# fix the library instead. +# Unless the library itself is broken then the proper place to define +# dependencies is _DP_* above. # libatf-c++ exposes libatf-c abi hence we need to explicit link to atf_c for # atf_cxx DPADD_atf_cxx+= ${DPADD_atf_c} LDADD_atf_cxx+= ${LDADD_atf_c} -# _INTERNALLIBS. -# XXX: This should likely be reworked to have LIBADD in them and use normal -# _DP_ lists just to avoid temptation to add more similar entries here. -DPADD_fifolog+= ${DPADD_z} -LDADD_fifolog+= ${LDADD_z} -DPADD_ipf+= ${DPADD_kvm} -LDADD_ipf+= ${LDADD_kvm} - .for _l in ${LIBADD} DPADD+= ${DPADD_${_l}:Umissing-dpadd_${_l}} LDADD+= ${LDADD_${_l}} Modified: head/usr.sbin/fifolog/lib/Makefile ============================================================================== --- head/usr.sbin/fifolog/lib/Makefile Fri Dec 4 03:17:14 2015 (r291734) +++ head/usr.sbin/fifolog/lib/Makefile Fri Dec 4 03:17:17 2015 (r291735) @@ -7,6 +7,7 @@ SRCS= fifolog_int.c fifolog_create.c fif SRCS+= getdate.y CFLAGS+= -I${.CURDIR} +LIBADD= z NO_WMISSING_VARIABLE_DECLARATIONS=