From owner-svn-ports-head@FreeBSD.ORG Mon Jul 21 13:37:15 2014 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4EF9D7C2; Mon, 21 Jul 2014 13:37:15 +0000 (UTC) Received: from mailrelay011.isp.belgacom.be (mailrelay011.isp.belgacom.be [195.238.6.178]) by mx1.freebsd.org (Postfix) with ESMTP id 15475266F; Mon, 21 Jul 2014 13:37:13 +0000 (UTC) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlcGAEsXzVNbs4jr/2dsb2JhbABZgw5SxhaHTQGBFBd2hAQBBTocIxALDgoJJQ8qHgaIWQG+bhePSweERgEEmySBTpJig0Y7Lw Received: from 235.136-179-91.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([91.179.136.235]) by relay.skynet.be with ESMTP; 21 Jul 2014 15:37:00 +0200 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.14.9/8.14.9) with ESMTP id s6LDawbc010901; Mon, 21 Jul 2014 15:36:58 +0200 (CEST) (envelope-from tijl@FreeBSD.org) Date: Mon, 21 Jul 2014 15:36:57 +0200 From: Tijl Coosemans To: John Marino Subject: Re: svn commit: r362304 - head/x11-toolkits/pango Message-ID: <20140721153657.17c64594@kalimero.tijl.coosemans.org> In-Reply-To: <53CD0F04.4040709@marino.st> References: <201407200815.s6K8FG8b003096@svn.freebsd.org> <20140720132259.156d687e@kalimero.tijl.coosemans.org> <53CBA770.2010409@marino.st> <20140720113124.GD26778@ivaldir.etoilebsd.net> <20140720165256.1f4d5d07@kalimero.tijl.coosemans.org> <53CBF2D7.4070005@marino.st> <20140721013342.6c17ecdc@kalimero.tijl.coosemans.org> <53CCABFA.7090202@marino.st> <20140721121214.1d1f3ef5@kalimero.tijl.coosemans.org> <53CCF19B.3060906@marino.st> <20140721132621.64ef394c@kalimero.tijl.coosemans.org> <53CD047B.7080104@marino.st> <20140721144356.72c4e5c2@kalimero.tijl.coosemans.org> <53CD0F04.4040709@marino.st> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-ports-head@freebsd.org, kwm@FreeBSD.org, Baptiste Daroussin , svn-ports-all@freebsd.org, marino@freebsd.org, ports-committers@freebsd.org X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2014 13:37:15 -0000 On Mon, 21 Jul 2014 15:00:52 +0200 John Marino wrote: > On 7/21/2014 14:43, Tijl Coosemans wrote: >> On Mon, 21 Jul 2014 14:15:55 +0200 John Marino wrote: >>> On 7/21/2014 13:26, Tijl Coosemans wrote: >>>> On Mon, 21 Jul 2014 12:55:23 +0200 John Marino wrote: >>>>> Everything that uses a pango function that has a libm symbol must also >>>>> link with libm. >>>> >>>> This is a completely false statement. If X links to Y and Y uses Z >>>> symbols, you do not have to link X with Z. Y links with Z and that is >>>> enough. Otherwise X would have to link with its entire dependency >>>> tree. >>> >>> If the linker doesn't follow Y's link to Z, how is it supposed to >>> resolve Z references? >> >> If X doesn't contain Z references the linker doesn't have to resolve >> Z references. >> >> If X does contain Z references then explicit linking requires that you >> explicitly link X with -lZ and that you cannot rely on -lY to imply -lZ. > > This seems to be the heart of our disagreement. > I am saying X can pull in a function of Y that contains a symbol of Z. > In that case, there's no reference of Z in X, but when linking X it > still needs -lZ. Let's work out an example: -- X.c -- void funcY( void ); int main( void ) { funcY(); return( 0 ); } --------- -- Y.c -- void funcZ( void ); void funcY( void ) { funcZ(); } --------- -- Z.c -- #include void funcZ( void ) { ( void ) puts( "Hello world" ); } --------- Create libZ.so: % cc -shared -o libZ.so Z.c Create libY.so linking it with libZ: % cc -shared -o libY.so Y.c -Wl,-rpath,. -L. -lZ Create X linking it with libY, but not libZ: % cc -o X X.c -Wl,-rpath,. -L. -lY Run ./X: % ./X Hello world Now, what do you get?