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 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, log in to the installation of target Linux version
(for example, Debian 10 "Buster") and run the following command in the console:
$ gcc --version
Sample output:
Copyright (C) 2018 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:
Copyright (C) 2018 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.31.1
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 10 "Buster" prints
i586-linux-gnu .
3) Version of glibc (GNU libc)
To determine it:
$ ldd --version
Sample output:
Copyright (C) 2018 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) GDB version:
To determine it:
$ gdb --version
Sample output:
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
5) Kernel version
To determine it:
$ uname -r
Sample output:
>> Read next section or
buy already prepared
cross-compiler (€10) to save your time.