]> 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>
Thu, 4 Apr 2024 18:35:08 +0000 (19:35 +0100)
commit48d302702d9c37d0da4f7446c1c09677e4f2f311
tree693f7da6c5823cde17f25510f84bc0763ac6a5d7
parentb03827b261d3c8351f9c208fe2d89ca987a25bee
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