I am compiling a program with gcc4.9 in ubuntu 18 which comes with glibc 2.27 and trying to run the resulting program on redhat 7.4. Unfortunately, Redhat 7.4 comes with glibc 2.17, so I need to dynamically link my application with that version.
How can I force gcc to use that specific version of glibc?
NOTE: Please study the glibc license before suggesting statically linking.
cheers,es