From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/5844 Path: news.gmane.org!not-for-mail From: u-igbb@aetey.se Newsgroups: gmane.linux.lib.musl.general Subject: Re: compiling musl on x86_64 linux with pcc Date: Thu, 14 Aug 2014 17:00:08 +0200 Message-ID: <20140814150008.GS5170@example.net> 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> <20140814144702.GZ12888@brightrain.aerifal.cx> 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 1408028439 22770 80.91.229.3 (14 Aug 2014 15:00:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 14 Aug 2014 15:00:39 +0000 (UTC) Cc: musl@lists.openwall.com To: Rich Felker Original-X-From: musl-return-5850-gllmg-musl=m.gmane.org@lists.openwall.com Thu Aug 14 17:00:32 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 1XHwVz-0001Cv-7T for gllmg-musl@plane.gmane.org; Thu, 14 Aug 2014 17:00:31 +0200 Original-Received: (qmail 25620 invoked by uid 550); 14 Aug 2014 15:00:30 -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 25609 invoked from network); 14 Aug 2014 15:00:30 -0000 X-T2-Spam-Status: No, hits=0.8 required=5.0 tests=BAYES_50 Received-SPF: none receiver=mailfe06.swip.net; client-ip=77.247.181.165; envelope-from=u-igbb@aetey.se Content-Disposition: inline In-Reply-To: <20140814144702.GZ12888@brightrain.aerifal.cx> User-Agent: Mutt/1.5.23 (2014-03-12) Xref: news.gmane.org gmane.linux.lib.musl.general:5844 Archived-At: On Thu, Aug 14, 2014 at 10:47:02AM -0400, Rich Felker wrote: > > > > __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 This is a good news (modulo the limitations) and at least some benefit from the legacy stuff - tcc is invaluable for rapid prototyping. > x86_64 is harder since there is no legacy definition and tcc did its > own craziness that relies on external functions named __va_*. This is a bad news. Thanks for the explanation Rich, Rune