|
Message-ID: <20140814144702.GZ12888@brightrain.aerifal.cx> Date: Thu, 14 Aug 2014 10:47:02 -0400 From: Rich Felker <dalias@...c.org> To: u-igbb@...ey.se Cc: musl@...ts.openwall.com Subject: Re: compiling musl on x86_64 linux with pcc On Thu, Aug 14, 2014 at 04:38:38PM +0200, u-igbb@...ey.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
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.