Weddington, Eric schrieb:
-----Original Message-----
From:
avr-gcc-list-bounces+eric.weddington=atmel....@nongnu.org
[mailto:avr-gcc-list-bounces+eric.weddington=atmel....@nongnu.
org] On Behalf Of Bob Paddock
Sent: Friday, May 08, 2009 6:55 PM
To: avr-gcc-list@nongnu.org
Subject: Re: [avr-gcc-list] regression in size from 4.2.2 to 4.5.0
1) -no-inline-small-function - 69034
2) --param inline-call-cost=2 - 68964
3) -fno-inline - 68816
4) -finline-limit=10 - 68810
5) #2 & #4 - 68754 6)
-finline-limit=3 -
68754 (same results for 1,2 and 3)
I found that it depends on your source codes
To get better code size, you have to try different switches
combinations.
Is there any way to apply the switches on a per source file basis?
Yes, it's called "using a Makefile". ;-)
You can, for example, define the CFLAGS depending on the target
foo.o: CFLAGS += -no-inline-small-functions
bar.o: CFLAGS += --param inline-call-cost=2 -finline-limit=10
and leave everything else as it is provided in the sample Makefile.
Beware that the above syntax might be a GNU extension and not be
available elsewhere.
Rolf
_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list