From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/5031 Path: news.gmane.org!not-for-mail From: "writeonce@midipix.org" Newsgroups: gmane.linux.lib.musl.general Subject: Re: for the wiki: a __MUSL__ alternative Date: Fri, 02 May 2014 20:53:36 -0400 Message-ID: <53643E10.5000309@midipix.org> References: <5361FA9F.2090207@midipix.org> <20140501125117.GU26358@brightrain.aerifal.cx> <5363770C.3080902@f-prot.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1399078442 9540 80.91.229.3 (3 May 2014 00:54:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 3 May 2014 00:54:02 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-5035-gllmg-musl=m.gmane.org@lists.openwall.com Sat May 03 02:53:56 2014 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1WgODD-000879-Gy for gllmg-musl@plane.gmane.org; Sat, 03 May 2014 02:53:55 +0200 Original-Received: (qmail 9570 invoked by uid 550); 3 May 2014 00:53:53 -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 9559 invoked from network); 3 May 2014 00:53:52 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 In-Reply-To: <5363770C.3080902@f-prot.com> Xref: news.gmane.org gmane.linux.lib.musl.general:5031 Archived-At: On 05/02/2014 06:44 AM, Oliver Schneider wrote: > Hey Rich, > > On 2014-05-01 12:51, Rich Felker wrote: >> The whole point of the wiki answer is that doing this is wrong. Adding >> a "here's a way to do it anyway" rather defeats the purpose and is >> just going to get us more trouble in the long term. In any case, this >> only works when dynamic linking is available, and it requires the >> ability to run programs for the target which breaks cross compiling >> and therefore violates one of the biggest rules for built scripts. > you're right and I admire how steadfast you are in your resolve. > > Initially I desired to have this myself so that I could give attribution > within the program depending on whether it was built with musl-libc or > another libc. Right now I have simple used a define on the command line > to tell whether it's a build with musl-libc or not. > > Also, I don't think the proposed solution is very elegant. In this case > it'd be better to pass parameters using the specs file, no? > > // Oliver > > As far as elegance goes, you're right (I wasn't aiming at too much elegance with that kind of a temporary solution). But if I understand you correctly(*), two reasons not to use the .specs file are: 1) there are native musl compilers that do not use the wrapper's .specs file; and 2) by turning __MUSL__ into a built-in macro of such native compilers, and likewise by defining __MUSL__ in the .specs file, you'll be making the macro available to everybody without requiring extra effort, which I believe is what we'd like to avoid. (*) I read 'specs' as a reference to musl-gcc.specs -zg (regretfully for bringing this up in the first place...)