sba1 / adtools

Experimental GNU toolchain for AmigaOS
31 stars 18 forks source link

Set default DWARF version to 2 in gcc 8 #73

Closed zeldin closed 3 years ago

zeldin commented 5 years ago

Normally gcc 8 defaults to DWARF v4. However, AmigaOS has gdb 6.3 which only groks v2. So at least until a port of gdb 7 is available, it seems prudent to change the default to v2. (It can still be overridden with -gdwarf-#.) Code taken from the Darwin configuration.

kas1e commented 3 years ago

Just in case I checked this patch, and it works. Through, if you link the dwarf2 build binary with other .a libs from os4depot which builds with dwarf4, then GDB still fails as detect it as dwarf4 one. That means, that only the new GDB port will solve that issue in full.

sodero commented 3 years ago

I wasn't aware of it but gcc still (10.2) supports dwarf 2 using the '-gdwarf-version' option. This patch isn't really needed in other words.

zeldin commented 3 years ago

@sodero The possibility to override the dwarf version manually was mentioned in the original post. The patch is about changing the default value from one that is useless to one that is at least somewhat useful.

sodero commented 3 years ago

@sodero The possibility to override the dwarf version manually was mentioned in the original post. The patch is about changing the default value from one that is useless to one that is at least somewhat useful.

@zeldin Ah, missed that, my bad.

sba1 commented 3 years ago

Thanks, and sorry for the delay.