From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/5843 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: compiling musl on x86_64 linux with pcc Date: Thu, 14 Aug 2014 10:47:02 -0400 Message-ID: <20140814144702.GZ12888@brightrain.aerifal.cx> References: <20140813091843.GD5170@example.net> <20140813123832.GK12888@brightrain.aerifal.cx> <20140813125607.GK5170@example.net> <20140813142332.GN12888@brightrain.aerifal.cx> <20140814071055.GN5170@example.net> <20140814142056.GX12888@brightrain.aerifal.cx> <20140814143838.GR5170@example.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1408027658 11422 80.91.229.3 (14 Aug 2014 14:47:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 14 Aug 2014 14:47:38 +0000 (UTC) Cc: musl@lists.openwall.com To: u-igbb@aetey.se Original-X-From: musl-return-5849-gllmg-musl=m.gmane.org@lists.openwall.com Thu Aug 14 16:47:30 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 1XHwJD-0003PP-TY for gllmg-musl@plane.gmane.org; Thu, 14 Aug 2014 16:47:19 +0200 Original-Received: (qmail 18297 invoked by uid 550); 14 Aug 2014 14:47:19 -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 18289 invoked from network); 14 Aug 2014 14:47:18 -0000 Content-Disposition: inline In-Reply-To: <20140814143838.GR5170@example.net> User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:5843 Archived-At: On Thu, Aug 14, 2014 at 04:38:38PM +0200, u-igbb@aetey.se wrote: > On Thu, Aug 14, 2014 at 10:20:56AM -0400, Rich Felker wrote: > > > AFAICT tcc can not even _use_ musl (i.e. build programs to be linked to > > > musl) as musl relies on __builtin_va_list. > > > > > > That's a pity. Wonder whether it would cost too much to make > > > __builtin_va_list non-mandatory? > > > > How else would you do it? There's no real alternative. > > Well, tcc works e.g. with uclibc, which means this is possible, > even though I did not look at "how". Apparently tcc has its own stdarg.h which uses the nonsense legacy definition for i386 where the arguments are assumed to lie at fixed locations on the stack; this assumption is invalid because the compiler need not reuse the passed-in storage as the local object, and in the case of inlining there won't even be any passed-in storage. But it probably works for tcc since tcc sucks. See the __GNUC__>=3 condition in musl's stdarg.h. Disabling that (perhaps adding &&!__TCC__ or similar) should make tcc work with musl on i386, but x86_64 is harder since there is no legacy definition and tcc did its own craziness that relies on external functions named __va_*. Rich