[oe-commits] [openembedded-core] 04/25: gcc: Improve build reproduciblity
git at git.openembedded.org
git at git.openembedded.org
Thu Dec 5 20:42:35 UTC 2019
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit 0ead8cbdfb96c4fcbefd24c6647d0f50599f45b3
Author: Nathan Rossi <nathan at nathanrossi.com>
AuthorDate: Sat Nov 30 10:47:24 2019 +0000
gcc: Improve build reproduciblity
Prevent the gcc embedded checksum from containing a checksum that was
computed with build specific paths. The checksum-options file included
the value of LINKER/LDFLAGS which contains DEBUG_PREFIX_MAP and
STAGING_DIR_TARGET.
Signed-off-by: Nathan Rossi <nathan at nathanrossi.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/recipes-devtools/gcc/gcc-cross.inc | 7 +++++++
meta/recipes-devtools/gcc/gcc-target.inc | 7 +++++++
2 files changed, 14 insertions(+)
diff --git a/meta/recipes-devtools/gcc/gcc-cross.inc b/meta/recipes-devtools/gcc/gcc-cross.inc
index 06ba3cc..6784d96 100644
--- a/meta/recipes-devtools/gcc/gcc-cross.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross.inc
@@ -68,6 +68,13 @@ do_compile () {
sed -i 's@${STAGING_DIR_TARGET}@/host at g' ${B}/gcc/configargs.h
sed -i 's@${STAGING_DIR_HOST}@/host at g' ${B}/gcc/configargs.h
+ # Prevent sysroot/workdir paths from being used in checksum-options.
+ # checksum-options is used to generate a checksum which is embedded into
+ # the output binary.
+ oe_runmake TARGET-gcc=checksum-options all-gcc
+ sed -i 's@${DEBUG_PREFIX_MAP}@@g' ${B}/gcc/checksum-options
+ sed -i 's@${STAGING_DIR_HOST}@/host at g' ${B}/gcc/checksum-options
+
oe_runmake all-host configure-target-libgcc
(cd ${B}/${TARGET_SYS}/libgcc; oe_runmake enable-execute-stack.c unwind.h md-unwind-support.h sfp-machine.h gthr-default.h)
# now generate script to drive testing
diff --git a/meta/recipes-devtools/gcc/gcc-target.inc b/meta/recipes-devtools/gcc/gcc-target.inc
index 987e88d..18d078d 100644
--- a/meta/recipes-devtools/gcc/gcc-target.inc
+++ b/meta/recipes-devtools/gcc/gcc-target.inc
@@ -145,6 +145,13 @@ do_compile () {
sed -i 's@${STAGING_DIR_TARGET}@/@g' ${B}/gcc/configargs.h
sed -i 's@${STAGING_DIR_HOST}@/@g' ${B}/gcc/configargs.h
+ # Prevent sysroot/workdir paths from being used in checksum-options.
+ # checksum-options is used to generate a checksum which is embedded into
+ # the output binary.
+ oe_runmake TARGET-gcc=checksum-options all-gcc
+ sed -i 's@${DEBUG_PREFIX_MAP}@@g' ${B}/gcc/checksum-options
+ sed -i 's@${STAGING_DIR_TARGET}@/@g' ${B}/gcc/checksum-options
+
oe_runmake all-host
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list