summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-target.inc
diff options
context:
space:
mode:
authorOleksandr Hnatiuk <ohnatiuk@cisco.com>2025-03-14 14:57:54 +0530
committerSteve Sakoman <steve@sakoman.com>2025-03-19 07:25:56 -0700
commit8f52a92dbb664155a1969ca443912c40b257cb8e (patch)
treeb1d0e33f57a5829acd768907ed7bde120c6ed99d /meta/recipes-devtools/gcc/gcc-target.inc
parent6b6beab93993ef4100df45d8de77e24acfc66e5e (diff)
downloadpoky-8f52a92dbb664155a1969ca443912c40b257cb8e.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) (From OE-Core rev: b1aa13b9f656666458189d4dae0c25564abe2f25) 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> (cherry picked from commit f1ad5be4337c5d45c0f1bed48184336e9ab1fad8) Signed-off-by: Sana Kazi <sanakazi720@gmail.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
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 7dac3ef422..f51d94cd65 100644
--- a/meta/recipes-devtools/gcc/gcc-target.inc
+++ b/meta/recipes-devtools/gcc/gcc-target.inc
@@ -140,20 +140,8 @@ FILES:${PN}-doc = "\
140" 140"
141 141
142do_compile () { 142do_compile () {
143 # Prevent full target sysroot path from being used in configargs.h header, 143 remove_sysroot_paths_from_configargs '/'
144 # as it will be rewritten when used by other sysroots preventing support 144 remove_sysroot_paths_from_checksum_options '${STAGING_DIR_TARGET}' '/'
145 # for gcc plugins. Additionally the path is embeddeded into the output
146 # binary, this prevents building a reproducible binary.
147 oe_runmake configure-gcc
148 sed -i 's@${STAGING_DIR_TARGET}@/@g' ${B}/gcc/configargs.h
149 sed -i 's@${STAGING_DIR_HOST}@/@g' ${B}/gcc/configargs.h
150
151 # Prevent sysroot/workdir paths from being used in checksum-options.
152 # checksum-options is used to generate a checksum which is embedded into
153 # the output binary.
154 oe_runmake TARGET-gcc=checksum-options all-gcc
155 sed -i 's@${DEBUG_PREFIX_MAP}@@g' ${B}/gcc/checksum-options
156 sed -i 's@${STAGING_DIR_TARGET}@/@g' ${B}/gcc/checksum-options
157 145
158 oe_runmake all-host 146 oe_runmake all-host
159} 147}