Dear GCC developers, I would like a compiler that produces identical object files when run several times with identical source files and headers.
I noticed the documentation of -frandom-seed in the GCC man page and found a simple way to make compiles reproducible while still reliably matching object files with coverage data files: use a hash code of all information affecting the object file (i.e. preprocessed source file, compiler version, and compiler settings). Alternatively, generate the object file with a random seed of zero, hash it, and regenerate the necessary parts using the hash as a new seed. What do you think of these techniques? Furthermore, names of source files appear in object files, so if I compile two identical source files foo.c and bar.c, I get two different object files. Names of source files are obviously useful to debuggers looking for a program's source, but gcc 4.0.2 20051125 (Red Hat 4.0.2-8) includes them even when -g is off. Is there a good reason for this? -- Matt McCutchen [EMAIL PROTECTED] http://hashproduct.metaesthetics.net/