Skip to contentSkip to conversation

gcc: fix check for working assembler --gdwarf-4 option

PATCH New Ross Burton 1 participant 1 message Sep 21

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gcc: fix check for working assembler --gdwarf-4 option

The test never worked on 32-bit arm platforms, which unlike most other platforms don't have an explicit 'ret' instruction.

This fixes the configure script from:

checking assembler for --gdwarf-5 option... yes
checking assembler for --gdwarf-4 not refusing compiler generated .debug_line... yes checking assembler for --gdwarf-4 with the APP marker... no
checking whether -gdwarf-5 is supported... yes

to:

checking assembler for --gdwarf-5 option... yes
checking assembler for --gdwarf-4 not refusing compiler generated .debug_line... yes checking assembler for --gdwarf-4 with the APP marker... yes
checking assembler for working --gdwarf-4/--gdwarf-5 for all sources... yes checking whether -gdwarf-5 is supported... yes

This means the bulk of the DWARF information in 32-bit arm binaries is now DWARF v5 (as it is with most other platforms) instead of DWARF v3.

For example, from master:

$ readelf -w busybox.suid | grep 'DWARF Version' | sort | uniq -c
     76   DWARF Version:               3
      5   DWARF Version:               5

But with this fix:

$ readelf -w busybox.suid | grep 'DWARF Version' | sort | uniq -c
      1   DWARF Version:               3
     80   DWARF Version:               5
---
 meta/recipes-devtools/gcc/gcc-16.2.inc        |  1 +
 ...or-working-assembler-gdwarf-4-option.patch | 50 +++++++++++++++++++
 2 files changed, 51 insertions(+)
 create mode 100644 meta/recipes-devtools/gcc/gcc/0001-Fix-check-for-working-assembler-gdwarf-4-option.patch
meta/recipes-devtools/gcc/gcc-16.2.inc +1 -0
index 790bf7b651e..818dea8ac5a 100644
@@ -73,6 +73,7 @@ SRC_URI = "${BASEURI} \
            file://0024-Avoid-hardcoded-build-paths-into-ppc-libgcc.patch \
            file://0025-gcc-testsuite-tweaks-for-mips-OE.patch \
            file://0001-mapper-localhost-might-not-be-known.patch \
+           file://0001-Fix-check-for-working-assembler-gdwarf-4-option.patch \
 "
 
 UNPACKDIR = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/sources"
meta/recipes-devtools/gcc/gcc/0001-Fix-check-for-working-assembler-gdwarf-4-option.patch new file +50 -0

50 lines not on this page · raw message

Signature · 1 line
2.43.0