[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-readline] Set correct -compatibility_version in .dylib on Mac OS X
From: |
Max Horn |
Subject: |
[Bug-readline] Set correct -compatibility_version in .dylib on Mac OS X |
Date: |
Thu, 10 Apr 2014 15:53:54 +0200 |
Hi there,
the first patch reformats the shobj-conf code for OS X a bit, and reduces code
duplication while hopefully improving readability.
The second patch then drops the useless "-v" flag (it just causes the linker to
prints its version), and then tweaks the compatibility_version to match the
current_version.
The rationale behind this is the following: The purpose of the
compatibility_version is to reflect when new ABIs are added. Since readline 6.3
added new ABI compared to 6.2, it should have higher compatibility_version.
With this in place, a binary linked against readline 6.2 will work fine with
6.3; but one linked against 6.3 will refuse to run with just readline 6.2
present. This is the correct and desired behavior. Without this patch, a binary
that relies on 6.3 specific API / ABI extensions could be executed even if only
readline 6.2 was installed, leading to unexpected runtime crashes of the binary.
As a side note: The current_version should always be greater or equal than the
compatibility_version; the only reason for those to differ (that I am aware of)
is to allow client code to determine the precise version of the loaded shared
library, e.g. to determine if it has a patch level that avoids a known bug etc.
that is independent of the ABI version.
However, the patch level is not visible to the build code, so for readline, the
compatibility_version and current_version simply are always equal.
Cheers,
Max
0001-refactor-shobj-conf-to-improve-readability.patch
Description: Binary data
0002-drop-useless-v-linker-flag-fix-compatibility_version.patch
Description: Binary data
signature.asc
Description: Message signed with OpenPGP using GPGMail
- [Bug-readline] Set correct -compatibility_version in .dylib on Mac OS X,
Max Horn <=