Message ID | 20220916074105.215147-1-samuli.piippo@qt.io |
---|---|
State | Accepted, archived |
Commit | 53ae417c63a4a7ff4a729d3653a31cf1c0758f10 |
Headers | show |
Series | [1/2] Revert "gcc-cross-canadian: Add symlink to real-ld alongside other symlinks" | expand |
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] > -=-=-=-=-=-=-=-=-=-=-=- >
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/
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(-)