mirror of
https://git.yoctoproject.org/poky
synced 2026-04-03 02:02:21 +02: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:
committed by
Richard Purdie
parent
eb308499c2
commit
098ef4f019
@@ -68,6 +68,13 @@ do_compile () {
|
||||
sed -i 's@${STAGING_DIR_TARGET}@/host@g' ${B}/gcc/configargs.h
|
||||
sed -i 's@${STAGING_DIR_HOST}@/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_HOST}@/host@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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user