Date: Fri, 7 May 2021 16:59:52 +0100 From: Jon Chesterfield <jonathanchesterfield@...il.com> To: musl@...ts.openwall.com Subject: Re: Compiling to single llvm bc, working example? Hi Rich, It looks like no-builtin is now an attribute https://godbolt.org/z/GsfffavKM that gets tagged on ~ everything when compiling with ffreestanding. Introduced in https://reviews.llvm.org/D68028 with a comment saying 'not yet fully implemented...no effect on generated code' which is still there at head. Thanks for the example from picolibc! Eerily similar to the fmod loop I ran into before, except there was no -fnobuiltin-fmod at that point. Putting D68028 and the picolibc example together, that part may now be resolved (despite the documentation). Cheers! Jon On Fri, May 7, 2021 at 4:54 PM Érico Nogueira <ericonr@...root.org> wrote: > Em 07/05/2021 11:41, Jon Chesterfield escreveu: > > Hello musl, > > > > Clang has mixed support for compiling libc from C. A couple of years ago > > I ran into pattern matching turning fmod into a call to itself and > > similar. I can see malloc getting into fights with alias analysis as > > well. I'm not confident ffreestanding is propagated in the IR. > > For a tangible example: > > > https://github.com/picolibc/picolibc/commit/4261cfecabee211af8d0dee1764bf86ed9c8e258 > > > > > Can anyone report success from compiling (a subset) of musl to llvm IR, > > perhaps with the hacks necessary at the time to make the end application > > work? > > > > Motivation is an architecture (amdgcn) that can't yet link machine code, > > but someone may have done this for performance. > > > > Thanks, > > > > Jon > > > > > > Content of type "text/html" skipped
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.