From: John Keeping <john@metanate.com>
To: buildroot@buildroot.org
Cc: Romain Naour <romain.naour@gmail.com>,
John Keeping <john@metanate.com>,
Giulio Benetti <giulio.benetti@benettiengineering.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
"Yann E. MORIN" <yann.morin.1998@free.fr>
Subject: [Buildroot] [PATCH v2] package/gcc: map debug prefix when reproducible
Date: Tue, 7 Feb 2023 19:58:10 +0000 [thread overview]
Message-ID: <20230207195810.2016594-1-john@metanate.com> (raw)
When building with BR2_REPRODUCIBLE the toolchain wrapper passes
-fdebug-prefix-map for all packages that are built. But this doesn't
affect the target libraries (like libgcc) built by GCC's build system.
GCC 4.3 added a configure option to set the debug prefix map for these
libraries, which is used here to avoid encoding potentially
non-reproducible build paths into the debug data.
Signed-off-by: John Keeping <john@metanate.com>
---
Changes since v1:
- Add the option to GCC common config, not just gcc-final
package/gcc/gcc.mk | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk
index ec6f3b550a..6dfd93f2a4 100644
--- a/package/gcc/gcc.mk
+++ b/package/gcc/gcc.mk
@@ -84,6 +84,10 @@ HOST_GCC_COMMON_CONF_OPTS = \
--with-bugurl="http://bugs.buildroot.net/" \
--without-zstd
+ifeq ($(BR2_REPRODUCIBLE),y)
+HOST_GCC_COMMON_CONF_OPTS += --with-debug-prefix-map=$(BASE_DIR)=buildroot
+endif
+
# Don't build documentation. It takes up extra space / build time,
# and sometimes needs specific makeinfo versions to work
HOST_GCC_COMMON_CONF_ENV = \
--
2.39.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next reply other threads:[~2023-02-07 19:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-07 19:58 John Keeping [this message]
2023-02-07 22:47 ` [Buildroot] [PATCH v2] package/gcc: map debug prefix when reproducible Yann E. MORIN
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230207195810.2016594-1-john@metanate.com \
--to=john@metanate.com \
--cc=buildroot@buildroot.org \
--cc=giulio.benetti@benettiengineering.com \
--cc=romain.naour@gmail.com \
--cc=thomas.petazzoni@bootlin.com \
--cc=yann.morin.1998@free.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox