Hardware Reference
In-Depth Information
C Compiler
The “C Compiler” menu is next. This gets down to the business end of crosstool-NG. You can really break your build
or you can really get some good optimization done. As a general rule I like to keep this section generic for my first
build. Recall earlier on that I said that building a cross compiled tool chain is a complicated task, so for the moment
it's best to keep it simple. Leave your “C compiler” set to gcc .
Once again select the latest version of GCC; at the time of writing that version was 4.6.3. Make sure that you
enable the “C++” option. Most of the user land applications that you will be building will quite often be built using
C++ so it's wise to include support for C++; it can't hurt even if none of your applications will use it. The section
named “Flags to pass to --enable-cxx-flags” can be used to optimize your cross compile tool chain later on. For the
moment, leave it empty and leave the rest of the options at their defaults (I'll cover optimization later in this chapter).
Figure 6-11 shows the options I have used at this stage. They are quite safe.
Figure 6-11. The C Compiler page
C Library
Of course, because you're using a C compiler you're going to need a C library. Take a look at the next menu called
“C Library.” The first option is called “C library” and this lets you select what C library will be used alongside GCC in
the cross compile environment. I have selected “ eglibc .” eglibc stands for Embedded GLIBC. Its goals are to be small
and feature-rich in a cross compiling environment. It's designed for use on embedded systems where size matters.
There are two other options in this submenu: uClibc and generic old glibc. If you're having issues with eglibc
then give uClibc a shot; it has been used extensively in embedded environments as well but is a little less optimized
 
Search WWH ::




Custom Search