[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#932098: gcc-8: LTO with -fdebug-prefix-map results in unreproducible build



Package: gcc-8
Version: 8.3.0-19
Severity: normal

Dear Maintainer,

The e2fsprogs package is currently not reproducible.  See:

https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/e2fsprogs.html

This is caused by an unfortunate interaction between LTO and the flags
from dpkg-buildflags which are meant to try to create reproducible
builds in the debug symbols.

% dpkg-buildflags  --get CFLAGS
-g -O2 -fdebug-prefix-map=/tmp/gbp/e2fsprogs-1.45.3=. -fstack-protector-strong -Wformat -Werror=format-security

While this does a good thing in that it maps away the build pathname in
the debugsym files, to prevent reproducible build problems, it results
in an extremely perverse result for LTO builds, because this debug
option --- complete with build pathname --- is encoded in the
gnu.lto_.opts section.  :-(

This is leaving me in a difficult position, since it means I have to
decide which is more important to Debian --- LTO builds, or reproducible
builds.   I suspect I'll eventually decide that reproducible builds are
more important, since the bloat to e2fsprogs is only 60k or so.  But I
figure I'll file a bug against gcc-8 in the hopes that it's not too hard
to fix this problem.

Thanks!!


-- System Information:
Debian Release: 10.0
  APT prefers stable
  APT policy: (900, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 5.1.0-00062-gc804857673ae (SMP w/8 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8), LANGUAGE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)


Reply to: