Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ghc executable should add -lssp to arguments in order to properly link compiled executables #438

Open
iand675 opened this issue Dec 3, 2016 · 0 comments

Comments

@iand675
Copy link

iand675 commented Dec 3, 2016

Given the following Haskell program:

module Main where

main :: IO ()
main = putStrLn "Hi"

Running ghc --make Hello.hs fails to link due to missing symbols from libssp.so. It appears to be sufficient to change the bundled ghc script from:

#!/bin/sh
exedir="/opt/local/lib/ghc-7.6.3"
exeprog="ghc-stage2"
executablename="$exedir/$exeprog"
datadir="/opt/local/share"
bindir="/opt/local/bin"
topdir="/opt/local/lib/ghc-7.6.3"
executablename="$exedir/ghc"
exec "$executablename" -B"$topdir" ${1+"$@"}

to

#!/bin/sh
exedir="/opt/local/lib/ghc-7.6.3"
exeprog="ghc-stage2"
executablename="$exedir/$exeprog"
datadir="/opt/local/share"
bindir="/opt/local/bin"
topdir="/opt/local/lib/ghc-7.6.3"
executablename="$exedir/ghc"
exec "$executablename" -B"$topdir" ${1+"$@"} -lssp

However, I'm totally new to the smartos/illumos/etc ecosystem, so I'm not quite sure how to go about submitting this change upstream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant