From ab4dea5d1620ef116386ca23d809434cad0f05f9 Mon Sep 17 00:00:00 2001 From: pan-y Date: Fri, 8 Sep 2023 09:04:21 +0800 Subject: [PATCH] Fix issues about not stripped --- glibc.spec | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/glibc.spec b/glibc.spec index a689b87..3998a56 100644 --- a/glibc.spec +++ b/glibc.spec @@ -48,7 +48,9 @@ %undefine with_valgrind %endif +%if %{?openEuler:1}0 %global ENABLE_RELOC 1 +%endif # Only some architectures have static PIE support %define pie_arches %{ix86} x86_64 aarch64 @@ -67,7 +69,7 @@ ############################################################################## Name: glibc Version: 2.38 -Release: 5 +Release: 6 Summary: The GNU libc libraries License: %{all_license} URL: http://www.gnu.org/software/glibc/ @@ -497,6 +499,14 @@ pushd $builddir make %{?_smp_mflags} -O -r %{glibc_make_flags} popd +%if %{ENABLE_RELOC} +mkdir -p relocation +pushd relocation +cp ../$builddir/libc.so.6 ./ +objreloc libc.so.6 +popd +%endif + ############################################################################## # Build libpthread-2.17.so ############################################################################## @@ -869,11 +879,8 @@ echo "%{_prefix}/libexec/glibc-benchtests/validate_benchout.py*" >> benchtests.f %endif %if %{ENABLE_RELOC} -pushd build-%{target} -objreloc libc.so.6 mkdir -p ${RPM_BUILD_ROOT}/usr/lib/relocation/%{_libdir} -install -p ${RPM_BUILD_DIR}/%{name}-%{version}/build-%{target}/libc.so.6.relocation ${RPM_BUILD_ROOT}/usr/lib/relocation/%{_libdir} -popd +install -p ${RPM_BUILD_DIR}/%{name}-%{version}/relocation/libc.so.6.relocation ${RPM_BUILD_ROOT}/usr/lib/relocation/%{_libdir} %endif reliantlib="" @@ -1018,6 +1025,13 @@ popd %endif # %{run_glibc_tests} +%if %{ENABLE_RELOC} +for file in $(find $RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT/lib64 -name "*.so*" -exec file {} ';' | grep "\" | awk -F ':' '{print $1}') +do + strip $file +done +%endif + ############################################################################## # Install and uninstall scripts ############################################################################## @@ -1295,6 +1309,9 @@ fi %endif %changelog +* Wed Sep 6 2023 yanpan - 2.38-6 +- fix issues about not stripped + * Mon Aug 28 2023 liutie - 2.38-5 - fix issues about glibc-devel have libc.so.6.relocation -- Gitee