https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92717

--- Comment #8 from Markus Dreseler <gnu.org at mrks dot info> ---
Interesting. Is this implementation documented somewhere?

I can confirm that disabling ASLR results in reproducible gchs:

# setarch $(uname -m) -R /usr/bin/c++ -x c++-header -include test.hxx -o
test.hxx.gch -c test.hxx.cxx && md5sum test.hxx.gch
54486c6ffc08db87d4b58792dcb46091  test.hxx.gch
# setarch $(uname -m) -R /usr/bin/c++ -x c++-header -include test.hxx -o
test.hxx.gch -c test.hxx.cxx && md5sum test.hxx.gch
54486c6ffc08db87d4b58792dcb46091  test.hxx.gch

For CI builds of trusted files, this might be an option, but generally setting
the ADDR_NO_RANDOMIZE personality for gcc when gchs are build does not sound
like a good approach.

Reply via email to