I have two gcc compilers installed on my system, one is gcc 4.1.2 (default) and the other is gcc 4.4.4. How can I check the libc version used by
gcc 4.1.2
gcc 4.4.4
You can use strings command to check GLIBC version of compiler. Highest version is applicable.
ubuntu1604:extra$ strings ./arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-gcc | grep GLIBC GLIBC_2.3 GLIBC_2.8 GLIBC_2.14 GLIBC_2.4 GLIBC_2.11 GLIBC_2.2.5 GLIBC_2.3.4