From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH XEN v4 01/23] tools/Rules.mk: Properly handle libraries with recursive dependencies. Date: Mon, 2 Nov 2015 14:20:00 +0000 Message-ID: <1446474000.3088.49.camel@citrix.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> <20151029162741.GS18674@zion.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20151029162741.GS18674@zion.uk.xensource.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: Wei Liu Cc: ian.jackson@eu.citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Thu, 2015-10-29 at 16:27 +0000, Wei Liu wrote: > 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. Gah, I just replied to Jan claiming to have (inadvertently) spotted this, but I didn't do so at all! Oh well..