bgamari/ghc — pull request #1 by AaronFriel (2014-01-11 03:46:55+00:00)
Title: Fix use of $ORIGIN in dynamic links

With this small tweak I was able to build ghc with `DYNAMIC_GHC_PROGRAMS`, the `dyn` way and with the `llvm` backend. Using `ldd` on the generated .so files after installation all libraries are successfully found.

From my commit:

The great lengths to ensure $ORIGIN gets written into the runpath of the dynamic libraries needs just one more escape character. Previously, $$$$ORIGIN evaluates to $ORIGIN which was being evaluated by some step in the chain to either the empty string or \0. Escaping the dollar sign *one more time* allows the $ to be passed to the linker unmolested.