Rockbox Development > Starting Development and Compiling

Rockbox: working CFLAGS

(1/2) > >>

jdong:
Earlier today I tried playing with CFLAGS in an attempt to get some "free" performance boosts. Any stock optimizations above -O (-O1) won't work, you'll get linker relocation truncation errors.

So, I started adding the options above -O one-by-one and ended up with a working set of CFLAGS. The main problem was -foptimize-sibling-calls, but doing "-O2 -fno-optimize-sibling-calls" did not make build work again, so I just listed every other optimization flag:


--- Code: ---export GCCOPTS=-W -Wall -O -fstrict-aliasing -nostdlib -ffreestanding -Wstrict-prototypes -march=armv4t -mtune=arm7tdmi -ffunction-sections -fomit-frame-pointer -mlong-calls -fthread-jumps -fcrossjumping -fcse-follow-jumps  -fcse-skip-blocks -fgcse  -fgcse-lm  -fexpensive-optimizations -fstrength-reduce  -frerun-cse-after-loop  -frerun-loop-opt -fcaller-saves -fpeephole2 -fschedule-insns  -fschedule-insns2 -fsched-interblock -fsched-spec -fregmove -fstrict-aliasing -fdelete-null-pointer-checks -freorder-blocks  -freorder-functions -falign-functions  -falign-jumps -falign-loops  -falign-labels -ftree-vrp -ftree-pre

--- End code ---

Did it help? Not that I can feel off-the-bat, but I've yet to do any scientific testing. Free lunches usually don't come this easy ;-)

Llorean:
You didn't mention which builds don't compile with the higher optimizations, nor if any of them did, nor if you're only testing this in relationship to one specific hardware (and which it is, if you are).

jdong:
I apologize; I tested strictly with the iPod 5G build which exhibited the behavior I described above. I used both the recommened GCC 4.0.3 and the latest 4.1.0 to confirm my results.

Robertek:
Did you earn some good results?? Like longer battery life, better response, etc?? Did you test battery life etc??

Sorry Im stupid, but where you place your CFLAGS, because this crosscompiling doesnt use files such /etc/make.conf

GodEater:

--- Quote from: Robertek on January 17, 2007, 07:37:09 AM ---Did you earn some good results?? Like longer battery life, better response, etc?? Did you test battery life etc??

Sorry Im stupid, but where you place your CFLAGS, because this crosscompiling doesnt use files such /etc/make.conf

--- End quote ---

Battery life isn't going to be affected by this in any appreciable way at all. We need to know how to power down unused bits of the iPod to do that. The gcc compiler optimisations aren't going to magically do that for us.

Navigation

[0] Message Index

[#] Next page

Go to full version