we have old Linux distribution and the vendor doesn't support its updates. We want to build our c++ code with a modern compiler, for that we are building GCC compiler from sources (something very similar to https://github.com/darrenjs/howto/blob/master/build_scripts/build_gcc_10.sh)
Now the problem is that we can not deploy the executables because users' machine do not contain libstdc++.so.6 for this GLIBC. Is there a way to compile GCC and make it based on old local GLIBC that the vendor provides?
[EDIT]: After build my executable of xenenterprise 8.0.0 with GCC 10.1.0 that was built from sources:
[root@xen8 sandbox-gcov]# ldd build/main linux-vdso.so.1 => (0x00007ffddf9fd000) libstdc++.so.6 => /var/opt/gcc-10.1.0/lib64/libstdc++.so.6 (0x00007fb82155f000) libm.so.6 => /lib64/libm.so.6 (0x00007fb82125d000) libgcc_s.so.1 => /var/opt/gcc-10.1.0/lib64/libgcc_s.so.1 (0x00007fb821045000) libc.so.6 => /lib64/libc.so.6 (0x00007fb820c77000) /lib64/ld-linux-x86-64.so.2 (0x00007fb82192c000)
Then got error on another machine with native GCC 4.8.5 20150623 (Red Hat 4.8.5-44):
[root@xen8-1 sandbox-gcov]# ldd build/mainbuild/main: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by build/main)build/main: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by build/main) linux-vdso.so.1 => (0x00007ffeec5fe000) libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f92099db000) libm.so.6 => /lib64/libm.so.6 (0x00007f92096d9000) libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f92094c3000) libc.so.6 => /lib64/libc.so.6 (0x00007f92090f5000) /lib64/ld-linux-x86-64.so.2 (0x00007f9209ce3000)