ubuntugccpackagedebianlibgcc

In Ubuntu (and Debian), what does -s4 mean in libgcc-s4?


While checking for libgcc for preparing for a cross-compilation environtment, I noticed that there are some libgcc-s[124]-{arch} packages - there's many s1 packages, but only few s2 and s4 packages (exactly 1 for m68k and 1 for hppa).

What do those mean? How are they assigned? Is there a wiki for it?


Solution

  • Very unfortunately, there's no wiki or any kind of web resource for it. The only place one can find information on it is from the "changelog" file from the gcc-ver-base package.

    The information is also very scatterred and hard to locate. But I manage to summarize:

    The libgcc library implements some features that the GCC compiler expect but is lacking from the target platform. Among the features, is a set of "exception handling" routines. These EH routines, unlike the other computational integer and floating-point routines, are dependent on the ABI of target platform.

    Because exception handling have changes between versions and platforms within Debian, compatibility must be maintained through the use of version barrier - that is, use versioning to prevent a executable binary from linking with an incompatible dynamic library.

    This version is called "soversion" (changelog terminology), which stands for shared-object version, where shared-object is Unix/Linux term for dynamic library.

    The version for m68k had been bumped once, so it's 2; the situation with hppa is a bit more complex and I wasn't able to confirm its soversion-3, but it so happened that it had once reverted from soversion-6 back to soversion-4.

    Apparently, Debian thought explicit versioning in package name for such important library is beneficial from a functional correctness perspective.