Posts: 49
Joined: Thu Nov 03, 2011 12:09 pm

Re: CFLAGS for optimal code

Mon May 07, 2012 12:56 am

What are the best CFLAGS for gcc to generate the most optimized code specifically for the Raspberry Pi, to use all available CPU features for example?

Posts: 56
Joined: Tue Jan 17, 2012 3:48 pm

Re: CFLAGS for optimal code

Mon May 14, 2012 6:49 am

This depends on the version of your gcc and the flags the other stuff has been compiled with. I currently go with:
CFLAGS="-O2 -mcpu=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -pipe -fomit-frame-pointer"

That obviously only works if the rest of your system is hardfp, too. Otherwise, use -mfloat-abi=softfp

Return to “Other projects”

Who is online

Users browsing this forum: bleep42 and 6 guests