]> git.ipfire.org Git - thirdparty/glibc.git/commit
Makeconfig: Move -Wl,-rpath-link options before library references
authorFlorian Weimer <fweimer@redhat.com>
Fri, 26 Apr 2019 05:16:30 +0000 (07:16 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Fri, 26 Apr 2019 05:16:50 +0000 (07:16 +0200)
commita8ff215e56050a907189e713fd449bcafe99ff6b
tree67001f26b41a012506ef305063c11c540d901b0e
parente30fb31c0ad8d31babd1d0d0f05e37c6579a870b
Makeconfig: Move -Wl,-rpath-link options before library references

Previously, the -Wl,-rpath-link options came after the libraries
injected using LDLIBS-* variables on the link editor command line for
main programs.  As a result, it could happen that installed libraries
that reference glibc libraries used the installed glibc from the system
directories, instead of the glibc from the build tree.  This can lead to
link failures if the wrong version of libpthread.so.0 is used, for
instance, due to differences in the internal GLIBC_PRIVATE interfaces,
as seen with memusagestat and -lgd after commit
f9b645b4b0a10c43753296ce3fa40053fa44606a ("memusagestat: use local glibc
when linking [BZ #18465]").

The isolation is necessarily imperfect because these installed
libraries are linked against the installed glibc in the system
directories.  However, in most cases, the built glibc will be newer
than the installed glibc, and this link is permitted because of the
ABI backwards compatibility glibc provides.
ChangeLog
Makeconfig