Hi,

On Mon, Aug 08, 2016 at 01:07:57PM +0200, Martijn Rijkeboer wrote:
> How do I set the wxneeded flag for Haskell? I tried the following in my
> cabal file, but to no avail:
> 
>   ghc-options: -optl -Wl,-z,wxneeded
>   ld-options: -optl -Wl,-z,wxneeded
> 
> I have also tried the ld-options flag without the '-optl'. When I try
> to compile my yesod app I get the following:
> 
>   ghc: mmap 630784 bytes at 0x40000000: Not supported
>   ghc: Try specifying an address with +RTS -xm<addr> -RTS
>   ghc: panic! (the 'impossible' happened)
>     (GHC version 7.10.3 for x86_64-unknown-openbsd):
>       loadObj 
> "/usr/local/lib/ghc/ghcpr_8TmvWUcS1U1IKHT0levwg3/HSghc-prim-0.4.0.0-8TmvWUcS1U1IKHT0levwg3.o":
> failed

Looks like it's ghc itself failing here while trying to dynamically
load ghc-prim. I'll try to write a patch for ghc which marks it as
wxneeded as a workaround.

A real fix would be either hacking on ghcs dynamic loader or trying
to update to a newer ghc.

@Karel Gardas and anyone else who is playing with the newest upstream
ghc (8.x): If you have some time, could you please try to build
some hs-programs or libraries for which naddy@ reported w^x violations
recently with ghc-8 (and probably cabal-install, because I don't
think this will work with the hs-libraries we currently have in the
ports tree)? I'd owe you unlimited amounts of beer for such a test,
of course ;-)

Ciao,
        Kili

Reply via email to