From 13528d91eeb488c2474b6d70494e1933ac7ac94b Mon Sep 17 00:00:00 2001 From: Yang Yanchao Date: Wed, 6 Jul 2022 11:13:35 +0800 Subject: [PATCH] add libpthread_nonshared.a in glibc-compat-2.17 for old applications Signed-off-by: Yang Yanchao --- glibc.spec | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/glibc.spec b/glibc.spec index e9a741b..6385dcd 100644 --- a/glibc.spec +++ b/glibc.spec @@ -66,7 +66,7 @@ ############################################################################## Name: glibc Version: 2.34 -Release: 90 +Release: 91 Summary: The GNU libc libraries License: %{all_license} URL: http://www.gnu.org/software/glibc/ @@ -516,7 +516,8 @@ Summary: provides pthread library with glibc-2.17 %description compat-2.17 This subpackage to provide the function of the glibc-2.17 pthread library. -Currently, provide pthread_condition function.. +Currently, provide pthread_condition function. +To keep older applications compatible, glibc-compat-2.17 provides libpthread_nonshared.a %endif ############################################################################## @@ -713,6 +714,9 @@ install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT/etc/nsswitch.conf # This is for compat-2.17 %if %{with compat_2_17} install -p -m 755 build-%{target}/nptl/libpthread-2.17.so $RPM_BUILD_ROOT%{_libdir} +# Build an empty libpthread_nonshared.a for compatiliby with applications +# that have old linker scripts that reference this file. +ar cr $RPM_BUILD_ROOT/%{_prefix}/%{_lib}/libpthread_nonshared.a %endif # This is for ncsd - in glibc 2.2 @@ -850,6 +854,7 @@ touch compat-2.17.filelist -e '\,.*%{_libdir}/lib\(pcprofile\|memusage\)\.so,d' \ %if %{with compat_2_17} -e '\,.*%{_libdir}/libpthread-2.17.so,d' \ + -e '\,.*%{_libdir}/libpthread_nonshared.a,d' \ %endif -e '\,.*/bin/\(memusage\|mtrace\|xtrace\|pcprofiledump\),d' } | sort > master.filelist @@ -985,6 +990,7 @@ echo "%{_prefix}/libexec/glibc-benchtests/validate_benchout.py*" >> benchtests.f # glibc compat-2.17 sub-package ############################################################################## echo "%{_libdir}/libpthread-2.17.so" >> compat-2.17.filelist + echo "%{_libdir}/libpthread_nonshared.a" >> compat-2.17.filelist %endif reliantlib="" @@ -1401,6 +1407,9 @@ fi %endif %changelog +* Wed Jul 6 2022 Yang Yanchao - 2.34-91 +- add libpthread_nonshared.a in glibc-compat-2.17 for old applications + * Wed Jul 6 2022 Qingqing Li - 2.34-90 - enable -werror by default