]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
binutils: backport DWARF-5 support for gold
authorMartin Jansa <Martin.Jansa@gmail.com>
Mon, 10 May 2021 13:10:12 +0000 (15:10 +0200)
committerMartin Jansa <Martin.Jansa@gmail.com>
Wed, 12 May 2021 15:47:32 +0000 (17:47 +0200)
commitc691bc52560e66d7fd08a548789f8e409c1a14d1
tree08f44c5f0f42bd2e02e9270839236a7404455c85
parent51f51310d6d5cced2b55bf27dbb9a5717740a206
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>
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]