Statically linking a small piece of C into every GHC generated binary

2011-07-19 Thread Johan Tibell
Hi, I'm trying to add support for the POPCNT instruction, which exists on some modern CPUs (e.g. Nehalem). The idea is to add a popCnt# primop which would generate a POPCNT instruction when compiling with -msse4.2. If the user didn't specified -msse4.2, the primop should fall back to some other

Re: Statically linking a small piece of C into every GHC generated binary

2011-07-19 Thread Johan Tibell
On Tue, Jul 19, 2011 at 6:02 PM, Johan Tibell johan.tib...@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

Re: Statically linking a small piece of C into every GHC generated binary

2011-07-19 Thread Niklas Larsson
2011/7/19 Johan Tibell johan.tib...@gmail.com: On Tue, Jul 19, 2011 at 6:02 PM, Johan Tibell johan.tib...@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

statically linking

2008-02-17 Thread Martina Seidl
Hallo, I urgently need a statically linked binary (ELF 32) of a Haskell program I have written and I could not figure out yet how to achieve this. Could anyone give me a hint please? Best regards, Martina ___ Glasgow-haskell-users mailing list

Re: statically linking

2008-02-17 Thread Bjorn Bringert
On Feb 17, 2008 3:32 PM, Martina Seidl [EMAIL PROTECTED] wrote: Hallo, I urgently need a statically linked binary (ELF 32) of a Haskell program I have written and I could not figure out yet how to achieve this. Could anyone give me a hint please? Best regards, Martina Hi Martina, Adding