Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] gcc-target.inc: Fix gcc symlink handling for multilib support
@ 2024-11-13 12:51 Deepthi.Hemraj
  2024-11-13 13:23 ` [OE-core] " Richard Purdie
  0 siblings, 1 reply; 4+ messages in thread
From: Deepthi.Hemraj @ 2024-11-13 12:51 UTC (permalink / raw)
  To: openembedded-core; +Cc: Randy.MacLeod, Naveen.Gowda, Sundeep.Kokkonda

From: Deepthi Hemraj <Deepthi.Hemraj@windriver.com>

Enabling multilib support and adding both lib32-gcc-symlinks and gcc-symlinks
to the image installation results in a conflict between
gcc-symlinks-13.3.0-r0.corei7_64 and lib32-gcc-symlinks-13.3.0-r0.corei7_32.
Following error occurs because of the conflict:
"file /usr/bin/gcc conflicts between attempted installs of gcc-symlinks-13.3.0-r0.corei7_64 and lib32-gcc-symlinks-13.3.0-r0.corei7_32"

The conflict occurs because both packages try to install files in the same location,
causing installation errors during the build process.

Updated the gcc target recipe to correctly handle symlinks for multilib support by using ${MLPREFIX}gcc
instead of just gcc for the gcc binary symlink in ${PN}-symlinks.
This ensures that the symlinks point to the appropriate multilib gcc binary for 32-bit and 64-bit configurations.

Signed-off-by: Deepthi Hemraj <Deepthi.Hemraj@windriver.com>
---
 meta/recipes-devtools/gcc/gcc-target.inc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-devtools/gcc/gcc-target.inc b/meta/recipes-devtools/gcc/gcc-target.inc
index 6b47c10413..ff59eb1b52 100644
--- a/meta/recipes-devtools/gcc/gcc-target.inc
+++ b/meta/recipes-devtools/gcc/gcc-target.inc
@@ -71,7 +71,7 @@ FILES:${PN}-dev = "\
 "
 FILES:${PN}-symlinks = "\
     ${bindir}/cc \
-    ${bindir}/gcc \
+    ${bindir}/${MLPREFIX}gcc \
     ${bindir}/gccbug \
 "
 
@@ -182,7 +182,7 @@ do_install () {
 		ln -sf gfortran f95 || true
 	fi
 	ln -sf ${TARGET_PREFIX}g++ g++
-	ln -sf ${TARGET_PREFIX}gcc gcc
+	ln -sf ${TARGET_PREFIX}gcc ${MLPREFIX}gcc
 	ln -sf ${TARGET_PREFIX}cpp cpp
 	ln -sf ${TARGET_PREFIX}gcov gcov
 	ln -sf ${TARGET_PREFIX}gcov-tool gcov-tool
-- 
2.43.0



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

end of thread, other threads:[~2024-11-13 21:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-13 12:51 [PATCH] gcc-target.inc: Fix gcc symlink handling for multilib support Deepthi.Hemraj
2024-11-13 13:23 ` [OE-core] " Richard Purdie
2024-11-13 19:58   ` Randy MacLeod
2024-11-13 21:00     ` Richard Purdie

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