This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Best way of compiling applications to run on older linux distros


We have a requirement for our application to run on Centos 4, but currently we compile on Fedora 9 with gcc 4.3.
My question is what is the best way of compiling an application to target older linux distros? Doesn't seem to be any common wisdom that I can find on the web, but maybe I'm searching for the wrong thing.


I had tried just compiling up with gcc 4.3 and bundling the executables and libraries, including libstdc++ (code is written in C++), but ran in to the problem of the dynamic linker hash format having changed. So I recompiled with the --hash-format=sysv linker option, but the libstdc++.so is still compiled in the incompatible way, and without shipping libstdc++.so I get complaints about incorrect levels of libstdc++ (expecting 3.4.9 I think, but only found 3.4.6).

Obvisously one solution is to compile on Centos 4, using a gcc such as 3.4.
However I'd like to use the latest gcc is I can. Indeed I'm having trouble getting some of our code to link when I compile it with gcc 3.4 installed on the Fedora 9 build machine. I'm assuming that latest gcc will produce better results. It certainly compiles much faster.


So what's the "correct" way to do this? If I'm a company producing commercial applications that I'd like to run on as wide a variety of common Linux installations as possible, what's my best build platform/tool chain?

Thanks.

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email ______________________________________________________________________



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]