1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-02 01:19:52 +00:00

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.

(From OE-Core rev: 0ead8cbdfb96c4fcbefd24c6647d0f50599f45b3)

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Nathan Rossi
2019-11-30 10:47:24 +00:00
committed by Richard Purdie
parent eb308499c2
commit 098ef4f019
2 changed files with 14 additions and 0 deletions
+7
View File
@@ -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
}