]> 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>
Sun, 21 Apr 2024 13:05:01 +0000 (14:05 +0100)
commit8f0f24387945ef03fcd61bf978565145bfaf3493
tree88f8dcc70c2befd5da6557a4ca91adea85eaf06a
parent50dd6d3cf89214a97c13f0983bd1e87c306dff51
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>
(cherry picked from commit 3c499f8f6f7d19b21d7047efabbe6396ee1c2cac)
gcc/config/darwin.cc