Gcc flags for compatibility

Jakub Jelinek jakub at redhat.com
Mon Jun 25 21:36:57 UTC 2007


On Mon, Jun 25, 2007 at 02:18:46PM -0700, Chuck Forsberg WA7KGX N2469R wrote:
> I would like to support development of my programs on my x86_64
> Fedora 7 server.  I need to cross compile for other Linux distros
> running on 386.  I tried ading   "-m32 -march=pentium " and -m32
> to the linker command but the resulting files bomb out with an
> immediate floating point exception on other systems including
> Backtrack 2.0 and Ubuntu 5.10.  The same source  files compiled
> on Ubuntu run fine on Fedora.

You can read FC6 release notes:
http://redhat.download.fedoraproject.org/pub/fedora/linux/core/6/i386/os/RELEASE-NOTES-en_US.html#id324893

If you want to build programs that will work on older distros, you
should use either compat-gcc-* instead of gcc-*, or link
with -Wl,--hash-style=sysv or -Wl,--hash-style=both.
In any case, you need to be lucky and not to use any glibc APIs with
recent symbol versions, as the older distros will not have them.

	Jakub




More information about the test mailing list