Determining Versions of the Software
If you want to avoid compatibility problems, it's important to build cross-compiler targeted for particular version of GNU/Linux distribution for Raspberry Pi.
Unlike Windows, version numbers of specific distribution of Linux (for example, Debian Jessie (Debian 8) or Raspbian Jessie are unimportant in the context of cross-compilation).
What's important then? You should note the combination of "gcc version" + "binutils version" + "glibc version" + "gdb version" + "kernel version".
1) Version of gcc (GNU compiler collection)
To determine it, boot Raspberry Pi and run the following command in the console:
$ gcc --version
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
Target architecture is also important to note.
3) Version of glibc
To determine it:
$ ldd --version
4) Version of gdb
To determine it:
$ gdb --version
5) Kernel version
To determine it:
$ uname -r
For Raspbian Jessie (as of 2016-05-01) version numbers are: gcc 4.9.2, glibc 2.19, binutils 2.25, gdb 7.7.1 and kernel 4.1.19; architecture is arm-linux-gnueabihf. Debian Jessie (as of 2016-05-01) numbers are the same, and architecture is arm-linux-gnueabi.
>> Read next section or
buy already prepared
cross-compiler (€10) to save your time.