For the Duemillenove w/328P, I have poked around in all sorts of dark corners trying to establish how and under what circumstances the symbol:
AVR_ATmega328P
actually gets #defined.
I've searched all of the *.h files on my machine, and I've looked in the preferences.txt file in the Arduino folder under Documents and Settings\Application Data without discovering any obvious mechanism.
Since the IDE invokes avr-gcc, does it pass the processor type as a command line argument which in turn defines the aforementioned symbol?
If that is indeed the case; is there a simple way to change that default?
Since the IDE invokes avr-gcc, does it pass the processor type as a command line argument which in turn defines the aforementioned symbol?
Yes. If you turn on "build.verbose=true" in your preferences file (manually, with a text editor), you'll get to see the actual commands, which will look like:
If that is indeed the case; is there a simple way to change that default?
Well, you can switch between mega8, mega168, and mega328 by changing the "board" selection in the Tools menu. Beyond that things get more complicated. (The next step is editing hardware/boards.txt ...)