]> code.ossystems Code Review - openembedded-core.git/commit
binutils: backport DWARF-5 support for gold
authorMartin Jansa <Martin.Jansa@gmail.com>
Wed, 12 May 2021 16:45:03 +0000 (18:45 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 13 May 2021 10:33:47 +0000 (11:33 +0100)
commitd07d4d739ae17787017f771dd2068fda0e836722
tree2266528fbc1416f70f306f679402b450d145ae62
parent363f1ee30b0e6d222943aaed8dce37a4a441a86d
binutils: backport DWARF-5 support for gold

* DWARF-5 is now used by default with gcc-11, causing
  11.1.0/ld: internal error in format_file_lineno, at ../../gold/dwarf_reader.cc:2278
  collect2: error: ld returned 1 exit status
  in various projects (runc-opencontainers, libhybris, collada-dom)

* https://gcc.gnu.org/gcc-11/changes.html

  For targets that produce DWARF debugging information GCC now defaults to DWARF version 5
  (with the exception of VxWorks and Darwin/Mac OS X which default to version 2 and
  AIX which defaults to version 4). This can produce up to 25% more compact debug
  information compared to earlier versions.

  To take full advantage of DWARF version 5 GCC needs to be build against binutils version 2.35.2 or higher.
  When GCC is build against earlier versions of binutils GCC will still emit DWARF version 5 for
  most debuginfo data, but will generate version 4 debug line tables (even when explicitly given -gdwarf-5).

  The following debug information consumers can process DWARF version 5:

  GDB 8.0, or higher
  valgrind 3.17.0
  elfutils 0.172, or higher (for use with systemtap, dwarves/pahole, perf and libabigail)
  dwz 0.14
  Programs embedding libbacktrace are urged to upgrade to the version shipping with GCC 11.

  To make GCC 11 generate an older DWARF version use -g together with -gdwarf-2, -gdwarf-3 or -gdwarf-4.

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/binutils/binutils-2.36.inc
meta/recipes-devtools/binutils/binutils/0018-Add-DWARF-5-support-in-gold.patch [new file with mode: 0644]