From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/7845 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH 2/2] build: overhaul wrapper script system for multiple wrapper support Date: Mon, 1 Jun 2015 12:03:44 -0400 Message-ID: <20150601160344.GA21135@brightrain.aerifal.cx> References: <1432918126-27741-1-git-send-email-hi@shiz.me> <1432918512-27823-1-git-send-email-hi@shiz.me> <20150601031829.GW17573@brightrain.aerifal.cx> <0A8B4259-3D1F-42FA-BB0C-8DE6A63F89B6@shiz.me> <20150601144744.GX17573@brightrain.aerifal.cx> <09CD8E2A-6438-48AC-9D60-F661471EE00F@shiz.me> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1433174639 12859 80.91.229.3 (1 Jun 2015 16:03:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 1 Jun 2015 16:03:59 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-7857-gllmg-musl=m.gmane.org@lists.openwall.com Mon Jun 01 18:03:59 2015 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1YzSBz-00082X-3L for gllmg-musl@m.gmane.org; Mon, 01 Jun 2015 18:03:59 +0200 Original-Received: (qmail 29907 invoked by uid 550); 1 Jun 2015 16:03:57 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 29886 invoked from network); 1 Jun 2015 16:03:56 -0000 Content-Disposition: inline In-Reply-To: <09CD8E2A-6438-48AC-9D60-F661471EE00F@shiz.me> User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:7845 Archived-At: On Mon, Jun 01, 2015 at 05:39:46PM +0200, Shiz wrote: > > On 01 Jun 2015, at 16:47, Rich Felker wrote: > > > > There are two reasons I prefer the approach I described: > > > > 1. It's better not to auto-enable wrappers unless we're pretty > > confident they work. The wrappers are not magically universal; they're > > a way to use musl with a preexisting non-musl-targeted toolchain that > > meets a fairly large set of internal assumptions, and they won't > > necessarily work with arbitrary toolchains. In particular I'm pretty > > sure musl-gcc does not work with Rob's toolchains from Aboriginal > > Linux that are using their own wrapper (named gcc) around an internal > > gcc elsewhere, and presumably (being uclibc based) these would even be > > detected as "ok for wrapper”. > > I’d like to note that a __GLIBC__ check would not help here either > presumably, as uclibc defines __GLIBC__ as well. :) Yes, that's what I was trying to say. > So I see your use case for testing in C code itself as opposed to testing > compiler features. That being said, I’m still not at all a fan of __GLIBC__, > for reasons mentioned in the previous post. While a false-positive is worse > than a false-negative, I feel just solely testing for this provides a large > opportunity for false-negatives, and even some false positives as you yourself > mentioned in point one. I'm not aware of any real-world false-negatives. A Bionic-based system would probably be one, if any such system with a compiler toolchain exists, but depending on the properties of the toolchain that might even be a proper negative rather than a false-negative, so I'd actually prefer to research whether the wrappers work for such Bionic-based toolchains and then enable them explicitly if they do, rather than just assuming they work. > It’s a tough thing to check thoroughly and accurately, but I do not think > checking __GLIBC__ is at all the solution either. Still open to more options. Rich