diff --git a/libipt.spec b/libipt.spec index 70a7b6d..1fd17d0 100644 --- a/libipt.spec +++ b/libipt.spec @@ -1,10 +1,11 @@ Name: libipt Version: 1.6.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Intel Processor Trace Decoder Library License: BSD URL: https://github.com/01org/processor-trace Source0: https://github.com/01org/processor-trace/archive/v%{version}.tar.gz +Patch1: v1.6.1-implicit-fallthrough.patch BuildRequires: cmake ExclusiveArch: %{ix86} x86_64 @@ -27,6 +28,7 @@ develop programs that use the Intel Processor Trace (Intel PT) Decoder Library. %prep %setup -q -n processor-trace-%{version} +%patch1 -p1 %build # -DPTUNIT:BOOL=ON has no effect on ctest. @@ -55,6 +57,9 @@ ctest -V %{?_smp_mflags} %{_libdir}/%{name}.so %changelog +* Fri Jun 9 2017 Jan Kratochvil - 1.6.1-2 +- Fix [-Werror=implicit-fallthrough=] with gcc-7.1.1. + * Fri Jun 9 2017 Jan Kratochvil - 1.6.1-1 - Rebase to upstream 1.6.1. diff --git a/v1.6.1-implicit-fallthrough.patch b/v1.6.1-implicit-fallthrough.patch new file mode 100644 index 0000000..f2ddb4f --- /dev/null +++ b/v1.6.1-implicit-fallthrough.patch @@ -0,0 +1,19 @@ +gcc-7.1.1-1.fc27.x86_64 +/home/jkratoch/redhat/fedora/libipt/master/processor-trace-1.6.1/libipt/src/pt_block_decoder.c: In function ‘pt_blk_proceed_no_event_cached’: +/home/jkratoch/redhat/fedora/libipt/master/processor-trace-1.6.1/libipt/src/pt_block_decoder.c:2282:6: error: this statement may fall through [-Werror=implicit-fallthrough=] + if (bce.isize) { + ^ +/home/jkratoch/redhat/fedora/libipt/master/processor-trace-1.6.1/libipt/src/pt_block_decoder.c:2328:2: note: here + case ptbq_decode: { + ^~~~ + +--- processor-trace-1.6.1-orig/libipt/src/pt_block_decoder.c 2017-05-31 13:30:32.000000000 +0200 ++++ processor-trace-1.6.1/libipt/src/pt_block_decoder.c 2017-06-09 07:24:12.644587611 +0200 +@@ -2324,6 +2324,7 @@ static int pt_blk_proceed_no_event_cache + } + + /* Fall through to ptbq_decode. */ ++ __attribute__ ((fallthrough)); + + case ptbq_decode: { + struct pt_insn_ext iext;