Gnu Toolchain/Compatibility Matrix

From Devpit
Jump to: navigation, search

This page is designated for tabulating version dependencies between different toolchain packages in order to identify stable toolchains for release. It can also be used to outline version [in]compatibility issues e.g. GLIBC 2.4 will not work with gcc 3.4.3 because GLIBC 2.4 requires thread local storage (i.e. __THREAD) and GCC 3.4.3 doesn't provide TLS support.

Inter-Package Compatibility Matrix

GNU Toolchain Inter-Package Compatibility Matrix
Vein GCC GLIBC Description
Thread Local Storage GCC Version 4.1 because GCC 3.4.3 does not provide TLS support. GLIBC Version 2.4 requires TLS support enabled using the flags: --with-tls --with-__thread GLIBC Version 2.4 (and later) requires TLS support. This means that GCC Version 3.4.3 will NOT work with GLIBC Version 2.4 (or later). The glibc make system will generate the following compilation error if TLS support is not enabled: 'error: #error "TLS support is required"'
-O2 Optimization Without optimizations enabled gcc will not inline functions.[1] GLIBC requires that the -O2[2] optimization CFLAG be set. The GLIBC make system will generate the following compilation error if optimization is not specified: '#error "glibc cannot be compiled without optimization"'
GCC moved limits.h and syslimits.h GCC Version 4.3 moved limit.s and syslimits.h to new include-fixed directory GLIBC snapshot preceeding Jan 31, 2008 (i.e. GLIBC 2.7) GCC 4.3 added an include-fixed directory and moved limits.h and syslimits.h there [3]. Compiling GLIBC 2.7 (or prior) with GCC 4.3 will require these [4] patches to work.
Vein Autoconf GLIBC Description
Configure scripts Autoconf Version 2.61 GLIBC Version 2.7 GLIBC 2.7 had it's sysdep directory configure fragments rebuilt using Autoconf 2.61. This can cause problems if GLIBC determines it needs to re-generate the top level configure script on a system that has a version of Autoconf prior to Autoconf 2.61 installed[5].
  1. ^  From the GCC 4.2.1 manual: always_inline(function attribute):
    "Generally, functions are not inlined unless optimization is specified.
    For functions declared inline, this attribute inlines the function
    even if no optimization level was specified."
    • Given the following prototype:
    static inline function_name()
    • If explicit optimization wasn't specified then the function would not be inlined as necessary. One could direct GCC to inline even without the optimization flags using __attribute__((always_inline)) but for GLIBC this is never done, e.g.
    static inline function_name() __attribute__((always_inline))
  2. ^  libc-alpha Re: glibc only with optimization?
    "In the early startup of the dynamic loader (_dl_start), before
    relocation of the PLT, you cannot make function calls. You must inline
    the functions you will use during early startup, or call compiler
    builtins (__builtin_*).

    Without optimizations enabled gcc will not inline functions. The early
    startup of the dynamic loader will make function calls via an
    unrelocated PLT and crash." -- Carlos O'Donell
    glibc-bugs: Bug faq/5012 Why must glibc be compiled with optimizations enabled?
    "Without auditing the dynamic linker code it would be difficult to remove
    this requirement. In practice there is no reason to compile without
    optimizations, therefore we require that GNU libc be compiled with
    optimizations enabled." -- Carlos O'Donell
    glibc-bugs: Bug faq/5012 Why must glibc be compiled with optimizations enabled?
    "There are other reasons. For instance, nested functions must be inlined in many cases to avoid executable stacks. " -- Ulrich Drepper
  3. ^  From the libc-alpha mailing list: glibc --with-headers and GCC 4.3ish trunk: include-fixed required
    Roland uses a different method (see patch set below).
  4. ^  Patches from glibc-cvs mailing list: libc configure
  5. ^  From the libc-alpha mailing list: glibc-2.7 and autoconf 2.61 dependency in libc/nptl/sysdeps/configure

Stabilized Toolchain Dependency Tables

PowerPC Toolchain With DFP (Decimal Floating Point) Support
Base Versions IBM Branch 4.1.1 revision 127251 Version 2.7 mainline cvs [2007-08-02] Version 2.17.50 [2007-06-28][6] Version 6.6[7] Version 4.2.1[8] satisfies Version 4.1.0+ requirement of MPFR Version 2.3.0 [9], --enable-shared defaults to 'on' in Version 2.3.0
Stabilization Required Private_futex patch [10] ppc32 rpath patch single-step patch, altivec patch, long-double patch, loader-break patch
Secure PLT Libgcc plt-fix patch[11] sysdep-cancel.h patch[12] socket.S patch[13]
Power6 Enablement [in base 127251] powerpc-cpu support [in base 2007-08-02] BFD mtfsf fix [in base 2007-06-28] mtfsf BFD patch, power6-reg patch
DFP Enablement [in base 127251] libdfp v0.07, dfp<->int conversions dfp insns [in base 2007-06-28] dfp insns patch
Fortran Support [in base 127251] GCC Requires GMP Version 4.1+ GCC Requires MPFR Version 2.2.1+

  1. ^  Binutils 2.17.50 provides BFD support for an extended 'mtfsfi' instruction, among others, which take a optional third parameter as necessary on Power6 for setting the high-order 32-bits of the new 64-bit FPSCR register.
  2. ^  GDB Version 6.6
  3. ^  GMP Version 4.2.1
  4. ^  MPFR Version 2.3.0
  5. ^  GLIBC private futex Patch
  6. ^  Libgcc plt-fix patch
  7. ^  GLIBC sysdep-cancel.h patch
  8. ^  GLIBC socket.S patch