Skip to content
Snippets Groups Projects
Commit 804f29a6 authored by Daniel Kahn Gillmor's avatar Daniel Kahn Gillmor
Browse files

Avoid recording -fdebug-prefix-map= from CFLAGS and CPPFLAGS

It's not particularly useful to record -fdebug-prefix-map= and friends
in the list of used CFLAGS arguments.  Additionally, since these
compiler arguments are typically used to make reproducible binary
artifacts by stripping out information about the ephemeral build path
used, embedding them in the resulting binary actually re-introduces
the reproducibility problem.

Note that gcc itself omits these values from the DWARF information
that it generates:

https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/dwarf2out.c;h=1b17f2bc1d5eef3d3ef70abf92a4d09da285d2b8;hb=HEAD#l24396

You can see the reproducibility issue here:

    https://tests.reproducible-builds.org/debian/dbd/unstable/amd64/knot_2.7.6-2.diffoscope.html
parent f66d0076
1 merge request!987Avoid recording -fdebug-prefix-map= from CFLAGS and CPPFLAGS
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment