
Thank you, that works fine for me! Från: Marc Ziegert [mailto:Coeus@gmx.de] Skickat: den 12 mars 2014 00:39 Till: Joakim Goldkuhl Kopia: haskell-cafe@haskell.org Ämne: Aw: [Haskell-cafe] pure ghc that time stamp is generated at link time, not compile time. to remove it, simply use the "strip" tool: echo "main = return ()" > c.hs && ghc -fforce-recomp c.hs && mv c c1 && ghc -fforce-recomp c.hs && mv c c2 && md5sum c1 c2 && strip c1 c2 && md5sum c1 c2 Gesendet: Dienstag, 11. März 2014 um 08:27 Uhr Von: joakim@comex.semailto:joakim@comex.se An: haskell-cafe@haskell.orgmailto:haskell-cafe@haskell.org Betreff: [Haskell-cafe] pure ghc Hello, If I compile my source code two time I would like to get the same binary. But currently when I run echo "main = return ()" > c.hs && ghc -fforce-recomp c.hs && xxd c > c1.hex && ghc -fforce-recomp c.hs && xxd c > c2.hex && diff c1.hex c2.hex my output is [1 of 1] Compiling Main ( c.hs, c.o ) Linking c ... [1 of 1] Compiling Main ( c.hs, c.o ) Linking c ... 55494c55494 < 00d8c50: 7400 6768 6333 3130 3830 5f30 2e63 0073 t.ghc31080_0.c.s ---
00d8c50: 7400 6768 6333 3130 3935 5f30 2e63 0073 t.ghc31095_0.c.s
So why does the binary differ? Is there a way to compile with ghc and get the same binary? Even though only one byte differ, the checksum (sha,md5,..) is completely changed… I’m running Linux and ghc 7.6.3. Regards, Joakim _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.orgmailto:Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe