<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi,</p>
<p>This is what I have in my .cabal file to get a statically-linked
executable:</p>
<p> ghc-options: -Wall -static -threaded<br>
cc-options: -static<br>
ld-options: -static -pthread<br>
<br>
Sylvain<br>
</p>
<br>
<div class="moz-cite-prefix">On 18/07/2017 20:46, Kai Zhang wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CACh019moypg4y4E3NkpHWNOTPzOrw_0fV8gXTDvbsFsurXZ2dw@mail.gmail.com">
<div dir="ltr">I want to produce a statically-linked executable.
First I tried "-optl-static -optc-static -optl-pthrea", which
statically links all external libraries. But when I ran this
executable it gives me "abort (core dumped)" error. I suspect
the statically-linked glibc library might be the cause. So I
decide to statically link all other libraries and leave the
glibc as a dynamic library. How to do this using Cabal? Should I
write a custom "Setup.hs"?</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
<a class="moz-txt-link-freetext" href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a>
Only members subscribed via the mailman list are allowed to post.</pre>
</blockquote>
<br>
</body>
</html>