Relocatable dist

Moritz Angermann moritz.angermann at gmail.com
Mon Oct 23 06:04:34 UTC 2017


Hi,

while trying to make the binary-distribution logic work for
cross compilers.  I've come wonder, how hard it could be to
make GHC relocatable. (e.g. just unpack the distribution, 
and use the compiler from the `bin` folder within).

Right now this does not work due to the need for the path to
package.conf, and this is hardcoded in the wrapper script to
provide the proper libdir to ghc via -B[1]. Supposedly this
is not an issue on Windows, as a relative path is common on
windows and finding the location of the executable can be done
safely. Or that's at least how I understand[1].

For macOS there is the haskell-platform, and ghc-dot-app[2]

From [3], it sounds like automake is a build, and not a packaging
system, and the binary dist usecase with configure is not
really a standard use case.

So why do I bring this up NOW? Apart from me trying to make
cross compiler binary distributions working?  The reason is
that we are also trying to move towards hadrian, and by "starting
from scratch", maybe we have a chance to reconsider how we
do things?

I must admit, I'm quite happy to use packages like llvm, by
just downloading a package and adding the `bin` path to my
$PATH.

There is however one thing that the current configure appraoch
does, which I think is quite noteworthy (apart from setting
$prefix).  That is, it does check for compilers and sets them
accordingly, which might be desirable.

Cheers,
 Moritz

--
[1]: https://ghc.haskell.org/trac/ghc/wiki/Building/Installing
[2]: https://ghc.haskell.org/trac/ghc/wiki/Building/MacOSX/Installer
[3]: https://lists.gnu.org/archive/html/automake/2006-10/msg00005.html


More information about the ghc-devs mailing list