EmbDev.net

Forum: ARM programming with GCC/GNU tools Determining GCC, binutils and libc version compatibilities


von Dar beh D. (dar_beh_dar)


Rate this post
useful
not useful
Hello everyone,

I do have one or two burning GCC questions though that have been
bothering me for ages and for which there seems to be no
straightforward answer / pointers available. Maybe you can help ( as
you have offered in your book ):

When attempting to build a GNU toolchain from scratch (say for 
deployment as a crosscompiler for an ARM target):

Q1.) Is there a fixed 'rule',  'matrix' or 'table' somewhere which
     tells me exactly which versions of 'binutils' and 'libc' are 
required
     by a particular version of gcc? I.e. something along the lines of:

     -  gcc ver.'k' can be built using gcc ver.'m'(or later)
        with binutils ver.'i' and libc ver. 'j'
     -  gcc ver.'k' will operate with binutils ver.'t' and libc
        ver.'r'(or later)

     Is there some 'rule of thumb' / 'heuristics' giving me the above
     version requirements for the building and operating gcc, or is this
     information somehow implied or derived systematically. Where can I
     find more about the above?


Q2) I assume that the libraries have no dependencies on any
    underlying software other than the system calls provided by the
    kernel. Furthermore it appears that the libraries are not too
    sensitive about the kernel version they run on ( I found this out 
from
    experience ). Therefore on a bare naked filesystem for a brand new
    machine I could build the libraries on some other build machine and
    place them on the host FS without regard to any other prerequisite 
SW
    components?

Q3) During operation, do GCC and its various components place system
    calls directly to the kernel or via library calls? In other words I 
am
    trying to understand conceptually if GCC requires 'Glibc' for its 
own
    operation or not?

Q4) During operation, do the 'binutils' components place system calls
    directly to the kernel or via library calls? In other words I am
    trying to understand conceptually if the binutils require 'Glibc' 
for
    their operation or not?

( Of course it is clear to me that when GCC is operating it will need
libraries to resolve object references in the target code it produces,
but that would be a different question )

I appreciate your feedback

Regards

dar_beh_dar

von Tobi (Guest)


Rate this post
useful
not useful
Hi,

prerequisites for GCC:
http://gcc.gnu.org/install/prerequisites.html

Use the "ldd" command to find out the dependencies of a program. Thats 
the easiest way. Be aware that "ldd" does not show libraries that are 
loaded by a program during it's execution.

Tobi

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.