fe44ecf795
- Fix pr24468.sh test-case with newer readelf. * dwz-testsuite-adjust-pr24468-sh-test-case-for-readelf-with-follow-links.patch * dwz-testsuite-fix-partial-unit-grepping-in-pr24468-sh.patch - Detect when devel-ignore-size.sh is unsupported [swo#27115]. * dwz-testsuite-detect-when-devel-ignore-size-sh-is-unsupported.patch OBS-URL: https://build.opensuse.org/request/show/861040 OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/dwz?expand=0&rev=32
157 lines
4.3 KiB
RPMSpec
157 lines
4.3 KiB
RPMSpec
#
|
|
# spec file for package dwz
|
|
#
|
|
# Copyright (c) 2021 SUSE LLC
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%define flavor @BUILD_FLAVOR@%{nil}
|
|
|
|
%bcond_with ringdisabled
|
|
|
|
%if "%flavor" == "testsuite"
|
|
%if %{with ringdisabled}
|
|
ExclusiveArch: do_not_build
|
|
%endif
|
|
%define build_main 0
|
|
%define build_testsuite 1
|
|
%else
|
|
%define build_main 1
|
|
%define build_testsuite 0
|
|
%endif
|
|
|
|
%if %{build_testsuite}
|
|
%define debug_package %{nil}
|
|
%endif
|
|
|
|
%if %{build_main}
|
|
%define name_suffix %{nil}
|
|
%else
|
|
%define name_suffix -%{flavor}
|
|
%endif
|
|
|
|
Name: dwz%{name_suffix}
|
|
Version: 0.13
|
|
Release: 0
|
|
%if %{build_main}
|
|
Summary: DWARF optimization and duplicate removal tool
|
|
License: GPL-2.0-or-later AND LGPL-2.0-or-later
|
|
Group: Development/Tools/Building
|
|
%endif
|
|
%if %{build_testsuite}
|
|
Summary: Testsuite results from DWZ
|
|
License: GPL-2.0-or-later AND LGPL-2.0-or-later
|
|
Group: Development/Tools/Building
|
|
%endif
|
|
#Git-Clone: git://sourceware.org/git/dwz
|
|
#Git-Web: https://sourceware.org/git/?p=dwz.git;a=summary
|
|
Source: dwz-%{version}.tar.xz
|
|
URL: https://sourceware.org/dwz/
|
|
BuildRequires: libelf-devel
|
|
BuildRequires: xz
|
|
%if %{build_testsuite}
|
|
BuildRequires: dejagnu
|
|
BuildRequires: elfutils
|
|
BuildRequires: gdb
|
|
%ifnarch riscv64
|
|
BuildRequires: binutils-gold
|
|
%endif
|
|
%endif
|
|
|
|
%if !%{build_main}
|
|
# It's a bit pointless to ship two identical source packages, one for dwz and
|
|
# one for dwz-testsuite. So we make the second one small by excluding the
|
|
# source archive. We could do the same for the patches with NoPatch, but the
|
|
# gain is smaller there and looks more cumbersome to maintain.
|
|
NoSource: 0
|
|
%endif
|
|
|
|
Source1: dwz-rpmlintrc
|
|
|
|
Patch1: dwz-update-version-copyright-message.patch
|
|
Patch2: dwz-fix-die-no-multifile-propagation.patch
|
|
Patch3: dwz-fix-assertion-off-cu_size-in-recompute_abbrevs.patch
|
|
Patch4: dwz-fix-refd-NULL-assertion-in-write_die.patch
|
|
Patch5: dwz-fix-reference-from-pu-to-cu.patch
|
|
Patch6: dwz-fix-segfault-in-die_cu.patch
|
|
Patch7: dwz-testsuite-detect-when-devel-ignore-size-sh-is-unsupported.patch
|
|
Patch8: dwz-testsuite-adjust-pr24468-sh-test-case-for-readelf-with-follow-links.patch
|
|
Patch9: dwz-testsuite-fix-partial-unit-grepping-in-pr24468-sh.patch
|
|
|
|
%if %{build_main}
|
|
%description
|
|
dwz optimizes DWARF debugging information contained in ELF shared
|
|
libraries and executables for size, by replacing DWARF information
|
|
representation with equivalent smaller representation where possible,
|
|
and by reducing the amount of duplication using techniques from the
|
|
DWARF standard appendix E - creating DW_TAG_partial_unit compilation
|
|
units (CUs) for duplicated information and using DW_TAG_imported_unit
|
|
to import it into each CU that needs it.
|
|
|
|
The tool handles DWARF 32-bit format debugging sections of versions
|
|
2, 3 and 4 and GNU extensions on top of those, though using DWARF 4
|
|
or worst case DWARF 3 is strongly recommended.
|
|
|
|
When not using the -m option (multifile mode), GDB CVS snapshot (soon to be
|
|
7.5) is sufficient, when using -m option, GDB from a git branch
|
|
http://sources.redhat.com/git/?p=archer.git;a=shortlog;h=refs/heads/archer-tromey-dwz-multifile
|
|
is needed.
|
|
%endif
|
|
|
|
%if %{build_testsuite}
|
|
%description
|
|
This package contains the testsuite results from DWZ.
|
|
%endif
|
|
|
|
%prep
|
|
%setup -q -n dwz
|
|
%patch1 -p1
|
|
%patch2 -p1
|
|
%patch3 -p1
|
|
%patch4 -p1
|
|
%patch5 -p1
|
|
%patch6 -p1
|
|
%patch7 -p1
|
|
%patch8 -p1
|
|
%patch9 -p1
|
|
|
|
%build
|
|
make %{?_smp_mflags} CFLAGS="%{optflags}"
|
|
|
|
%check
|
|
%if %{build_testsuite}
|
|
make -k check
|
|
%endif
|
|
|
|
%install
|
|
%if %{build_main}
|
|
%make_install
|
|
%endif
|
|
|
|
%if %{build_main}
|
|
%files
|
|
%license COPYING
|
|
%{_bindir}/dwz
|
|
%{_mandir}/man1/dwz.1%{?ext_man}
|
|
%endif
|
|
|
|
%if %{build_testsuite}
|
|
%files
|
|
%defattr(-,root,root)
|
|
%doc dwz.sum
|
|
%doc dwz.log
|
|
%endif
|
|
|
|
%changelog
|