Make GHC more multi-target
This makes GHC almost completely multi-target (except for some CPP in primops.txt.pp
that !959 (closed) is trying to fix).
Most of the changes are very rote, with the exception of the ghc-pkg
change. ghc-pkg
already computes the "top dir" from the global package db (I had thought I'd need to give it a -B
for this but I am glad to have been wrong about that). But, it didn't before read the settings file in that directory. Now it does in order to get the target platform, which it uses to compute the fallback user package db if none is specified. This is a bit circuitous. But I didn't see anything better.
Additionally, if the settings file doesn't exist it falls back on the host platform. This seems "gracefully" enough and can be tightened down later.
-
are either individually buildable or squashed -
have commit messages which describe what they do (referring to Notes and tickets using #NNNN
syntax when appropriate) -
have added source comments describing your change. For larger changes you likely should add a Note and cross-reference it from the relevant places. -
add a testcase to the testsuite. -
replace this message with a description motivating your change
If you have any questions don't hesitate to open your merge request and inquire
in a comment. If your patch isn't quite done yet please do add prefix your MR
title with WIP:
.