Skip to content

Commit

Permalink
Fixed bug 4367 - compatibility version decreased between 2.0.8 and 2.0.9
Browse files Browse the repository at this point in the history
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
  • Loading branch information
slouken committed Nov 13, 2018
1 parent c525ff3 commit 5e15319
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions build-scripts/ltmain.sh
Expand Up @@ -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)
Expand Down

0 comments on commit 5e15319

Please sign in to comment.