!589 Generate available relocations for sysboost

From: @ironictwist 
Reviewed-by: @liqingqing_1229 
Signed-off-by: @liqingqing_1229
This commit is contained in:
openeuler-ci-bot 2023-05-12 09:33:29 +00:00 committed by Gitee
commit d2186f2cd7
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -66,7 +66,7 @@
############################################################################## ##############################################################################
Name: glibc Name: glibc
Version: 2.34 Version: 2.34
Release: 119 Release: 120
Summary: The GNU libc libraries Summary: The GNU libc libraries
License: %{all_license} License: %{all_license}
URL: http://www.gnu.org/software/glibc/ 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 To keep older applications compatible, glibc-compat-2.17 provides libpthread_nonshared.a
%endif %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. # Prepare for the build.
############################################################################## ##############################################################################
@ -637,7 +648,7 @@ builddir=build-%{target}
rm -rf $builddir rm -rf $builddir
mkdir $builddir mkdir $builddir
pushd $builddir pushd $builddir
../configure CC="%GCC" CXX="%GXX" CFLAGS="$BuildFlags" \ ../configure CC="%GCC" CXX="%GXX" CFLAGS="$BuildFlags" LDFLAGS="-Wl,--emit-relocs" \
--prefix=%{_prefix} \ --prefix=%{_prefix} \
--with-headers=%{_prefix}/include $EnableKernel \ --with-headers=%{_prefix}/include $EnableKernel \
--with-nonshared-cflags=-Wp,-D_FORTIFY_SOURCE=2 \ --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 echo "%{_libdir}/libpthread_nonshared.a" >> compat-2.17.filelist
%endif %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="" reliantlib=""
function findReliantLib() function findReliantLib()
@ -1393,6 +1411,8 @@ fi
%attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /etc/gai.conf %attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /etc/gai.conf
%{!?_licensedir:%global license %%doc} %{!?_licensedir:%global license %%doc}
%license COPYING COPYING.LIB LICENSES %license COPYING COPYING.LIB LICENSES
%exclude %{_libdir}/libc.so.relocation
%exclude %{_libdir}/ld.so.relocation
%files -f common.filelist common %files -f common.filelist common
%dir %{_prefix}/lib/locale %dir %{_prefix}/lib/locale
@ -1417,6 +1437,8 @@ fi
%attr(0644,root,root) %{_prefix}/lib/locale/locale-archive.update %attr(0644,root,root) %{_prefix}/lib/locale/locale-archive.update
%files -f devel.filelist devel %files -f devel.filelist devel
%exclude %{_libdir}/libc.so.relocation
%exclude %{_libdir}/ld.so.relocation
%files -f nscd.filelist -n nscd %files -f nscd.filelist -n nscd
%config(noreplace) /etc/nscd.conf %config(noreplace) /etc/nscd.conf
@ -1466,7 +1488,15 @@ fi
%files -f compat-2.17.filelist compat-2.17 %files -f compat-2.17.filelist compat-2.17
%endif %endif
%files reloc
%{_libdir}/libc.so.relocation
%{_libdir}/ld.so.relocation
%changelog %changelog
* Mon May 8 2023 liutie <liutie4@huawei.com> - 2.34-120
- malloc: libc.so: create reloc for sysboost
- malloc: elf/ld.so: create reloc for sysboost
* Mon May 08 2023 laokz <zhangkai@iscas.ac.cn> - 2.34-119 * Mon May 08 2023 laokz <zhangkai@iscas.ac.cn> - 2.34-119
- Backport RISC-V patches: - Backport RISC-V patches:
- Align stack in clone (from v2.35) - Align stack in clone (from v2.35)