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]

Re: GCC version question


Andres Ortega <devcodegcc@yahoo.com> writes:

> Out of curiosity, I would like to know if there are
> any known issues of using different compilers to build
> libraries in an environment ( like gnome let's say )
> Can I have my linker point to the libraries of two
> different compilers?
> 
> Ex. I am build library "x" with gcc-3.2 and library
> "y" with gcc-3.4 and binay "z" loads both "x" and "y"
> at runtime.
[snip]

The first problem that comes to mind is that you may have to wait some
    time for gcc 3.4 to become availible :-) (Couldn't resist - I believe
    3.3 is planned for release some time this year.)

When the second number in a gcc version (called the 'minor' version
    number) changes, some facet of binary compatibility has been
    broken. Usually C binary compatibility is perserved, but as long
    as I have been using gcc, c++ binary compatibility has not been.

Your example would likely work with C libraries, and likely fail with
    C++ libraries. (ISTR this may vary somewhat from platform to
    platform).

2.95.x, 2.96 (unofficial release), 3.0.x, 3.1.x, 3.2.x are, for C++, 5
     different incompatible compileers; If you build c++ libraries
     with 2 different compileers in that list, they will not link.

For C, at least on linux and freebsd, all of those versions have full
    binary compatibility.

Finally - I strongly reccomend you obtain multiple versions of gcc,
    and test the linkage issues yourself.


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