This comment has been minimized.

It sounds like we just need to wait for clang and gcc to fix their reproducible build support.

clang

Support for -fdebug-prefix-map was added Oct 2015. Clang 3.7.0 was released Sep 2015, Clang 3.7.1 was released Jan 2016, and Clang 3.8 was released Mar 2016. My guess is the change may have missed the Clang 3.7 point release but was likely in Clang 3.8. Without detecting support for the flag, the test is skipped. This is why we don't see failures before Clang 3.8.

The linux-amd64-clang gomote image is using Clang 3.5, so we don't test this case on the builder.

Support for -fdebug-prefix-map is more widespread, but some versions don't quite work. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69821 shows that while -fdebug-prefix-map did the right thing to the debug symbols, gcc then included that option in the DW_AT_producer field of the dwarf. If the goal of -fdebug-prefix-map=old=new is to eliminate the string "old" from the binary, writing down that option into the binary defeats the purpose. The bug entry says the target milestone is gcc 6 and the discussion there sounds like the decision was not to backport to gcc 5. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=819176, the Debian entry for this bug, suggests it is fixed in Debian's gcc 5.4.0. It is unclear whether that means the fix is only in Debian's copy or is upstream. It's unclear to me when DW_AT_producer first started recording the whole command line.

Obviously the tests do pass on our gcc builders, and I confirmed that (unlike the clang builder) the gcc on the builder does support the flag, so the test should be running. Perhaps gcc 4.3 had a related problem.

The builders are on clang 3.9 and it's working there too. Going to assume this is now fixed and that the problem before was that either the specific clang 3.8 being used didn't have -fdebug-prefix-map or did not implement it correctly.