-gdwarf2 produces DWARF 1 output (debug level 2).
-gdwarf-2 produces DWARF 2 output.
That looks like a confusing set of options! I am sure there is logic
behind it, but nonetheless I think we should look for an alternative
set of names which avoids the ambiguity.
Perhaps we could use -gxdwarf to mean dwarf 2 ("extended dwarf").