2008-02-29 18:33:20 +01:00
|
|
|
#
|
2011-08-22 16:45:50 +02:00
|
|
|
# spec file for package dwarves
|
2008-02-29 18:33:20 +01:00
|
|
|
#
|
2022-01-05 13:14:45 +01:00
|
|
|
# Copyright (c) 2022 SUSE LLC
|
2008-02-29 18:33:20 +01:00
|
|
|
#
|
2011-08-22 16:45:50 +02:00
|
|
|
# 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.
|
|
|
|
|
2019-05-02 15:17:16 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2008-02-29 18:33:20 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2021-07-17 20:00:13 +02:00
|
|
|
%if 0%{?suse_version} > 1500 || 0%{?sle_version} > 150300
|
|
|
|
%define have_libbpf 1
|
|
|
|
%endif
|
2021-08-24 01:52:54 +02:00
|
|
|
%if (0%{?sle_version} && 0%{?sle_version} <= 150300) || (0%{?suse_version} && 0%{?suse_version} < 1500)
|
|
|
|
%define have_libebl_plugins 1
|
2021-08-13 16:54:29 +02:00
|
|
|
%endif
|
2021-07-17 20:00:13 +02:00
|
|
|
|
2008-02-29 18:33:20 +01:00
|
|
|
Name: dwarves
|
2021-12-11 11:36:58 +01:00
|
|
|
Version: 1.23
|
2014-10-15 16:38:11 +02:00
|
|
|
Release: 0
|
2008-02-29 18:33:20 +01:00
|
|
|
Summary: DWARF utilities
|
2018-03-26 14:53:02 +02:00
|
|
|
License: GPL-2.0-only
|
2011-08-12 22:23:09 +02:00
|
|
|
Group: Development/Tools/Debuggers
|
2021-06-02 16:05:49 +02:00
|
|
|
URL: https://acmel.wordpress.com/
|
2020-10-27 16:53:21 +01:00
|
|
|
#Git-Clone: git://git.kernel.org/pub/scm/devel/pahole/pahole
|
|
|
|
#Git-Web: http://git.kernel.org/cgit/devel/pahole/pahole.git
|
2021-08-24 01:52:54 +02:00
|
|
|
Source: https://fedorapeople.org/~acme/dwarves/dwarves-%version.tar.xz
|
|
|
|
Source2: https://fedorapeople.org/~acme/dwarves/dwarves-%version.tar.sign
|
2019-05-03 11:05:29 +02:00
|
|
|
Source9: baselibs.conf
|
2012-06-06 23:46:07 +02:00
|
|
|
BuildRequires: cmake
|
2021-04-22 12:26:14 +02:00
|
|
|
BuildRequires: libdw-devel >= 0.171
|
2012-06-06 23:46:07 +02:00
|
|
|
BuildRequires: libelf-devel
|
2021-06-02 16:05:49 +02:00
|
|
|
BuildRequires: pkgconfig
|
2021-07-17 20:00:13 +02:00
|
|
|
%if 0%{?have_libbpf}
|
2022-01-05 13:21:34 +01:00
|
|
|
BuildRequires: linux-glibc-devel >= 5.16
|
2021-12-11 11:36:58 +01:00
|
|
|
BuildRequires: pkgconfig(libbpf) >= 0.6.0
|
2021-07-17 20:00:13 +02:00
|
|
|
%endif
|
2018-03-26 14:53:02 +02:00
|
|
|
BuildRequires: pkgconfig(zlib)
|
2011-08-12 22:23:09 +02:00
|
|
|
# Also known by its most prominent tool
|
2011-08-22 16:45:50 +02:00
|
|
|
Provides: pahole = %version-%release
|
2021-08-13 16:54:29 +02:00
|
|
|
%if 0%{?have_libebl_plugins}
|
2021-06-02 16:05:49 +02:00
|
|
|
BuildRequires: libebl-devel
|
|
|
|
%endif
|
2008-02-29 18:33:20 +01:00
|
|
|
|
|
|
|
%description
|
2011-08-12 22:23:09 +02:00
|
|
|
dwarves is a set of tools that use the DWARF debugging information
|
|
|
|
inserted in ELF binaries by compilers such as GCC, used by well known
|
|
|
|
debuggers such as GDB, and more recent ones such as systemtap.
|
|
|
|
|
|
|
|
Utilities in the dwarves suite include pahole, that can be used to
|
|
|
|
find alignment holes in structs and classes in languages such as C,
|
|
|
|
C++, but not limited to these.
|
|
|
|
|
|
|
|
It also extracts other information such as CPU cacheline alignment,
|
|
|
|
helping pack those structures to achieve more cache hits.
|
|
|
|
|
|
|
|
A diff like tool, codiff can be used to compare the effects changes
|
|
|
|
in source code generate on the resulting binaries.
|
|
|
|
|
|
|
|
Another tool is pfunct, that can be used to find all sorts of
|
|
|
|
information about functions, inlines, decisions made by the compiler
|
|
|
|
about inlining, etc.
|
|
|
|
|
2008-02-29 18:33:20 +01:00
|
|
|
%package -n libdwarves1
|
2008-02-29 19:21:01 +01:00
|
|
|
Summary: DWARF processing libraries of dwarves tools
|
2011-08-12 22:23:09 +02:00
|
|
|
Group: System/Libraries
|
2021-08-13 16:54:29 +02:00
|
|
|
%if 0%{?have_libebl_plugins}
|
2018-03-26 14:53:02 +02:00
|
|
|
Requires: libebl-plugins
|
2020-05-19 13:51:18 +02:00
|
|
|
%endif
|
2008-02-29 18:33:20 +01:00
|
|
|
|
2017-02-01 16:44:54 +01:00
|
|
|
%description -n libdwarves1
|
2011-08-12 22:23:09 +02:00
|
|
|
This package contains the libdwarves shared library for the dwarves
|
|
|
|
toolset, providing processing for DWARF, a debugging data format
|
|
|
|
for ELF files.
|
|
|
|
|
|
|
|
dwarves is a set of tools that use the DWARF debugging information
|
|
|
|
inserted in ELF binaries by compilers such as GCC, used by well known
|
|
|
|
debuggers such as GDB, and more recent ones such as systemtap.
|
2008-02-29 18:33:20 +01:00
|
|
|
|
|
|
|
%package -n libdwarves-devel
|
2008-02-29 19:21:01 +01:00
|
|
|
Summary: DWARF processing library development files
|
2014-10-15 16:38:11 +02:00
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Requires: libdwarves1 = %version-%release
|
2008-02-29 18:33:20 +01:00
|
|
|
|
|
|
|
%description -n libdwarves-devel
|
2011-08-12 22:23:09 +02:00
|
|
|
This package contains the development files for libdwarves, a library
|
|
|
|
for processing DWARF, a debugging data format for ELF files.
|
2008-02-29 18:33:20 +01:00
|
|
|
|
|
|
|
%prep
|
2021-08-24 01:52:54 +02:00
|
|
|
%autosetup
|
2008-02-29 18:33:20 +01:00
|
|
|
|
|
|
|
%build
|
2020-10-03 00:23:54 +02:00
|
|
|
sv="$PWD/lib.v"
|
2021-07-16 14:07:02 +02:00
|
|
|
ver=$(echo %version | cut -d+ -f1)
|
|
|
|
echo "DWARVES_$ver{ global: *; };" >"$sv"
|
2021-08-24 01:52:54 +02:00
|
|
|
%cmake \
|
2021-07-17 20:00:13 +02:00
|
|
|
%if 0%{?have_libbpf}
|
2021-07-29 07:38:09 +02:00
|
|
|
-DLIBBPF_EMBEDDED=OFF \
|
2021-07-17 20:00:13 +02:00
|
|
|
%endif
|
2021-08-24 01:52:54 +02:00
|
|
|
-DCMAKE_SHARED_LINKER_FLAGS:STRING="-Wl,--version-script=$sv"
|
2020-10-03 00:07:55 +02:00
|
|
|
%cmake_build
|
2008-02-29 18:33:20 +01:00
|
|
|
|
|
|
|
%install
|
2017-02-01 16:44:54 +01:00
|
|
|
%cmake_install
|
2008-02-29 18:33:20 +01:00
|
|
|
|
2017-02-01 16:44:54 +01:00
|
|
|
%post -n libdwarves1 -p /sbin/ldconfig
|
2008-02-29 18:33:20 +01:00
|
|
|
%postun -n libdwarves1 -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%files
|
|
|
|
%doc README NEWS
|
2014-10-15 16:38:11 +02:00
|
|
|
%_bindir/*
|
|
|
|
%_mandir/man*/*
|
2008-02-29 18:33:20 +01:00
|
|
|
|
|
|
|
%files -n libdwarves1
|
2014-10-15 16:38:11 +02:00
|
|
|
%_libdir/*.so.1*
|
2008-02-29 18:33:20 +01:00
|
|
|
|
|
|
|
%files -n libdwarves-devel
|
2014-10-15 16:38:11 +02:00
|
|
|
%_libdir/*.so
|
|
|
|
%_includedir/*
|
|
|
|
%_datadir/%name
|
2008-02-29 18:33:20 +01:00
|
|
|
|
|
|
|
%changelog
|