Same binary, different md5sums

Mattias Brändström
Wed May 3 09:52:00 GMT 2006


Why does g++ generate binaries with different checksums when I compile 
my project at two different occasions with the same commands?

I realize that this is a fairly broad question, but I would like to know 
if there is anything in particular I should take into account when 
trying to generate binaries with the same checksum.

My code does not do any strange things that would change the way the 
code would look to the compiler. (No time dependent macros or any such 
thing, if that is even possible.) When I try and compile small "hello 
word" type programs the checksums are the same between different builds, 
but when I compile a slightly larger project they differ.

What do I need to do in order to be able to build binaries that will 
have the same checksum after two different builds? What can influence 
g++ to produce slightly different binaries? Perhaps there is a compiler 
option that I don't know about that will help me?

Any input on this will be greatly appreciated!


More information about the Gcc-help mailing list