Bug#877359: clang: precompiled headers are not reproducible

Rebecca N. Palmer rebecca_palmer at zoho.com
Sat Oct 7 18:02:59 UTC 2017


On 07/10/17 14:09, Rebecca N. Palmer wrote:
> The problems with current beignet look to be:
> 
> - file timestamps in INPUT_FILES_BLOCK (some of beignet's .h files are 
> script-generated).  This part can be fixed in beignet.

That works (COMMAND touch -d '@$ENV{SOURCE_DATE_EPOCH}' 
${OCL_OBJECT_DIR}/include/*.h right before building the .pch).

> - build path captured in ORIGINAL_PCH_DIR.  _Might_ be fixable in 
> beignet by using clang (...) > /path/to/beignet.pch instead of clang 
> (...) -o /path/to/beignet.pch, but that changes other things and I 
> haven't yet checked whether the result works.

That doesn't - the file names are only relative paths if -isysroot is 
set to an absolute path, and HEADER_SEARCH_OPTIONS records (among other 
things) the -isysroot setting, so there's always an absolute build path 
somewhere.  However, build path independence is only required in the 
stricter version of the reproducibility standard.

As expected, the OPENCL_EXTENSION_TYPES issue doesn't happen in clang 
3.9 (but as that's being removed, it isn't a long-term option).



More information about the Pkg-llvm-team mailing list