egcs & glibc Redux



I've been talking to Zack Weinberg on the egcs list, and I'm finally
getting to the bottom of this mystery.

According to Mr. Weinberg, here are the rules:

 1) Whenever you build a shared library, you should pass an explicit
    '-lc' to the linker. This ensures that each library has an accurate
    dependency graph. He says this isn't related to the problem at hand,
    but it should be done for all libraries.
 2) You can compile glibc 2.0 with either gcc or egcs. RedHat 5.2 compiled
    it with gcc 2.7.
 3) If you compile glibc with gcc 2.7, you should not compile shared
    libraries with egcs. This apparently causes all sorts of problems, and
    resolving them requires lots of specialized knowledge. The situation is
    a little better for Objective C and C++ programs, assuming you compiled
    them--and the relevant runtime libraries--with egcs.
 4) You must compile glibc 2.1 with egcs (or gcc 2.8, but he doesn't
    recommend that).
 5) If you compile glibc 2.1 with egcs, you should still be able to run
    gcc 2.7/glibc 2.0 applications. Most shared libraries should continue
    to work, too, unless they use stdio internally. These libraries need to
    be recompiled, but the applications which use them do not.

Based on this advice, it seems like the Gnome RPMS for RedHat 5.2 should be
linked against glibc 2.0 and compiled with GCC, unless they contain C++ or
Objective C code. If so, they can be compiled with egcs, taking whatever
percautions are standard for Red Hat 5.x.

Any errors in this summary are my fault, not Mr. Weinberg's. I'll post
updates and corrections as I receive them.

Cheers,
Eric



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]