Completely reproducible Haskell builds

Matthias Kilian kili at outback.escape.de
Fri May 27 18:59:43 CEST 2011


On Fri, May 27, 2011 at 04:35:17PM +0100, Simon Marlow wrote:
> >Next best idea is to make GHC use repeatable temporary .c&  .o file
> >names for each invocation. There is already a unique temporary
> >directory where all the the temporary files are created. This suggests
> >I do not need to worry about adversarial races. So GHC just need to
> >avoid racing with itself. I see a couple of options:
> >
> >   1) newTempName should create a new subdirectory for each call and
> >      the return a fixed name inside of this (so 
> >      /tmp/ghc28016_0/ghc28016_0.c
> >      above would become /tmp/ghc28016_0/0/dummy.c)
> >   2) mkExtraCObj could compute some hash function of its xs
> >      argument (C program text) and then create a file named, e.g.
> >      /tmp/ghc28016_0/38eb8d8eb0abe9c828ba60983e2a97f7a069ec41.c
> >
> >Which of these two looks better? Other ideas?
> 
> The first is easier, and would be fine with me.

An alternative could be to just strip the single `symbol' off the
object file (using something like strip -N ...). I didn't yet test
this for real.

Ciao,
	Kili



More information about the Glasgow-haskell-users mailing list