Fixed bug 4367 - compatibility version decreased between 2.0.8 and 2.0.9

Joshua Root

The change resulting from Bug 4208 changed the compatibility_version of libSDL2 from 9.0.0 to 1.0.0. This is simply wrong.

This means that programs linked against 2.0.9 are considered by the dynamic linker to be compatible with all previous versions of libSDL2. This is not the case since new public symbols have been added.

The way compatibility_version and current_version are meant to work is:
 * current_version increases every time the library changes in any way.
 * compatibility_version is increased to match current_version whenever new public symbols are added.

Thus both versions should only ever increase. The solution to the Xcode project and autotools not having matching versions should have been to increase the version(s) in the Xcode project.

Reference: https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/VersionInformation.html
This commit is contained in:
Sam Lantinga 2018-11-12 16:34:58 -08:00
parent c525ff354d
commit 5e1531944c
1 changed files with 2 additions and 5 deletions

View File

@ -7404,11 +7404,8 @@ func_mode_link ()
# Darwin ld doesn't like 0 for these options...
func_arith $current + 1
minor_current=$func_arith_result
#xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
#verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
# make the compatibility version match the Xcode project files, i.e. 1.0
xlcverstring="${wl}-compatibility_version 1.0 ${wl}-current_version ${wl}$minor_current.$revision"
verstring="-compatibility_version 1.0 -current_version $minor_current.$revision"
xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
;;
freebsd-aout)