Rob,
the .o files of the core are merged into a single archive (core.a) file using AVR-AR.
Every time or just after a new install?
Yes...Each time you perform a compile from the IDE the core.a is recompiled. Technically this could be changed to "cache" the core.a and only recompile when you have changed your board/target (i.e. changed from ATmega1280 to ATmega328 for example).
Coding Badly mentioned this the other day in another thread. This would explain why my 3000-line program that compiles in seconds outside the IDE takes (and I kid you not) 2-3 minutes or longer when compiled with the IDE. I looked at the processes with task manager and it's all Java (the IDE I assume) then 2 seconds of the compiler.
Is there any way to turn that feature off?
There is a way for you to eliminate, actually only minimize, the impact of the Arduino IDE creating the function prototypes. If you move all of your code to .c or .cpp files instead of .pde files, the IDE will have less work to perform during preprocessing. This is because the IDE doesn't really do anything to .c or .cpp files - except compile and link them.
-mmcu={boardPreferences.get("build.mcu")}
This and similar constructs I don't understand. Does this cause AVR-xxx to read the "boards.txt" file to get the parameter. If so where does the program get the filename from. Or is this parsed by the IDE and the correct value inserted in the command line?
The actual "{boardPreferences.get("build.mcu")}" function call within the Arduino IDE Java code only returns the values that where previousely read from the boards.txt file at startup. The boards.txt file contains the setting for every board the Arduino IDE knows about. The values returned are based on that file and the board you selected within the "Tools | Board" menu options of the Arduino IDE.
In the case of the build.mcu option ("{boardPreferences.get("build.mcu")}"), the valued used for the ATmega328 is "atmega328p". The following is a snippet from the boards.txt file.
##############################################################
uno.name=Arduino Uno
uno.upload.protocol=stk500
uno.upload.maximum_size=32256
uno.upload.speed=115200
uno.bootloader.low_fuses=0xff
uno.bootloader.high_fuses=0xde
uno.bootloader.extended_fuses=0x05
uno.bootloader.path=optiboot
uno.bootloader.file=optiboot_atmega328.hex
uno.bootloader.unlock_bits=0x3F
uno.bootloader.lock_bits=0x0F
uno.build.mcu=atmega328p
uno.build.f_cpu=16000000L
uno.build.core=arduino
##############################################################
atmega328.name=Arduino Duemilanove or Nano w/ ATmega328
atmega328.upload.protocol=stk500
atmega328.upload.maximum_size=30720
atmega328.upload.speed=57600
atmega328.bootloader.low_fuses=0xFF
atmega328.bootloader.high_fuses=0xDA
atmega328.bootloader.extended_fuses=0x05
atmega328.bootloader.path=atmega
atmega328.bootloader.file=ATmegaBOOT_168_atmega328.hex
atmega328.bootloader.unlock_bits=0x3F
atmega328.bootloader.lock_bits=0x0F
atmega328.build.mcu=atmega328p
atmega328.build.f_cpu=16000000L
atmega328.build.core=arduino
##############################################################
.
.
.
##############################################################
Notice the line that reads "atmega328.build.mcu=atmega328p". The IDE uses the board selected "atmega328" plus the value it is looking for "build.mcu" to get the value "atmega328.build.mcu" from the values read from this file.
I hope this helps...