clang/llvm with glibc

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

clang/llvm with glibc

Dave Buehmann

This question has been asked occasionally with no positive responses.

Has anybody had success compiling glib with clang/llvm?  If so, can you share any details?

If not, are there any good libc replacements with more complete functionality than newlib?

Thanks, dave


_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: clang/llvm with glibc

JF Bastien

Roland says the main blocker for now is support for nested functions, he thinks the rest should be straightforward.

There was apparently a post to the glibc mailing list about this.

On Jun 5, 2013 11:37 AM, "Dave Buehmann" <[hidden email]> wrote:

This question has been asked occasionally with no positive responses.

Has anybody had success compiling glib with clang/llvm?  If so, can you share any details?

If not, are there any good libc replacements with more complete functionality than newlib?

Thanks, dave


_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev


_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: clang/llvm with glibc

Reid Kleckner-2
Here's a clang bug I filed long ago for it that was closed wontfix:


On Wed, Jun 5, 2013 at 3:05 PM, JF Bastien <[hidden email]> wrote:

Roland says the main blocker for now is support for nested functions, he thinks the rest should be straightforward.

There was apparently a post to the glibc mailing list about this.

On Jun 5, 2013 11:37 AM, "Dave Buehmann" <[hidden email]> wrote:

This question has been asked occasionally with no positive responses.

Has anybody had success compiling glib with clang/llvm?  If so, can you share any details?

If not, are there any good libc replacements with more complete functionality than newlib?

Thanks, dave


_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev


_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev



_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: clang/llvm with glibc

Peter Collingbourne-2
In reply to this post by Dave Buehmann
On Wed, Jun 05, 2013 at 12:34:41PM -0600, Dave Buehmann wrote:
> This question has been asked occasionally with no positive responses.
>
> Has anybody had success compiling glib with clang/llvm?  If so, can you
> share any details?
>
> If not, are there any good libc replacements with more complete
> functionality than newlib?

It is (almost) possible to compile glibc using DragonEgg -- there
are only a handful of patches required (for LLVM and DragonEgg),
most of which are now up for review.

It builds, and most of glibc's test suite currently passes, except
for some tests that deal with floating point arithmetic, and some
tests which use very obscure GNU as features which I haven't seen
used outside the glibc test suite.

Hopefully within a month or so everything should be upstreamed, but
if you're itching for something that works now I can try to find some
time to send some WIP patches and instructions.

Thanks,
--
Peter
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: clang/llvm with glibc

Dave Buehmann
Thanks Peter,

I'll try that path and follow up with you for the patches when I get to that point

Best, dave
Reply | Threaded
Open this post in threaded view
|

Re: clang/llvm with glibc

Rafael Espíndola
In reply to this post by Peter Collingbourne-2
> It is (almost) possible to compile glibc using DragonEgg -- there
> are only a handful of patches required (for LLVM and DragonEgg),
> most of which are now up for review.
>
> It builds, and most of glibc's test suite currently passes, except
> for some tests that deal with floating point arithmetic, and some
> tests which use very obscure GNU as features which I haven't seen
> used outside the glibc test suite.
>
> Hopefully within a month or so everything should be upstreamed, but
> if you're itching for something that works now I can try to find some
> time to send some WIP patches and instructions.

This is amazing!

What are you guys doing about -fno-toplevel-reorder?

Cheers,
Rafael
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: clang/llvm with glibc

Peter Collingbourne-2
On Fri, Jun 07, 2013 at 11:48:03AM -0400, Rafael Espíndola wrote:

> > It is (almost) possible to compile glibc using DragonEgg -- there
> > are only a handful of patches required (for LLVM and DragonEgg),
> > most of which are now up for review.
> >
> > It builds, and most of glibc's test suite currently passes, except
> > for some tests that deal with floating point arithmetic, and some
> > tests which use very obscure GNU as features which I haven't seen
> > used outside the glibc test suite.
> >
> > Hopefully within a month or so everything should be upstreamed, but
> > if you're itching for something that works now I can try to find some
> > time to send some WIP patches and instructions.
>
> This is amazing!
>
> What are you guys doing about -fno-toplevel-reorder?

I haven't done anything about this flag, to be honest.  From looking
at glibc's git HEAD it seems to currently be only used by two files
-- siglist.c and errlist.c -- and maybe I'm missing something but I
can't see any reason why either of these files now need it (in the
past these files seem to have contained some assembly but now
only contain straight C declarations).  It also seems to have been used
in the past by initfini.c but that file is now gone from glibc git.

Thanks,
--
Peter
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: clang/llvm with glibc

Rafael Espíndola
>> What are you guys doing about -fno-toplevel-reorder?
>
> I haven't done anything about this flag, to be honest.  From looking
> at glibc's git HEAD it seems to currently be only used by two files
> -- siglist.c and errlist.c -- and maybe I'm missing something but I
> can't see any reason why either of these files now need it (in the
> past these files seem to have contained some assembly but now
> only contain straight C declarations).  It also seems to have been used
> in the past by initfini.c but that file is now gone from glibc git.

I went looking in glibc's git and found
3add8e1353d62d77fdd9b4ca363cdfe7006b0efb adding support for crti and
crtn written is assembly, which eventually replaced the old initfini.c
hack.

Congratulations to all those involved, this a much better state than I
would have dreamed possible some years ago.

Cheers,
Rafael
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev