Properly handle dlerror() message on FreeBSD when linking linker scripts
Properly handle dlerror() message on FreeBSD when linking linker scripts

Test Plan: `GHCi.loadDll "/usr/lib/libc++.so` now works on FreeBSD.

Reviewers: austin, bgamari, erikd, simonmar

Reviewed By: simonmar

Subscribers: rwbarton, thomie

Differential Revision: https://phabricator.haskell.org/D3841

shlevy/ghc,shlevy/ghc,sdiehl/ghc,shlevy/ghc,sdiehl/ghc,shlevy/ghc,shlevy/ghc,sdiehl/ghc,ezyang/ghc,sdiehl/ghc,ezyang/ghc,shlevy/ghc,sdiehl/ghc,ezyang/ghc,ezyang/ghc,sdiehl/ghc,ezyang/ghc,ezyang/ghc,shlevy/ghc,sdiehl/ghc,ezyang/ghc