commit afc97b0d0d9a6c2aefd65fbd614eee9c5276ad1f
Author: Jakub Bogusz <[email protected]>
Date:   Wed Jan 10 21:38:21 2024 +0100

    - updated to 2.1

 libipt-intel-xed.patch     | 13 +++++++++++++
 libipt-uninitialized.patch | 19 ++++++++++++++-----
 libipt.spec                | 20 ++++++++++++++------
 3 files changed, 41 insertions(+), 11 deletions(-)
---
diff --git a/libipt.spec b/libipt.spec
index 0ab2098..e609c7c 100644
--- a/libipt.spec
+++ b/libipt.spec
@@ -7,16 +7,17 @@
 Summary:       Intel Processor Trace Decoder Library
 Summary(pl.UTF-8):     Biblioteka dekodera Intel PT (śladów procesora Intel)
 Name:          libipt
-Version:       2.0.4
-Release:       2
+Version:       2.1
+Release:       1
 License:       BSD
 Group:         Libraries
 #Source0Download: https://github.com/intel/libipt/tags
 Source0:       
https://github.com/intel/libipt/archive/v%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: cf2c97292dc61ea898dd84b460921f79
+# Source0-md5: 064e0d369bd30f78ec771a10c88a71ef
 Patch0:                %{name}-uninitialized.patch
+Patch1:                %{name}-intel-xed.patch
 URL:           https://github.com/intel/libipt
-BuildRequires: cmake >= 2.8.6
+BuildRequires: cmake >= 3.1
 %{?with_xed:BuildRequires:     intel-xed-devel}
 # C++ is required only for -DPTUNIT test "ptunit-cpp".
 %{?with_tests:BuildRequires:   libstdc++-devel}
@@ -65,6 +66,7 @@ Narzędzia Intel PT.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 %build
 install -d build
@@ -76,8 +78,8 @@ cd build
        -DPEVENT:BOOL=ON \
        -DPTDUMP:BOOL=ON \
        %{?with_tests:-DPTUNIT:BOOL=ON} \
-       %{?with_xed:-DPTXED:BOOL=ON -DXED_INCLUDE=%{_includedir}/xed}
-# -DSIDEBAND:BOOL=ON not yet: not installed, binaries depend on it
+       %{?with_xed:-DPTXED:BOOL=ON -DXED_INCLUDE=%{_includedir}/xed} \
+       -DSIDEBAND:BOOL=ON
 
 %{__make}
 
@@ -87,6 +89,9 @@ rm -rf $RPM_BUILD_ROOT
 %{__make} -C build install \
        DESTDIR=$RPM_BUILD_ROOT
 
+# not installed by cmake
+cp -a build/lib/libipt-sb.so* $RPM_BUILD_ROOT%{_libdir}
+
 install -d $RPM_BUILD_ROOT%{_bindir}
 install build/bin/ptdump $RPM_BUILD_ROOT%{_bindir}
 %if %{with xed}
@@ -104,11 +109,14 @@ rm -rf $RPM_BUILD_ROOT
 %doc LICENSE README
 %attr(755,root,root) %{_libdir}/libipt.so.*.*
 %attr(755,root,root) %ghost %{_libdir}/libipt.so.2
+%attr(755,root,root) %{_libdir}/libipt-sb.so.*.*
+%attr(755,root,root) %ghost %{_libdir}/libipt-sb.so.2
 
 %files devel
 %defattr(644,root,root,755)
 %doc doc/{getting_started,howto_capture,howto_libipt}.md
 %attr(755,root,root) %{_libdir}/libipt.so
+%attr(755,root,root) %{_libdir}/libipt-sb.so
 %{_includedir}/intel-pt.h
 %if %{with ghc}
 %{_mandir}/man3/pt_*.3*
diff --git a/libipt-intel-xed.patch b/libipt-intel-xed.patch
new file mode 100644
index 0000000..c69257c
--- /dev/null
+++ b/libipt-intel-xed.patch
@@ -0,0 +1,13 @@
+Adjust for intel-xed 2023.12.19, which replaces SYSCALL_AMD iclass with 
SYSCALL_32 by "fred" instruction set
+--- libipt-2.1/ptxed/src/ptxed.c.orig  2023-10-12 09:39:11.000000000 +0200
++++ libipt-2.1/ptxed/src/ptxed.c       2024-01-10 20:19:27.212066096 +0100
+@@ -48,6 +48,9 @@
+ 
+ #include <xed-interface.h>
+ 
++#if !defined(XED_ICLASS_SYSCALL_AMD_DEFINED) && 
defined(XED_ICLASS_SYSCALL_32_DEFINED)
++#  define XED_ICLASS_SYSCALL_AMD XED_ICLASS_SYSCALL_32
++#endif
+ 
+ /* The type of decoder to be used. */
+ enum ptxed_decoder_type {
diff --git a/libipt-uninitialized.patch b/libipt-uninitialized.patch
index c1376dc..3bb83f1 100644
--- a/libipt-uninitialized.patch
+++ b/libipt-uninitialized.patch
@@ -1,7 +1,16 @@
 Avoid build failure with -Werror=maybe-uninitialized
---- libipt-2.0.1/libipt/test/src/ptunit-msec_cache.c.orig      2019-08-13 
10:39:44.000000000 +0200
-+++ libipt-2.0.1/libipt/test/src/ptunit-msec_cache.c   2021-11-17 
19:14:27.713062249 +0100
-@@ -296,7 +296,7 @@ static struct ptunit_result read(struct
+--- libipt-2.1/libipt/test/src/ptunit-msec_cache.c.orig        2023-10-12 
09:39:11.000000000 +0200
++++ libipt-2.1/libipt/test/src/ptunit-msec_cache.c     2024-01-10 
18:37:13.791960352 +0100
+@@ -228,7 +228,7 @@ static struct ptunit_result fill_null(vo
+       const struct pt_mapped_section *msec;
+       struct pt_msec_cache mcache;
+       struct pt_image image;
+-      struct pt_asid asid;
++      struct pt_asid asid = {0, };
+       int status;
+ 
+       memset(&mcache, 0, sizeof(mcache));
+@@ -300,7 +300,7 @@ static struct ptunit_result read(struct
  static struct ptunit_result fill_nomap(struct test_fixture *tfix)
  {
        const struct pt_mapped_section *msec;
@@ -10,7 +19,7 @@ Avoid build failure with -Werror=maybe-uninitialized
        struct pt_section *section;
        int status;
  
-@@ -320,7 +320,7 @@ static struct ptunit_result fill(struct
+@@ -325,7 +325,7 @@ static struct ptunit_result fill(struct
  {
        const struct pt_mapped_section *msec;
        struct pt_section *section;
@@ -18,4 +27,4 @@ Avoid build failure with -Werror=maybe-uninitialized
 +      struct pt_asid asid = {0, };
        int status;
  
-       status = pt_msec_cache_fill(&tfix->mcache, &msec, &tfix->image, &asid,
+       memset(&asid, 0, sizeof(asid));
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libipt.git/commitdiff/afc97b0d0d9a6c2aefd65fbd614eee9c5276ad1f

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to