]> git.ipfire.org Git - thirdparty/gcc.git/commit
Darwin: Do not emit .macinfo when dsymutil cannot consume it.
authorIain Sandoe <iain@sandoe.co.uk>
Sun, 31 Mar 2024 22:25:31 +0000 (23:25 +0100)
committerIain Sandoe <iain@sandoe.co.uk>
Tue, 2 Apr 2024 11:18:39 +0000 (12:18 +0100)
commit3c499f8f6f7d19b21d7047efabbe6396ee1c2cac
tree11b0d13effa7db236dfdac58df4cd4448facb4df
parentc85c2e26b8de2781ac22e7687e8c9652a56b0a07
Darwin: Do not emit .macinfo when dsymutil cannot consume it.

Some verions of dsymutil do not ignore .macinfo sections, but instead
ignore the entire debug in the file.

To avoid this total loss of debug, when we detect that the debug level
is g3 and the dsymutil version cannot support it, we reduce the level
to g2 and issue a note.

This behaviour can be overidden by -gstrict-dwarf (although the objects
will contain macinfo; dsymutil will not produce a .dSYM with it).

gcc/ChangeLog:

* config/darwin.cc (darwin_override_options): Reduce the debug
level to 2 if dsymutil cannot handle .macinfo sections.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
gcc/config/darwin.cc