This diff changes the C compiler used by GHC to base clang.
- Completed poudriere bulk -t lang/ghc */hs-* devel/stack on 10.3 and 11.0 jails.
- Built https://github.com/haskell/haskell-ide-engine using stack and GHC built with this change. HIE is a pretty heavy dependence-wise and depends on foreign libraries too. Compiled binary works and tests pass.
- Built https://github.com/llvm-hs/llvm-hs with some patching (see [1] below). Before there was a nasty problem with this package, as it used llvm-config to configure itself and llvm* packages on FreeBSD are compiled with clang. This causes clang-specific flags (various -W ones) to be present in llvm-config output. When GHC tries to compile C++ bits with GCC, it chokes on these flags. The only way to build llvm-hs with GCC-orientired GHC I found was to temporalily symlink clang to gcc. With this change only minor patching is required to build this package.
- Built pandoc with stack and system GHC, and verified it is working.
[1] Some haskell packages that are not yet in ports tree depend on C++ foreign libraries and have extra-libraries: stdc++ in their .cabal files. This causes them to fail with my patch, but it is easily fixed. An example of such package and corresponding change is https://github.com/arrowd/charsetdetect-ae/commit/7f7e8b15080006cb4e285c62b4fada3011878142 . Another example is llvm-hs mentioned before. I plan to upstream fixes to these packages once this diff is landed.