Apologies if this is more Server Fault than SO, but it is related to coding so here goes...
I have someone else's code that I am trying to compile on RHEL 7 but will run (for the moment at least) on RHEL 6. I've written my own RPM spec file to build and output an RPM file. The RPM builds fine on both RHEL 6 and RHEL 7 but when I build it on RHEL 7, does not produce an RPM which can be installed on RHEL 6 due to versions of GLIBC.
Is there a simple switch I can add to the build somewhere which will allow the resulting binary to be satisfied with an earlier version of GLIBC and be able to be installed on RHEL 6?
To be clear, I don't actually need a RHEL 7 binary at present, I'd just like to be able to compile for RHEL 6 on a RHEL 7 dev box.