
Dear Scott Wood,
In message 20100817131904.5703f08e@schlenkerla.am.freescale.net you wrote:
...but "take this entire subsystem as is" or "go without anything vaguely resembling this code, lest it be called 'duplication'" is a rather limiting pair of choices. It seems reasonable to refactor things to be more modular (possibly in a nicer way than sprinkling ifdefs), or provide an alternate trimmed-down implementation.
Agreed. Factoring out functions that can then be selected on Makefile level is probably OK.
One thing that should probably be tried first, though, is -ffunction-sections and --gc-sections, to have the linker discard any functions that aren't referenced. It seems some arches/boards already use this.
I guess that should help here a lot, too.
Best regards,
Wolfgang Denk