From 9546f2bd72d838410d808d1614e80e650b3c7471ee1555398f5c795617507238 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sat, 17 Jul 2021 18:00:13 +0000 Subject: [PATCH] Accepting request 906855 from home:michals - Use system libbpf when available (bsc#1188420 bsc#1188419 jsc#SLE-17288 jsc#SLE-18805). OBS-URL: https://build.opensuse.org/request/show/906855 OBS-URL: https://build.opensuse.org/package/show/devel:tools/dwarves?expand=0&rev=71 --- _service | 1 + _servicedata | 4 ++++ dwarves.changes | 5 +++++ dwarves.spec | 15 +++++++++++++-- 4 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 _servicedata diff --git a/_service b/_service index 20140ce..918b344 100644 --- a/_service +++ b/_service @@ -5,6 +5,7 @@ master v(.*) @PARENT_TAG@+git@TAG_OFFSET@.%h + enable dwarves diff --git a/_servicedata b/_servicedata new file mode 100644 index 0000000..4be9d11 --- /dev/null +++ b/_servicedata @@ -0,0 +1,4 @@ + + + git://git.kernel.org/pub/scm/devel/pahole/pahole + 1ef87b26fd268b529b3568f3625d9eb10753a1a8 \ No newline at end of file diff --git a/dwarves.changes b/dwarves.changes index d7b9407..fd44b19 100644 --- a/dwarves.changes +++ b/dwarves.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Jul 17 15:48:30 UTC 2021 - Michal Suchanek + +- Use system libbpf when available (bsc#1188420 bsc#1188419 jsc#SLE-17288 jsc#SLE-18805). + ------------------------------------------------------------------- Thu Jul 15 20:04:36 UTC 2021 - msuchanek@suse.com diff --git a/dwarves.spec b/dwarves.spec index f0460ed..f2c4507 100644 --- a/dwarves.spec +++ b/dwarves.spec @@ -16,6 +16,10 @@ # +%if 0%{?suse_version} > 1500 || 0%{?sle_version} > 150300 +%define have_libbpf 1 +%endif + Name: dwarves Version: 1.21+git175.1ef87b2 Release: 0 @@ -34,7 +38,9 @@ BuildRequires: cmake BuildRequires: libdw-devel >= 0.171 BuildRequires: libelf-devel BuildRequires: pkgconfig -BuildRequires: pkgconfig(libbpf) +%if 0%{?have_libbpf} +BuildRequires: pkgconfig(libbpf) >= 0.4.0 +%endif BuildRequires: pkgconfig(zlib) # Also known by its most prominent tool Provides: pahole = %version-%release @@ -93,7 +99,12 @@ for processing DWARF, a debugging data format for ELF files. sv="$PWD/lib.v" ver=$(echo %version | cut -d+ -f1) echo "DWARVES_$ver{ global: *; };" >"$sv" -%cmake -DCMAKE_SHARED_LINKER_FLAGS:STRING="-Wl,--version-script=$sv" +%cmake -DCMAKE_SHARED_LINKER_FLAGS:STRING="-Wl,--version-script=$sv" \ +%if 0%{?have_libbpf} + -DLIBBPF_EMBEDDED=OFF +%else + +%endif %cmake_build %install