summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-target.inc
diff options
context:
space:
mode:
authorOleksandr Hnatiuk <ohnatiuk@cisco.com>2024-07-22 01:34:58 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-08-03 07:56:10 +0100
commitf1ad5be4337c5d45c0f1bed48184336e9ab1fad8 (patch)
tree98d9004c5ee43449c1902e4f487e170a02b9451f /meta/recipes-devtools/gcc/gcc-target.inc
parentee83d0fdae1482583f156d8b8f217c170d9de473 (diff)
downloadpoky-f1ad5be4337c5d45c0f1bed48184336e9ab1fad8.tar.gz
gcc: remove paths to sysroot from configargs.h and checksum-options for gcc-cross-canadian
Apply fixes from gcc-cross (84a78f46d594 and 0ead8cbdfb96) to gcc-cross-canadian. This will improve (but not fix) reproducibility of gcc-cross-canadian. Also move this code to functions to avoid code duplication. [RP: Tweak patch to make the function parameters clear and fix quoting issues ensuring the code exactly matches the original replacements with an additional parameter.] (From OE-Core rev: 350ff7d53f7506de2bc01f0efc569b8294b9afea) Signed-off-by: Oleksandr Hnatiuk <ohnatiuk@cisco.com> Signed-off-by: Denys Dmytriyenko <denys@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-target.inc')
-rw-r--r--meta/recipes-devtools/gcc/gcc-target.inc16
1 files changed, 2 insertions, 14 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-target.inc b/meta/recipes-devtools/gcc/gcc-target.inc
index e9187fc444..c847838ec7 100644
--- a/meta/recipes-devtools/gcc/gcc-target.inc
+++ b/meta/recipes-devtools/gcc/gcc-target.inc
@@ -132,20 +132,8 @@ FILES:${PN}-doc = "\
132" 132"
133 133
134do_compile () { 134do_compile () {
135 # Prevent full target sysroot path from being used in configargs.h header, 135 remove_sysroot_paths_from_configargs '/'
136 # as it will be rewritten when used by other sysroots preventing support 136 remove_sysroot_paths_from_checksum_options '${STAGING_DIR_TARGET}' '/'
137 # for gcc plugins. Additionally the path is embeddeded into the output
138 # binary, this prevents building a reproducible binary.
139 oe_runmake configure-gcc
140 sed -i 's@${STAGING_DIR_TARGET}@/@g' ${B}/gcc/configargs.h
141 sed -i 's@${STAGING_DIR_HOST}@/@g' ${B}/gcc/configargs.h
142
143 # Prevent sysroot/workdir paths from being used in checksum-options.
144 # checksum-options is used to generate a checksum which is embedded into
145 # the output binary.
146 oe_runmake TARGET-gcc=checksum-options all-gcc
147 sed -i 's@${DEBUG_PREFIX_MAP}@@g' ${B}/gcc/checksum-options
148 sed -i 's@${STAGING_DIR_TARGET}@/@g' ${B}/gcc/checksum-options
149 137
150 oe_runmake all-host 138 oe_runmake all-host
151} 139}