How about an easier solution: we could skip appending -gdwarf-2 if any of -gdwarf-[234] options are provided in CFLAGS.
yeah, way simpler ; may even work ;-)
two questions though:
- is there a need to support CROSSDEBUG=dwarf ? or not specifying anything in CROSSDEBUG is fine
- when using CROSSDEBUG=pdb, I assume there's no need to the -gdwarf* options at the same time?
A+