Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/gcc/gcc-final: map debug prefix when reproducible
@ 2023-02-06 16:26 John Keeping
  2023-02-07 13:55 ` Yann E. MORIN
  0 siblings, 1 reply; 5+ messages in thread
From: John Keeping @ 2023-02-06 16:26 UTC (permalink / raw)
  To: buildroot; +Cc: Romain Naour, John Keeping, Giulio Benetti, Thomas Petazzoni

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>
---
 package/gcc/gcc-final/gcc-final.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/package/gcc/gcc-final/gcc-final.mk b/package/gcc/gcc-final/gcc-final.mk
index aa883beb7b..5f222a324c 100644
--- a/package/gcc/gcc-final/gcc-final.mk
+++ b/package/gcc/gcc-final/gcc-final.mk
@@ -108,6 +108,10 @@ else
 HOST_GCC_FINAL_CONF_OPTS += --disable-libgomp
 endif
 
+ifeq ($(BR2_REPRODUCIBLE),y)
+HOST_GCC_FINAL_CONF_OPTS += --with-debug-prefix-map=$(BASE_DIR)=buildroot
+endif
+
 # End with user-provided options, so that they can override previously
 # defined options.
 HOST_GCC_FINAL_CONF_OPTS += \
-- 
2.39.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-02-08  9:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-06 16:26 [Buildroot] [PATCH] package/gcc/gcc-final: map debug prefix when reproducible John Keeping
2023-02-07 13:55 ` Yann E. MORIN
2023-02-07 20:05   ` John Keeping
2023-02-08  8:05     ` Arnout Vandecappelle
2023-02-08  9:34       ` John Keeping

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox