Strip .gnu.build-attrib* sections out of libraries

This is to work around an issue where find-debuginfo.sh is not stipping
debuginfo from the libraries.  See
https://issues.redhat.com/browse/RHEL-43211

Resolves: RHEL-29882
This commit is contained in:
Tom Stellard 2024-06-22 09:21:57 -07:00
parent c794510e07
commit 020fcde1b6

View File

@ -80,7 +80,7 @@
Name: %pkg_name Name: %pkg_name
Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}}%{?llvm_snapshot_version_suffix:~%{llvm_snapshot_version_suffix}} Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}}%{?llvm_snapshot_version_suffix:~%{llvm_snapshot_version_suffix}}
Release: 5%{?dist} Release: 6%{?dist}
Summary: A C language family front-end for LLVM Summary: A C language family front-end for LLVM
License: NCSA License: NCSA
@ -445,6 +445,16 @@ CFLAGS="$CFLAGS -Wno-address -Wno-nonnull -Wno-maybe-uninitialized"
%cmake_build %cmake_build
%ifarch aarch64
# Strip .gnu.build.attrib sections, because find-debuginfo.sh is failing to strip debug info,
# because there are too many of them.
# https://issues.redhat.com/browse/RHEL-43211
for f in libclang-cpp.so.%{maj_ver}.%{min_ver} libclang.so.%{maj_ver}.%{min_ver}.%{patch_ver}; do
objcopy -R '.gnu.build.attrib*' aarch64-redhat-linux-gnu/lib64/$f
done
%endif
%install %install
%cmake_install %cmake_install
@ -732,6 +742,9 @@ SOURCE_DATE_EPOCH=1629181597 LD_LIBRARY_PATH=%{buildroot}/%{install_libdir} %{__
%endif %endif
%changelog %changelog
* Sat Jun 22 2024 Tom Stellard <tstellar@redhat.com> - 18.1.2-6
- Strip .gnu.build-attrib* sections out of libraries
* Sat May 25 2024 Tom Stellard <tstellar@redhat.com> - 18.1.2-5 * Sat May 25 2024 Tom Stellard <tstellar@redhat.com> - 18.1.2-5
- Set SOURCE_DATE_EPOCH when testing - Set SOURCE_DATE_EPOCH when testing