https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115066
--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> --- (In reply to Tom de Vries from comment #1) > Looking at the source code, I wonder if this would fix it: > ... > diff --git a/gcc/dwarf2out.cc b/gcc/dwarf2out.cc > index eedb13bb069..045858bf638 100644 > --- a/gcc/dwarf2out.cc > +++ b/gcc/dwarf2out.cc > @@ -29045,7 +29045,7 @@ output_macinfo_op (macinfo_entry *ref) > && !DWARF2_INDIRECT_STRING_SUPPORT_MISSING_ON_TARGET > && (debug_str_section->common.flags & SECTION_MERGE) != 0) > { > - if (dwarf_split_debug_info && dwarf_version >= 5) > + if (dwarf_split_debug_info && (!dwarf_strict || dwarf_version >= 5)) > ref->code = ref->code == DW_MACINFO_define > ? DW_MACRO_define_strx : DW_MACRO_undef_strx; > else > ... With that change I get: ... .Ldebug_macro0: .value 0x4 # DWARF macro version number .byte 0x2 # Flags: 32-bit, lineptr present .long .Lskeleton_debug_line0 .byte 0x3 # Start new file .uleb128 0 # Included from line number 0 .uleb128 0x1 # file /data/vries/hello.c .byte 0xb # Define macro strx .uleb128 0 # At line number 0 .uleb128 0x17b # The macro: "__STDC__ 1" ...