-gdwarf-version not working properly in GCC 11

Bug #1981377 reported by Sebastian Perta
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GNU Arm Embedded Toolchain
New
Undecided
Unassigned

Bug Description

I'm using a debugger which doesn't support DWARF 5 so I used the -gdwarf-version (-gdwarf-4) option since DWARF 5 has become the default in GCC 11 (GNU Toolchain for the Arm Architecture 11.2-2022.02 (arm-11.16)) 11.2.1 20220111)
Unfortunately, although the my object files are DWARF 4, I still end up with object files from libraries which have debug information with DWARF 5 which renders the option useless.
In order to make it work I had to use "arm-none-eabi-objcopy --strip-debug" to remove the debug information from the *.a files in question.

For example <install folder>\arm-none-eabi\11.2.1\thumb\v7e-m+fp\hard\libg_nano.a is 4.5 KB after after debug striping it shrinks to <1KB just like in GCC 10 ((GNU Arm Embedded Toolchain 10.3-2021.10) 10.3.1 20210824 (release)) where the libraries don't include debug information.

This seems to be reason why the size of the whole install folder in GCC 11 is almost 3.6 GB while GCC 10 is less than 800 MB.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.