Files
poky/meta/recipes-devtools/gcc
Samuli Piippo 09ae62b662 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: cf1bb16b7f9f81514feaf1e4ecffd9039387bb89)

Signed-off-by: Samuli Piippo <samuli.piippo@qt.io>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-09-17 07:47:07 +01:00
..
2022-09-09 14:09:01 +01:00
2022-08-25 11:08:07 +01:00
2022-09-09 14:09:01 +01:00
2022-08-25 11:08:07 +01:00
2022-08-17 19:57:32 +01:00
2022-08-25 11:08:07 +01:00
2022-08-25 11:08:07 +01:00
2022-08-25 11:08:07 +01:00
2022-08-25 11:08:07 +01:00
2022-08-25 11:08:07 +01:00
2022-08-25 11:08:07 +01:00
2021-08-02 15:44:10 +01:00
2022-08-25 11:08:07 +01:00
2021-11-01 10:36:51 +00:00