Back

Choosing CFLAGS

First of all, I strongly recommend reading ARM architecture Wikipedia entry.

Both N810 and N800 tablets have ARM1136JF-S CPU, which supports:

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"

Discussion

Enter your comment
OOQSI
 
 
gentoo-on-n8x0/cflags.txt · Last modified: 2009/09/26 22:18 by slonopotamus
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki