Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Mon, 4 Apr 2016 08:36:22 -0700
From: Isaac Dunham <ibid.ag@...il.com>
To: musl@...ts.openwall.com
Subject: Re: musl libc.so working and almost building with current pcc

On Sun, Apr 03, 2016 at 08:04:48PM -0400, Rich Felker wrote:
> On Sun, Apr 03, 2016 at 02:47:56PM -0700, Isaac Dunham wrote:
> > However, PCC reports a major internal compiler error at line 1382
> > of ldso/dynlink.c (which is conditional on FDPIC support).
> > If I convert the "if (DL_FDPIC) ..." to an ifdef, I get a working libc.
> > (src/complex/catanf.c is now properly compiled.)
> 
> It's always defined (to either 0 or 1) so #ifdef produces wrong code.
> Did you try #if DL_FDPIC? That should work but there's obviously some
> serious pcc bug going on here, probably preprocessor breakage again.

Not a preprocessor bug; building dynlink.i by hand, I see that this line
	if (DL_FDPIC) ((stage3_func)&ldso.funcdescs[dls3_def.sym-ldso.syms])(sp);
becomes
	if (0) ((stage3_func)&ldso.funcdescs[dls3_def.sym-ldso.syms])(sp);

Which is what it should be.
So it's hitting a problem with understanding the code.

Thanks,
Isaac Dunham

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.