diff options
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | add-loongarch-support-for-debugedit.patch | 29 | ||||
-rw-r--r-- | debugedit.spec | 85 | ||||
-rw-r--r-- | find-debuginfo.sh-decompress-DWARF-compressed-ELF-se.patch | 29 | ||||
-rw-r--r-- | sources | 2 |
5 files changed, 147 insertions, 0 deletions
@@ -0,0 +1,2 @@ +/debugedit-5.1.tar.xz +/debugedit-5.1.tar.xz.sig diff --git a/add-loongarch-support-for-debugedit.patch b/add-loongarch-support-for-debugedit.patch new file mode 100644 index 0000000..23e8a8d --- /dev/null +++ b/add-loongarch-support-for-debugedit.patch @@ -0,0 +1,29 @@ +From 0862098a423f3324b5e8024f94e42ebcc1ec1697 Mon Sep 17 00:00:00 2001 +From: Wenlong Zhang <zhangwenlong@loongson.cn> +Date: Mon, 9 Jan 2023 18:40:28 +0800 +Subject: [PATCH] add loongarch support for debugedit + +--- + tools/debugedit.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/tools/debugedit.c b/tools/debugedit.c +index 668777a..911e84e 100644 +--- a/tools/debugedit.c ++++ b/tools/debugedit.c +@@ -618,6 +618,12 @@ setup_relbuf (DSO *dso, debug_section *sec, int *reltype) + goto fail; + break; + #endif ++#if defined(EM_LOONGARCH) ++ case EM_LOONGARCH: ++ if (rtype != R_LARCH_32) ++ goto fail; ++ break; ++#endif + #if defined(EM_MCST_ELBRUS) && defined(R_E2K_32_ABS) + case EM_MCST_ELBRUS: + if (rtype != R_E2K_32_ABS) +-- +2.33.0 + diff --git a/debugedit.spec b/debugedit.spec new file mode 100644 index 0000000..f475df8 --- /dev/null +++ b/debugedit.spec @@ -0,0 +1,85 @@ +Name: debugedit +Version: 5.1 +Release: 1 +Summary: Tools for debuginfo creation +License: GPL-2.0-or-later and LGPL-2.1-only and GPL-3.0-only +Group: Applications +URL: https://sourceware.org/debugedit/ +Source0: https://sourceware.org/pub/debugedit/%{version}/%{name}-%{version}.tar.xz +Source1: https://sourceware.org/pub/debugedit/%{version}/%{name}-%{version}.tar.xz.sig + +BuildRequires: help2man gnupg2 elfutils-devel make gcc autoconf automake +BuildRequires: pkgconfig(libelf) +BuildRequires: pkgconfig(libdw) + +Requires: binutils gawk coreutils xz elfutils findutils +Requires: /usr/bin/gdb-add-index +Suggests: gdb-minimal +Requires: sed dwz grep + +Patch1: find-debuginfo.sh-decompress-DWARF-compressed-ELF-se.patch + +Patch9000: add-loongarch-support-for-debugedit.patch + +%description +Debugedit provides programs and scripts for creating debuginfo and +source file distributions, collect build-ids and rewrite source +paths in DWARF data for debugging, tracing and profiling. + +%prep +%autosetup -p1 -n %{name}-%{version} + +%build +%configure +%make_build + +%install +%make_install +cd %{buildroot}%{_bindir} +ln -s find-debuginfo find-debuginfo.sh +cd %{buildroot} +mkdir -p %{buildroot}%{_rpmconfigdir} +ln -s %{_bindir}/find-debuginfo %{buildroot}%{_rpmconfigdir}/find-debuginfo.sh +ln -s %{_bindir}/debugedit %{buildroot}%{_rpmconfigdir}/debugedit + +%check +sed -i 's/^\(C\|LD\)FLAGS=.*/\1FLAGS=""/' tests/atlocal +%make_build check + +%files +%license COPYING COPYING3 COPYING.LIB +%doc README +%{_bindir}/debugedit +%{_bindir}/sepdebugcrcfix +%{_bindir}/find-debuginfo +%{_bindir}/find-debuginfo.sh +%{_mandir}/man1/debugedit.1* +%{_mandir}/man1/sepdebugcrcfix.1* +%{_mandir}/man1/find-debuginfo.1* +%{_rpmconfigdir}/find-debuginfo.sh +%{_rpmconfigdir}/debugedit + +%changelog +* Sat Nov 02 2024 Funda Wang <fundawang@yeah.net> - 5.1-1 +- update to 5.1 + +* Tue May 28 2024 shaojiansong <shaojiansong@kylinos.cn> - 5.0-7 +- Fix lack of loongarch64 patch files in src.rpm package which is build from any platform. + +* Fri Jan 6 2023 Wenlong Zhang<zhangwenlong@loongson.cn> - 5.0-6 +- add loongarch64 support for debugedit + +* Mon Nov 14 2022 Wenlong Zhang <zhangwenlong@loongson.cn> - 5.0-5 +- Skip some unsupported tests for loongarch + +* Tue Nov 08 2022 renhongxun <renhongxun@h-partners.com> 5.0-4 +- make it successfully to find debugedit when running /usr/lib/rpm/find-debuginfo.sh + +* Fri Oct 21 2022 renhongxun <renhongxun@h-partners.com> 5.0-3 +- fix -u option + +* Tue Jan 11 2022 renhongxun <renhongxun@huawei.com> 5.0-2 +- bugfix + +* Sat Dec 25 2021 renhongxun <renhongxun@huawei.com> +- init package diff --git a/find-debuginfo.sh-decompress-DWARF-compressed-ELF-se.patch b/find-debuginfo.sh-decompress-DWARF-compressed-ELF-se.patch new file mode 100644 index 0000000..23165e7 --- /dev/null +++ b/find-debuginfo.sh-decompress-DWARF-compressed-ELF-se.patch @@ -0,0 +1,29 @@ +From f2bc669cd0a080792522dd1bb7f50ef7025f16f0 Mon Sep 17 00:00:00 2001 +From: Mark Wielaard <mark@klomp.org> +Date: Sat, 21 Jul 2018 10:13:04 +0200 +Subject: [PATCH] find-debuginfo.sh: decompress DWARF compressed ELF sections + +debugedit and dwz do not support DWARF compressed ELF sections, let's +just decompress those before extracting debuginfo. + +Tested-by: Igor Gnatenko <i.gnatenko.brain@gmail.com> +--- + scripts/find-debuginfo.in | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/scripts/find-debuginfo.in b/scripts/find-debuginfo.in +index 90a44942d..7b01bc036 100755 +--- a/scripts/find-debuginfo.in ++++ b/scripts/find-debuginfo.in +@@ -460,6 +460,9 @@ + get_debugfn "$f" + [ -f "${debugfn}" ] && return + ++ echo "explicitly decompress any DWARF compressed ELF sections in $f" ++ eu-elfcompress -q -p -t none "$f" ++ + $verbose && echo "extracting debug info from $f" + # See also cpio SOURCEFILE copy. Directories must match up. + debug_base_name="$RPM_BUILD_DIR" +-- +2.18.0 @@ -0,0 +1,2 @@ +25b796b3998d3c33aedcac2216f34dd9 debugedit-5.1.tar.xz +923496d6b57c6ff83f53944409d1037d debugedit-5.1.tar.xz.sig |