summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-cross.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-cross.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-cross.inc')
-rw-r--r--meta/recipes-devtools/gcc/gcc-cross.inc15
1 files changed, 2 insertions, 13 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-cross.inc b/meta/recipes-devtools/gcc/gcc-cross.inc
index c04177df5a..68e33c7358 100644
--- a/meta/recipes-devtools/gcc/gcc-cross.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross.inc
@@ -63,19 +63,8 @@ do_compile () {
63 export CXXFLAGS_FOR_TARGET="${TARGET_CXXFLAGS}" 63 export CXXFLAGS_FOR_TARGET="${TARGET_CXXFLAGS}"
64 export LDFLAGS_FOR_TARGET="${TARGET_LDFLAGS}" 64 export LDFLAGS_FOR_TARGET="${TARGET_LDFLAGS}"
65 65
66 # Prevent native/host sysroot path from being used in configargs.h header, 66 remove_sysroot_paths_from_configargs '/host'
67 # as it will be rewritten when used by other sysroots preventing support 67 remove_sysroot_paths_from_checksum_options '${STAGING_DIR_HOST}' '/host'
68 # for gcc plugins
69 oe_runmake configure-gcc
70 sed -i 's@${STAGING_DIR_TARGET}@/host@g' ${B}/gcc/configargs.h
71 sed -i 's@${STAGING_DIR_HOST}@/host@g' ${B}/gcc/configargs.h
72
73 # Prevent sysroot/workdir paths from being used in checksum-options.
74 # checksum-options is used to generate a checksum which is embedded into
75 # the output binary.
76 oe_runmake TARGET-gcc=checksum-options all-gcc
77 sed -i 's@${DEBUG_PREFIX_MAP}@@g' ${B}/gcc/checksum-options
78 sed -i 's@${STAGING_DIR_HOST}@/host@g' ${B}/gcc/checksum-options
79 68
80 oe_runmake all-host configure-target-libgcc 69 oe_runmake all-host configure-target-libgcc
81 (cd ${B}/${TARGET_SYS}/libgcc; oe_runmake enable-execute-stack.c unwind.h md-unwind-support.h sfp-machine.h gthr-default.h) 70 (cd ${B}/${TARGET_SYS}/libgcc; oe_runmake enable-execute-stack.c unwind.h md-unwind-support.h sfp-machine.h gthr-default.h)