From owner-svn-src-all@freebsd.org Sat Dec 26 00:38:32 2015 Return-Path: Delivered-To: svn-src-all@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 E6A02A52E02 for ; Sat, 26 Dec 2015 00:38:31 +0000 (UTC) (envelope-from bounces+73574-8822-svn-src-all=freebsd.org@sendgrid.net) Received: from o1.l99.sendgrid.net (o1.l99.sendgrid.net [198.37.153.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AEA4312E3 for ; Sat, 26 Dec 2015 00:38:31 +0000 (UTC) (envelope-from bounces+73574-8822-svn-src-all=freebsd.org@sendgrid.net) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.info; h=subject:to:references:cc:from:mime-version:in-reply-to:content-type:content-transfer-encoding; s=smtpapi; bh=n6VVui9hfBcH0aTMSQIThRWCyOk=; b=PlBFKsYOYQeczYeChf 94sMiOG/CFoR7ptGIq5Fb4QQzEZM7WxlSdHbPIUeRHB5ZzqurHh69mD14Th6/eEQ qP8qo0aaHjjMWjYzSlTavJJ1rcy2YeuZU/a+u+Oy6tNv19KfKgm6EAAXDLN1Y9tI dBVpo+pP/5yYHJq4uENimLhd0= Received: by filter0565p1mdw1.sendgrid.net with SMTP id filter0565p1mdw1.12822.567DE1854D 2015-12-26 00:38:29.706107298 +0000 UTC Received: from mail.tarsnap.com (ec2-54-86-246-204.compute-1.amazonaws.com [54.86.246.204]) by ismtpd0001p1iad1.sendgrid.net (SG) with ESMTP id nVi7hGC6Squl2JESYF8RgA for ; Sat, 26 Dec 2015 00:38:29.387 +0000 (UTC) Received: (qmail 18257 invoked from network); 26 Dec 2015 00:36:26 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by ec2-107-20-205-189.compute-1.amazonaws.com with ESMTP; 26 Dec 2015 00:36:27 -0000 Received: (qmail 58251 invoked from network); 26 Dec 2015 00:38:24 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by clamshell.daemonology.net with SMTP; 26 Dec 2015 00:38:24 -0000 Subject: Re: svn commit: r292723 - in head: lib/libc share/mk To: Daniel Eischen , Ed Schouten References: <201512251129.tBPBTIZp058825@repo.freebsd.org> Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Colin Percival Message-ID: <567DE180.3040601@freebsd.org> Date: Fri, 25 Dec 2015 16:38:24 -0800 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SG-EID: A6W2xSVPHetogaU8rnzccWwgBYtN+QvIzXyjfe/10PFgePcuI5hHh6GTreqUsg1qaOS1yOvd8actRy 1LHIdI5C4yJSeMcYseklRh+le1jfSw/i7WlTyTqKwYwMjoj7511j6tnb/EDWr22YcReZyqSfY+TOwT k1pfcpHCrxUJZoJX+Wxvidf+LKJFcqMRzpAKaylXDPrZs/UtD/67mSCTqbAiCj/b58xFDV/ure8tzj U= X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Dec 2015 00:38:32 -0000 On 12/25/15 13:03, Daniel Eischen wrote: > On Fri, 25 Dec 2015, Ed Schouten wrote: >> 2015-12-25 12:29 GMT+01:00 Colin Percival : >>> Make libxnet.so a symlink to libc.so. This makes `-lxnet` a no-op, as >>> POSIX requires for the c99 compiler. >> >> I seem to remember I had some issues in the past where I was linking >> against libc explicitly. Maybe it had something to do with linking >> both against -lpthread and -lc, but if you pass in -lc later on the >> command line, libc overrides the symbols that have to be provided by >> -lpthread? I just did some tests with one of my pthread-using tools, and it passes all of my tests with -lc added before or after -lpthread. Can you remember any details of how the problems showed up? Is it possible that this has been fixed since then? I know there's a lot of tricks to make sure that the right versions of functions get called. >> If that's (still) the case, would it make sense to just provide >> libxnet in the form of an empty .a file instead? > > I think that's a good point. Using -lanything shouldn't introduce an > unexpected link order. Yes, adding a dummy library was my first thought, but kib pointed out that a symlink was much simpler. Obviously it never occurred to me that linking to a library which we were going to be linking to anyway would cause problems... -- Colin Percival Security Officer Emeritus, FreeBSD | The power to serve Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid