Determining Versions of the Software

If you want to avoid compatibility problems, it's important to build cross-compiler targeted for particular version of Linux.

Unlike Windows, version number of specific distribution of Linux (such as Debian 8 "Jessie") is unimportant in the context of cross-compilation.

What's important then? You should note the combination of "gcc version" + "binutils version" + "glibc version" + "kernel version".

1) Version of gcc (GNU compiler collection)
To determine it, log in to the installation of target Linux version (for example, Debian 8 "Jessie") and run the following command in the console:
$ gcc --version

Sample output:

gcc (Debian 4.9.2-10) 4.9.2
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Also running "gcc -v" may be helpful, it shows options that were passed for "configure" script when gcc was built for the target system.

2) Version and target architecture of binutils (GNU linker, assembler etc)
To determine it:
$ ld --version
$ as --version

Sample output:

GNU ld (GNU Binutils for Debian) 2.25
Copyright (C) 2014 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.

GNU assembler (GNU Binutils for Debian) 2.25
Copyright (C) 2014 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or later.
This program has absolutely no warranty.
This assembler was configured for a target of `x86_64-linux-gnu'.

Target architecture is also important to note, example above shows target architecture for GNU assember on 64-bit Debian Jessie. GNU assembler on 32-bit Debian Jessie prints i586-linux-gnu .

3) Version of glibc (GNU libc)
To determine it:
$ ldd --version

Sample output:

ldd (Debian GLIBC 2.19-18+deb8u7) 2.19
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.

4) Kernel version
To determine it:
$ uname -r

Sample output:

3.16.0-4-amd64


>> Read next section or buy already prepared cross-compiler (€10) to save your time.