How to link with the GNU gold linker instead of ld in Haskell

Link 3x faster with gold Since GHC 7.8, you can tell GHC and cabal (at run time without having to recompile GHC) to link with GNU gold. You need in your .cabal file: library: ghc-options: -optl-fuse-ld=gold ld-options: -fuse-ld=gold executable myExecutable ghc-options: -optl-fuse-ld=gold ld-options: -fuse-ld=gold (Note you might want to pass these flags to stack/cabal/Setup.hs on … Read more

What’s the difference between `-rpath-link` and `-L`?

Here is a demo, for GNU ld, of the difference between -L and -rpath-link – and for good measure, the difference between -rpath-link and -rpath. foo.c #include <stdio.h> void foo(void) { puts(__func__); } bar.c #include <stdio.h> void bar(void) { puts(__func__); } foobar.c extern void foo(void); extern void bar(void); void foobar(void) { foo(); bar(); } main.c … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)