diff --git a/glibc.spec b/glibc.spec index 5ba3f846dc9981b8b2753f6841a25494606ac15e..152b6246776f6cc7a5d5a40d02d0e7c9a46e3d25 100644 --- a/glibc.spec +++ b/glibc.spec @@ -66,7 +66,7 @@ ############################################################################## Name: glibc Version: 2.34 -Release: 119 +Release: 120 Summary: The GNU libc libraries License: %{all_license} URL: http://www.gnu.org/software/glibc/ @@ -573,6 +573,17 @@ Currently, provide pthread_condition function. To keep older applications compatible, glibc-compat-2.17 provides libpthread_nonshared.a %endif +############################################################################## +# glibc reloc sub-package +############################################################################## +%package reloc +Summary: Relocations for %{name} +Requires: %{name} = %{version}-%{release} +BuildRequires: sysboost-devel + +%description reloc +This package contains relocations for %{name}. + ############################################################################## # Prepare for the build. ############################################################################## @@ -637,7 +648,7 @@ builddir=build-%{target} rm -rf $builddir mkdir $builddir pushd $builddir -../configure CC="%GCC" CXX="%GXX" CFLAGS="$BuildFlags" \ +../configure CC="%GCC" CXX="%GXX" CFLAGS="$BuildFlags" LDFLAGS="-Wl,--emit-relocs" \ --prefix=%{_prefix} \ --with-headers=%{_prefix}/include $EnableKernel \ --with-nonshared-cflags=-Wp,-D_FORTIFY_SOURCE=2 \ @@ -1051,6 +1062,13 @@ echo "%{_prefix}/libexec/glibc-benchtests/validate_benchout.py*" >> benchtests.f echo "%{_libdir}/libpthread_nonshared.a" >> compat-2.17.filelist %endif +pushd build-%{target} +objreloc ./libc.so +objreloc ./elf/ld.so +install -p -m 755 ./libc.so.relocation $RPM_BUILD_ROOT%{_libdir} +install -p -m 755 ./elf/ld.so.relocation $RPM_BUILD_ROOT%{_libdir} +popd + reliantlib="" function findReliantLib() @@ -1393,6 +1411,8 @@ fi %attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /etc/gai.conf %{!?_licensedir:%global license %%doc} %license COPYING COPYING.LIB LICENSES +%exclude %{_libdir}/libc.so.relocation +%exclude %{_libdir}/ld.so.relocation %files -f common.filelist common %dir %{_prefix}/lib/locale @@ -1417,6 +1437,8 @@ fi %attr(0644,root,root) %{_prefix}/lib/locale/locale-archive.update %files -f devel.filelist devel +%exclude %{_libdir}/libc.so.relocation +%exclude %{_libdir}/ld.so.relocation %files -f nscd.filelist -n nscd %config(noreplace) /etc/nscd.conf @@ -1466,7 +1488,15 @@ fi %files -f compat-2.17.filelist compat-2.17 %endif +%files reloc +%{_libdir}/libc.so.relocation +%{_libdir}/ld.so.relocation + %changelog +* Mon May 8 2023 liutie - 2.34-120 +- malloc: libc.so: create reloc for sysboost +- malloc: elf/ld.so: create reloc for sysboost + * Mon May 08 2023 laokz - 2.34-119 - Backport RISC-V patches: - Align stack in clone (from v2.35)