diff options
author | Samuli Piippo <samuli.piippo@gmail.com> | 2022-09-16 07:41:05 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-09-28 08:02:11 +0100 |
commit | 864e65f0f1aafc9dc7bba46a0ea46e10827c8e21 (patch) | |
tree | c9c610ef3b8e9e301e62f27939d0f71a06d8375b | |
parent | 27086f89c81db23658fb3c427a7fbfa57675907b (diff) | |
download | poky-864e65f0f1aafc9dc7bba46a0ea46e10827c8e21.tar.gz |
gcc-cross-canadian: add default plugin linker
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
(From OE-Core rev: f4174b3bde5ec91293619fac3258f35153363c51)
Signed-off-by: Samuli Piippo <samuli.piippo@qt.io>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit cf1bb16b7f9f81514feaf1e4ecffd9039387bb89)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-cross-canadian.inc | 1 |
1 files changed, 1 insertions, 0 deletions
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" | |||
9 | 9 | ||
10 | require gcc-configure-common.inc | 10 | require gcc-configure-common.inc |
11 | 11 | ||
12 | EXTRA_OECONF += "--with-plugin-ld=ld" | ||
12 | EXTRA_OECONF_PATHS = "\ | 13 | EXTRA_OECONF_PATHS = "\ |
13 | --with-gxx-include-dir=/not/exist${target_includedir}/c++/${BINV} \ | 14 | --with-gxx-include-dir=/not/exist${target_includedir}/c++/${BINV} \ |
14 | --with-build-time-tools=${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin \ | 15 | --with-build-time-tools=${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin \ |