setting -fdebug-prefix-map via envvar

Eli Schwartz eschwartz at archlinux.org
Thu Jun 25 23:54:32 UTC 2020


On 6/25/20 7:42 PM, Bill Allombert wrote:
> Hello,
> 
> Is it possible to set -fdebug-prefix-map via an environment variable or
> a similar mechanism rather than through the command line ?
> 
> The issue is that adding -fdebug-prefix-map=PREFIX to CFLAGS
> leads to PREFIX leaking in buildlogs and in generated Makefiles and 
> similar files that can end up inside packages, making previously
> reproducible packages unreproducible.

I'm not aware of any such mechanism.

On the other hand, generated Makefiles should really not end up inside
packages, unless there's some rationale I'm very unaware of. The very
fact that they encode the PREFIX demonstrates their role in not being
part of the final distributed artifact. While in some cases you do want
to distribute the build system, notably for DKMS kernel modules, if
those have autotools build systems you also want to only run ./configure
at dkms time, not during the distro packaging. I mostly recall Makefiles
being distributed in Arch rubygem packages which don't really have a
good install routine as I think Ruby believes it reasonable to just cp
your entire build directory over.

Moreover, the problem isn't limited to fdebug-prefix-map, since these
very frequently contain full paths e.g. in the autotools variables

abs_builddir abs_srcdir abs_top_builddir abs_top_srcdir install_sh
ACLOCAL AUTOCONF AUTOHEADER AUTOMAKE

CMake is even worse since it obsessively uses absolute paths for every
single filename in the generated Makefiles, including yes, compiler
command lines.

-- 
Eli Schwartz
Arch Linux Bug Wrangler and Trusted User

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1601 bytes
Desc: OpenPGP digital signature
URL: <http://lists.reproducible-builds.org/pipermail/rb-general/attachments/20200625/7b81834f/attachment.sig>


More information about the rb-general mailing list