Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 14 Aug 2014 17:00:08 +0200
From: u-igbb@...ey.se
To: Rich Felker <dalias@...c.org>
Cc: musl@...ts.openwall.com
Subject: Re: compiling musl on x86_64 linux with pcc

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

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.