public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [PATCH] gcc: remove paths to sysroot from configargs.h and checksum-options for gcc-cross-canadian
@ 2024-07-12 11:00 Oleksandr Hnatiuk
  2024-07-12 11:17 ` [OE-core] " Alexander Kanavin
  0 siblings, 1 reply; 11+ messages in thread
From: Oleksandr Hnatiuk @ 2024-07-12 11:00 UTC (permalink / raw)
  To: openembedded-core

Copy fixes for gcc-cross (84a78f46d594 and 0ead8cbdfb96) to gcc-cross-canadian.
This will improve (but not fix) reproducibility of gcc-cross-canadian.

Signed-off-by: Oleksandr Hnatiuk <ohnatiuk@cisco.com>
---
 meta/recipes-devtools/gcc/gcc-cross-canadian.inc | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
index 7c4233c21157..127f97473f91 100644
--- a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
@@ -64,6 +64,20 @@ do_configure () {
 }
 
 do_compile () {
+	# Prevent native/host sysroot path from being used in configargs.h header,
+	# as it will be rewritten when used by other sysroots preventing support
+	# for gcc plugins
+	oe_runmake configure-gcc
+	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)
 }
-- 
2.35.6



^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-07-18  8:37 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-12 11:00 [PATCH] gcc: remove paths to sysroot from configargs.h and checksum-options for gcc-cross-canadian Oleksandr Hnatiuk
2024-07-12 11:17 ` [OE-core] " Alexander Kanavin
2024-07-12 19:22   ` Oleksandr Hnatiuk
2024-07-15 12:30     ` [OE-core] " Alexander Kanavin
2024-07-17  9:56   ` [PATCH v2] " Oleksandr Hnatiuk
2024-07-17  9:59     ` Oleksandr Hnatiuk
2024-07-18  0:21     ` [OE-core] " Denys Dmytriyenko
2024-07-18  7:40       ` Oleksandr Hnatiuk -X (ohnatiuk - GLOBALLOGIC INC at Cisco)
2024-07-18  8:09         ` Richard Purdie
     [not found]     ` <17E326C1F13DA2A9.25516@lists.openembedded.org>
2024-07-18  2:15       ` Denys Dmytriyenko
2024-07-18  8:36     ` Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox