How can I drop dynamic dependency on libgmp
and go from this:
linux-vdso.so.1 => (0x00007fffdccb1000)
libgmp.so.10 => /usr/lib/x
If you pass -optl-static -optl-pthread
to GHC, it'll statically link all the runtime library dependencies, including GMP. Setting ld-options: -static -pthread
in your Cabal file should accomplish the same thing.
That means you'll statically link in glibc too, but that probably won't be a problem, although it might increase binary size quite a bit. Using an alternative libc like musl or uClibc should help counteract that, if it's a problem for you.