package/gcc: map debug prefix when reproducible
PATCH v2 1/1 package/gcc: map debug prefix when reproducible
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.
---
Changes since v1:
- Add the option to GCC common config, not just gcc-final
package/gcc/gcc.mk | 4 ++++ 1 file changed, 4 insertions(+)
package/gcc/gcc.mk +4 -0
@@ -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 = \
Signature · 6 lines
2.39.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
John, All,
On 2023-02-07 19:58 +0000, John Keeping spake thusly:
Quoted 9 lines
When building with
BR2_REPRODUCIBLEthe 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 <[email protected]>
After burnng through ~80% of my battery testing this: applied to master, thanks.
Regards,
Yann E. MORIN.
Quoted 29 lines
---
Changes since v1:
- Add the option to GCC common config, not just gcc-finalpackage/gcc/gcc.mk | 4 ++++ 1 file changed, 4 insertions(+)package/gcc/gcc.mk +4
-0@@ -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 = \Signature · 6 lines
2.39.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot