GCC's command line option handling and arbitrary values

Say you want to add your own command line option to the gcc driver. It’s pretty easy to do it as long as it is a number or a bitmask - just add an entry to your target’s opt file, and gcc’s option handling mechanism takes cares of it all. For example, this is how the avr target’s mn-flash option is described in avr.opt mn-flash= Target RejectNegative Joined Var(avr_n_flash) UInteger Init(-1) Set the number of 64 KiB flash segments.