[[gentoo-on-n8x0:|Back]] ====== Choosing CFLAGS ====== First of all, I strongly recommend reading [[wp>ARM_architecture|ARM architecture]] Wikipedia entry. Both N810 and N800 tablets have **ARM1136JF-S** CPU, which supports: * [[wp>ARM_architecture#Thumb-2|Thumb-2]] * [[wp>Jazelle]] * [[wp>ARM_architecture#VFP|VFP]] * [[wp>ARM_architecture#DSP_Enhancement_Instructions|EDSP]] From info above we can easily set **-mtune=arm1136jf-s** (make binaries tweaked to run as fast as possible on ARM1136JF-S) and **-mfpu=vfp** (use VFP for floating point operations). **march** can be either set to **armv6j** (which I use & recommend), or **armv6l**. The difference is that **armv6j** specifies arch with Jazelle support and N8x0 CPUs have it. But no known opensource software can use it because its specs are closed and only given to JVM vendors. So choosing between these two values is just a matter of taste. And the last (and the most confusing one) **-Os** or **-O2**. **-Os** promises to produce as small binaries as possible (which reduces required disk space, RAM usage for code and makes programs start faster because less code needs to be read from disk). However, there are rumours that some programs break with **-Os** (this is the reason why glibc and gcc are always built with **-O2** in Gentoo). On the other hand, **-O2** makes a little bigger binaries (5-10%) but with additional optimizations that (theoretically) allows faster execution. The choice is up to you, however our stages are built with **-Os**. After all that said, current recommended CFLAGS are: CFLAGS="-Os -pipe -march=armv6j -mtune=arm1136jf-s -mfpu=vfp -fomit-frame-pointer"