[GHC] #10334: __ctzdi2/si2/__clzdi2/si2 unknown symbols in ghc-prim on non-shared libs platform
GHC
ghc-devs at haskell.org
Tue Apr 21 16:09:37 UTC 2015
#10334: __ctzdi2/si2/__clzdi2/si2 unknown symbols in ghc-prim on non-shared libs
platform
-------------------------------------+-------------------------------------
Reporter: kgardas | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Core Libraries | Version: 7.11
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: None/Unknown | Unknown/Multiple
Blocked By: | Test Case:
Related Tickets: | Blocking:
| Differential Revisions:
-------------------------------------+-------------------------------------
Changes (by ekmett):
* owner: ekmett =>
Comment:
I'd encourage a fix, but I'm going to relinquish control of the ticket as
it is more about how the linker/RTS works than the structure of the core
libraries per se.
If we need a good `ctz` and `clz`, I have implementations in various
libraries we could adapt back into C/C-- and contribute from various
projects.
e.g.
https://github.com/ekmett/bits/blob/ded1403737ce26e819c1d1c1facb41a9e776eb46/cbits/debruijn.c#L2
gives usable De Bruijn multiplication tables and
https://github.com/ekmett/bits/blob/ded1403737ce26e819c1d1c1facb41a9e776eb46/src/Data/Bits/Extras.hs#L56
provides a working portable `ctz`. Right below it is a decent `clz` that
uses our existing `popCount` primitive. You may need to adjust the answers
by 1 to comply with the `__builtin_clz` and `__builtin_ctz` primitives, I
forget.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10334#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list