diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2021-05-04 09:22:03 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-05-08 20:43:35 +0200 |
commit | 626ea4e62a3e5005fe9825923a1c0c5bdb61cc08 (patch) | |
tree | 9c62462cf40d0bafc420fccec351c6cf1f93b806 | |
parent | 54e9dd41dc9dd45af12c9346199f601ea4a5994d (diff) |
gbuild: work around GDB 10 bug with DWARF5 in split debug infomimo-7-0-branch-pointlibreoffice-7-0
GCC 11 defaults to -gdwarf-5 and GDB can only read it if
-gsplit-dwarf isn't used.
Dwarf Error: wrong unit_type in compilation unit header (is DW_UT_split_compile (0x05), should be DW_UT_type (0x02)) [in module /workdir/CObject/desktop/source/app/main.dwo]
https://sourceware.org/bugzilla/show_bug.cgi?id=27354
https://bugzilla.redhat.com/show_bug.cgi?id=1956475
Change-Id: Ie2ac7193a29a8f257cf6f1d711f9fa6941df48ad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115054
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(cherry picked from commit dc8c8a4aa20ddd3139a25d5c052cac9bae944cb8)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115193
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | solenv/gbuild/platform/com_GCC_defs.mk | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk index acf06a8dc1d5..54ad644f575f 100644 --- a/solenv/gbuild/platform/com_GCC_defs.mk +++ b/solenv/gbuild/platform/com_GCC_defs.mk @@ -217,8 +217,12 @@ gb_DEBUGINFO_FLAGS=-g2 endif gb_LINKER_DEBUGINFO_FLAGS= +# GCC 11 defaults to -gdwarf-5, which GDB 10 doesn't support in split debug info ifeq ($(HAVE_GCC_SPLIT_DWARF),TRUE) gb_DEBUGINFO_FLAGS+=-gsplit-dwarf +ifeq ($(COM_IS_CLANG),) +gb_DEBUGINFO_FLAGS+=-gdwarf-4 +endif endif ifeq ($(HAVE_CLANG_DEBUG_INFO_KIND_CONSTRUCTOR),TRUE) |