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 number of specific distribution of Linux (such as Raspberry Pi OS 10 "Buster") is 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 Raspberry OS 10 "Buster" (as of 2020-09-02) version numbers are: gcc 8.3.0, glibc 2.28, binutils 2.31.1, gdb 8.2.1 and kernel 5.4.51; architecture is arm-linux-gnueabihf for hardfp and arm-linux-gnueabi for softfp.


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