From: Wei Liu Subject: Re: [PATCH XEN v4 01/23] tools/Rules.mk: Properly handle libraries with recursive dependencies. Date: Thu, 29 Oct 2015 16:27:41 +0000 Message-ID: <20151029162741.GS18674@zion.uk.xensource.com> References: <1445440941.9563.163.camel@citrix.com> <1445441010-25776-1-git-send-email-ian.campbell@citrix.com> <1445441010-25776-2-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1445441010-25776-2-git-send-email-ian.campbell@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: wei.liu2@citrix.com, ian.jackson@eu.citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Wed, Oct 21, 2015 at 04:23:08PM +0100, Ian Campbell wrote: > In tree libraries which link against other in tree libraries in a way > which is opaque to their callers need special handling, specifically > correct use of -Wl,-rpath-link for the recusively used libraries. > > Currently this is rather simple, but up coming changes are going to > introduce transitive dependencies more than 1 step deep. > > Introduce a SHDEPS idiom to contain all the recursive deps for a > library and include those in both LDLIBS (for linking) and SHLIB (for > recursive uses). > > Try and document the whole thing. > > Signed-off-by: Ian Campbell > Acked-by: Ian Jackson Acked-by: Wei Liu > > CFLAGS_libxenguest = -I$(XEN_LIBXC)/include $(CFLAGS_xeninclude) > -LDLIBS_libxenguest = $(XEN_LIBXC)/libxenguest$(libextension) > -SHLIB_libxenguest = -Wl,-rpath-link=L$(XEN_LIBXC) > +SHDEPS_libxenguest = > +LDLIBS_libxenguest = $(SHDEPS_libxenguest) $(XEN_LIBXC)/libxenguest$(libextension) > +SHLIB_libxenguest = $(SHDEPS_libxenguest) -Wl,-rpath-link=L$(XEN_LIBXC) > There is an extra "L" preceding XEN_LIBXC. Jan spotted and fixed it in one of his patch. Wei.