Red Hat Bugzilla – Bug 222222
Method to Compile Code for Older RH OS Releases
Last modified: 2007-11-30 17:11:53 EST
This is not a real bug report so I'm not expecting step-by-step answer but even
a possible/impossible comment with some hints would be much appreciated.
I am using RHEL4 "everywhere" and all is good till I need to give binary I've
created to someone else who is running RHEL3 and is not going to upgrade to
RHEL4. How can I compile my C and/or C++ code so that it surely works on RHEL3
(or even on RHEL2)? Provided, of course, that only those APIs/features are used
that also available on an older release?
It also seems that this will be a bigger problem in the future with DT_GNU_HASH,
a hello-world compiled on FC6 gives only a floating point exception on currect
Debian stable :-/
To compile/link binaries for RHEL3 on RHEL4 we ship compat-glibc and
DT_GNU_HASH only binaries/libraries are in rpm land caught by rpm requires.
If you want to link something for older distros, you can just use compat-gcc-34
or use -Wl,--hash-style=both or -Wl,--hash-style=sysv. FC6 release notes
explain this in detail.
Thanks, that was a kind of hint I was looking for. Keep up the good work!
(I would close this but I am not able to do it. Feel free to close this one.)
For reference, FC6 Release Notes are at: