* [PATCH 1/2] Revert "gcc-cross-canadian: Add symlink to real-ld alongside other symlinks"
@ 2022-09-16 7:41 Samuli Piippo
2022-09-16 7:41 ` [PATCH 2/2] gcc-cross-canadian: add default plugin linker Samuli Piippo
0 siblings, 1 reply; 3+ messages in thread
From: Samuli Piippo @ 2022-09-16 7:41 UTC (permalink / raw)
To: openembedded-core
This reverts commit cdd86896c8d29135f937968e9aa07f919cf543d3.
real-ld is always used if that is found, which means you cannot
switch between bfd and gold linkers using -fuse-ld gcc option.
Signed-off-by: Samuli Piippo <samuli.piippo@qt.io>
---
meta/recipes-devtools/gcc/gcc-cross-canadian.inc | 2 --
1 file changed, 2 deletions(-)
diff --git a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
index a87b446c4f..38c972aa7c 100644
--- a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
@@ -134,8 +134,6 @@ do_install () {
ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t$suffix $dest$t$suffix
done
- t=real-ld
- ln -sf ${BINRELPATH}/${TARGET_PREFIX}ld$suffix $dest$t$suffix
# libquadmath headers need to be available in the gcc libexec dir
install -d ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] gcc-cross-canadian: add default plugin linker
2022-09-16 7:41 [PATCH 1/2] Revert "gcc-cross-canadian: Add symlink to real-ld alongside other symlinks" Samuli Piippo
@ 2022-09-16 7:41 ` Samuli Piippo
2022-09-16 17:48 ` [OE-core] " Khem Raj
0 siblings, 1 reply; 3+ messages in thread
From: Samuli Piippo @ 2022-09-16 7:41 UTC (permalink / raw)
To: openembedded-core
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
Signed-off-by: Samuli Piippo <samuli.piippo@qt.io>
---
meta/recipes-devtools/gcc/gcc-cross-canadian.inc | 1 +
1 file changed, 1 insertion(+)
diff --git a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
index 38c972aa7c..c36e4cba81 100644
--- a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
@@ -9,6 +9,7 @@ GCCMULTILIB = "--enable-multilib"
require gcc-configure-common.inc
+EXTRA_OECONF += "--with-plugin-ld=ld"
EXTRA_OECONF_PATHS = "\
--with-gxx-include-dir=/not/exist${target_includedir}/c++/${BINV} \
--with-build-time-tools=${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin \
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [OE-core] [PATCH 2/2] gcc-cross-canadian: add default plugin linker
2022-09-16 7:41 ` [PATCH 2/2] gcc-cross-canadian: add default plugin linker Samuli Piippo
@ 2022-09-16 17:48 ` Khem Raj
0 siblings, 0 replies; 3+ messages in thread
From: Khem Raj @ 2022-09-16 17:48 UTC (permalink / raw)
To: Samuli Piippo; +Cc: openembedded-core
On Fri, Sep 16, 2022 at 12:41 AM Samuli Piippo <samuli.piippo@gmail.com> wrote:
>
> 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
>
> Signed-off-by: Samuli Piippo <samuli.piippo@qt.io>
> ---
> meta/recipes-devtools/gcc/gcc-cross-canadian.inc | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
> index 38c972aa7c..c36e4cba81 100644
> --- a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
> +++ b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
> @@ -9,6 +9,7 @@ GCCMULTILIB = "--enable-multilib"
>
> require gcc-configure-common.inc
>
> +EXTRA_OECONF += "--with-plugin-ld=ld"
this looks fine to me. Pointing to ld is good here because then if ld
is bfd/gold/lld it always works.
> EXTRA_OECONF_PATHS = "\
> --with-gxx-include-dir=/not/exist${target_includedir}/c++/${BINV} \
> --with-build-time-tools=${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin \
> --
> 2.25.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#170781): https://lists.openembedded.org/g/openembedded-core/message/170781
> Mute This Topic: https://lists.openembedded.org/mt/93718003/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-09-16 17:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-16 7:41 [PATCH 1/2] Revert "gcc-cross-canadian: Add symlink to real-ld alongside other symlinks" Samuli Piippo
2022-09-16 7:41 ` [PATCH 2/2] gcc-cross-canadian: add default plugin linker Samuli Piippo
2022-09-16 17:48 ` [OE-core] " Khem Raj
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.