diff options
author | Nathan Rossi <nathan@nathanrossi.com> | 2019-11-30 10:47:24 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-12-06 14:41:28 +0000 |
commit | 098ef4f019f8fdaba9da08119eddbb12f6cc9b6a (patch) | |
tree | 7be43db97e80a8ea735f0b7c654d38dc9980bde4 /meta | |
parent | eb308499c26dc085e39874da4b0634bc20040f8b (diff) | |
download | poky-098ef4f019f8fdaba9da08119eddbb12f6cc9b6a.tar.gz |
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>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-cross.inc | 7 | ||||
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-target.inc | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-cross.inc b/meta/recipes-devtools/gcc/gcc-cross.inc index 06ba3ccd15..6784d9673f 100644 --- a/meta/recipes-devtools/gcc/gcc-cross.inc +++ b/meta/recipes-devtools/gcc/gcc-cross.inc | |||
@@ -68,6 +68,13 @@ do_compile () { | |||
68 | sed -i 's@${STAGING_DIR_TARGET}@/host@g' ${B}/gcc/configargs.h | 68 | sed -i 's@${STAGING_DIR_TARGET}@/host@g' ${B}/gcc/configargs.h |
69 | sed -i 's@${STAGING_DIR_HOST}@/host@g' ${B}/gcc/configargs.h | 69 | sed -i 's@${STAGING_DIR_HOST}@/host@g' ${B}/gcc/configargs.h |
70 | 70 | ||
71 | # Prevent sysroot/workdir paths from being used in checksum-options. | ||
72 | # checksum-options is used to generate a checksum which is embedded into | ||
73 | # the output binary. | ||
74 | oe_runmake TARGET-gcc=checksum-options all-gcc | ||
75 | sed -i 's@${DEBUG_PREFIX_MAP}@@g' ${B}/gcc/checksum-options | ||
76 | sed -i 's@${STAGING_DIR_HOST}@/host@g' ${B}/gcc/checksum-options | ||
77 | |||
71 | oe_runmake all-host configure-target-libgcc | 78 | oe_runmake all-host configure-target-libgcc |
72 | (cd ${B}/${TARGET_SYS}/libgcc; oe_runmake enable-execute-stack.c unwind.h md-unwind-support.h sfp-machine.h gthr-default.h) | 79 | (cd ${B}/${TARGET_SYS}/libgcc; oe_runmake enable-execute-stack.c unwind.h md-unwind-support.h sfp-machine.h gthr-default.h) |
73 | # now generate script to drive testing | 80 | # 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 987e88d32c..18d078db0a 100644 --- a/meta/recipes-devtools/gcc/gcc-target.inc +++ b/meta/recipes-devtools/gcc/gcc-target.inc | |||
@@ -145,6 +145,13 @@ do_compile () { | |||
145 | sed -i 's@${STAGING_DIR_TARGET}@/@g' ${B}/gcc/configargs.h | 145 | sed -i 's@${STAGING_DIR_TARGET}@/@g' ${B}/gcc/configargs.h |
146 | sed -i 's@${STAGING_DIR_HOST}@/@g' ${B}/gcc/configargs.h | 146 | sed -i 's@${STAGING_DIR_HOST}@/@g' ${B}/gcc/configargs.h |
147 | 147 | ||
148 | # Prevent sysroot/workdir paths from being used in checksum-options. | ||
149 | # checksum-options is used to generate a checksum which is embedded into | ||
150 | # the output binary. | ||
151 | oe_runmake TARGET-gcc=checksum-options all-gcc | ||
152 | sed -i 's@${DEBUG_PREFIX_MAP}@@g' ${B}/gcc/checksum-options | ||
153 | sed -i 's@${STAGING_DIR_TARGET}@/@g' ${B}/gcc/checksum-options | ||
154 | |||
148 | oe_runmake all-host | 155 | oe_runmake all-host |
149 | } | 156 | } |
150 | 157 | ||