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:;a=blob;f=gcc/dwarf2out.c;h=1b17f2bc1d5eef3d3ef70abf92a4d09da285d2b8;hb=HEAD#l24396

You can see the reproducibility issue here:
parent f66d0076
......@@ -646,11 +646,14 @@ AM_CONDITIONAL([HAVE_SPHINXBUILD], test "$SPHINXBUILD" != "false")
filtered_cflags=$(echo -n "$CFLAGS" | sed 's/\W-f\S*-prefix-map=\S*\W/ /g')
filtered_cppflags=$(echo -n "$CPPFLAGS" | sed 's/\W-f\S*-prefix-map=\S*\W/ /g')
result_msg_base=" Knot DNS $VERSION
Target: $host_os $host_cpu
Compiler: ${CC}
CFLAGS: ${filtered_cflags} ${filtered_cppflags}
LibURCU: ${liburcu_LIBS} ${liburcu_CFLAGS}
GnuTLS: ${gnutls_LIBS} ${gnutls_CFLAGS}
Markdown is supported
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