Statically linking a small piece of C into every GHC generated binary
johan.tibell at gmail.com
Tue Jul 19 18:45:18 CEST 2011
On Tue, Jul 19, 2011 at 6:02 PM, Johan Tibell <johan.tibell at gmail.com> wrote:
> I've implemented the primop but run into some difficulty: to use the
> above fallback I need the code to be statically linked into every
> binary. I'm not quite sure how to achieve that.
If dynamic linking doesn't hurt performance (too much). Could I stick
this piece of C code in ghc-prim? Are we guaranteed to always link
> GCC manages by having
> the above function definition in libc, which is always statically
I just realized that this isn't true. I wonder if GCC's
__builtin_popcount suffers a performance degradation when libc is
> I think LLVM uses a small statically linked compiler run-time
> library for the same purpose.
However I believe this is the case still. I'll need to doublecheck.
More information about the Glasgow-haskell-users