<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>