[Bug dynamic-link/31719] --enable-hardcoded-path-in-tests doesn't work with -Wl,--enable-new-dtags
cvs-commit at gcc dot gnu.org
sourceware-bugzilla@sourceware.org
Fri May 10 12:06:29 GMT 2024
https://sourceware.org/bugzilla/show_bug.cgi?id=31719
--- Comment #5 from Sourceware Commits <cvs-commit at gcc dot gnu.org> ---
The release/2.36/master branch has been updated by H.J. Lu
<hjl@sourceware.org>:
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=ee65bc1df6268c561e6c62dcc4435fbbf705bc67
commit ee65bc1df6268c561e6c62dcc4435fbbf705bc67
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Thu May 9 20:07:01 2024 -0700
Force DT_RPATH for --enable-hardcoded-path-in-tests
On Fedora 40/x86-64, linker enables --enable-new-dtags by default which
generates DT_RUNPATH instead of DT_RPATH. Unlike DT_RPATH, DT_RUNPATH
only applies to DT_NEEDED entries in the executable and doesn't applies
to DT_NEEDED entries in shared libraries which are loaded via DT_NEEDED
entries in the executable. Some glibc tests have libstdc++.so.6 in
DT_NEEDED, which has libm.so.6 in DT_NEEDED. When DT_RUNPATH is generated,
/lib64/libm.so.6 is loaded for such tests. If the newly built glibc is
older than glibc 2.36, these tests fail with
assert/tst-assert-c++:
/export/build/gnu/tools-build/glibc-gitlab-release/build-x86_64-linux/libc.so.6:
version `GLIBC_2.36' not found (required by /lib64/libm.so.6)
assert/tst-assert-c++:
/export/build/gnu/tools-build/glibc-gitlab-release/build-x86_64-linux/libc.so.6:
version `GLIBC_ABI_DT_RELR' not found (required by /lib64/libm.so.6)
Pass -Wl,--disable-new-dtags to linker when building glibc tests with
--enable-hardcoded-path-in-tests. This fixes BZ #31719.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
(cherry picked from commit 2dcaf70643710e22f92a351e36e3cff8b48c60dc)
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Glibc-bugs
mailing list