From 36f19e6393463dde46d924bf4842bf262729730c Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Thu, 15 Sep 2022 11:36:30 +0000 Subject: gcc-cross-canadian: add default plugin linker MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cherry-pick fix from oe-core (cf1bb16b7f9f81514feaf1e4ecffd9039387bb89) to fix multilib sdk issue where gcc is unable to find linker. Previous fix was in cdd86896c8d29135f937968e9aa07f919cf543d3 using real-ld symlink, but that prevented switching between bfd and gold linkers. Running compiler with debug arguments shows that collect2 tries and fails to find linker using the multilib triples: $ $CC -v -Wl,-debug ... Looking for 'real-ld' Looking for 'collect-ld' Looking for 'mips-oemllib32-linux-ld' Looking for 'mips-oe-linux-mips-oemllib32-linux-ld' ... collect2 version 12.2.0 ld_file_name = not found ... collect2: fatal error: cannot find ‘ld’ Using --with-plugin-ld=ld in gcc-cross-canadian builds to set default linker name for collect2, lets it find the linker correctly: Looking for 'real-ld' Looking for 'collect-ld' Looking for 'ld' ... collect2 version 12.2.0 ld_file_name = /usr/local/oecore-x86_64/sysroots/x86_64-oesdk-linux/usr/libexec/mips-oe-linux/gcc/mips-oe-linux/12.2.0/ld Swith between bfd and gold linker works as expected now: $ $CC -v -Wl,-debug -fuse-ld=gold ... Looking for 'real-ld' Looking for 'collect-ld' Looking for 'ld.gold' ... collect2 version 12.2.0 ld_file_name = /usr/local/oecore-x86_64/sysroots/x86_64-oesdk-linux/usr/libexec/i686-oe-linux/gcc/i686-oe-linux/12.2.0/ld.gold Change-Id: Ib824203dd3421cdccbc938ef6c8a71ad7c843cec Reviewed-by: Mikko Gronoff (cherry picked from commit f56b39570bfebea09a75f9ca82a9134914ab1131) Reviewed-by: Samuli Piippo --- meta-boot2qt-distro/recipes-devtools/gcc/gcc-cross-canadian_%.bbappend | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta-boot2qt-distro/recipes-devtools/gcc/gcc-cross-canadian_%.bbappend b/meta-boot2qt-distro/recipes-devtools/gcc/gcc-cross-canadian_%.bbappend index 395ca752..1f16b509 100644 --- a/meta-boot2qt-distro/recipes-devtools/gcc/gcc-cross-canadian_%.bbappend +++ b/meta-boot2qt-distro/recipes-devtools/gcc/gcc-cross-canadian_%.bbappend @@ -27,6 +27,8 @@ ## ############################################################################ +EXTRA_OECONF += "--with-plugin-ld=ld" + do_install:append () { # remove real-ld symlink rm ${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/real-ld${EXEEXT} -- cgit v1.2.3