Add patch to fix gcc7 complaining about implict-fallthrough cases

This commit is contained in:
Yunying Sun 2017-07-31 15:36:29 +08:00
parent cfa8828565
commit 908b3309dc
4 changed files with 34 additions and 2 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
/tpm2.0-tools-2.1.0.tar.gz /tpm2.0-tools-2.1.0.tar.gz
/gcc7-implict-fallthrough-fix.patch

View File

@ -0,0 +1,24 @@
diff -ru tpm2.0-tools-2.1.0-orig/tools/main.c tpm2.0-tools-2.1.0/tools/main.c
--- tpm2.0-tools-2.1.0-orig/tools/main.c 2017-07-31 14:26:37.436505592 +0800
+++ tpm2.0-tools-2.1.0/tools/main.c 2017-07-31 14:27:12.999707128 +0800
@@ -61,7 +61,7 @@
execute_man (argv[0], envp);
fprintf (stderr,
"failed to load manpage, check your environment / PATH\n");
- /* no break */
+ exit (1);
case 2:
exit (1);
}
diff -ru tpm2.0-tools-2.1.0-orig/tools/tpm2_dump_capability.c tpm2.0-tools-2.1.0/tools/tpm2_dump_capability.c
--- tpm2.0-tools-2.1.0-orig/tools/tpm2_dump_capability.c 2017-07-31 14:26:37.436505592 +0800
+++ tpm2.0-tools-2.1.0/tools/tpm2_dump_capability.c 2017-07-31 14:29:30.831488212 +0800
@@ -595,7 +595,7 @@
case TPM_CAP_COMMANDS:
dump_command_attr_array (capabilities->command.commandAttributes,
capabilities->command.count);
- /* no break */
+ break;
default:
return 1;
}

View File

@ -1 +1,2 @@
SHA512 (tpm2.0-tools-2.1.0.tar.gz) = 5488ffdc42a318fae9a307a333cdbce730a144cea847fe68546367c87689cd675d1376c1a638dc4eefa6231d4d7f7417215cc4eb606e999a757425f5097eb0c4 SHA512 (tpm2.0-tools-2.1.0.tar.gz) = 5488ffdc42a318fae9a307a333cdbce730a144cea847fe68546367c87689cd675d1376c1a638dc4eefa6231d4d7f7417215cc4eb606e999a757425f5097eb0c4
SHA512 (gcc7-implict-fallthrough-fix.patch) = c936b6770e43fe6ab333b4f04d09c5be14a26f845f865c5744379569accc9cc681e9394161b406dcf942387b887a60e31200ffeea2d10d9dfd3487190c462c65

View File

@ -1,6 +1,6 @@
Name: tpm2-tools Name: tpm2-tools
Version: 2.1.0 Version: 2.1.0
Release: 1%{?dist} Release: 2%{?dist}
Summary: A TPM2.0 testing tool build upon TPM2.0-TSS Summary: A TPM2.0 testing tool build upon TPM2.0-TSS
%global pkg_prefix tpm2.0-tools %global pkg_prefix tpm2.0-tools
@ -9,6 +9,9 @@ License: BSD
URL: https://github.com/01org/tpm2.0-tools URL: https://github.com/01org/tpm2.0-tools
Source0: https://github.com/01org/tpm2.0-tools/archive/%{version}.tar.gz#/%{pkg_prefix}-%{version}.tar.gz Source0: https://github.com/01org/tpm2.0-tools/archive/%{version}.tar.gz#/%{pkg_prefix}-%{version}.tar.gz
# https://github.com/01org/tpm2.0-tools/pull/381
Patch0: gcc7-implict-fallthrough-fix.patch
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: libtool BuildRequires: libtool
BuildRequires: autoconf-archive BuildRequires: autoconf-archive
@ -31,7 +34,7 @@ Requires: tpm2-tss%{?_isa} >= 1.1.0-1%{?dist}
tpm2-tools is a batch of testing tools for tpm2.0. It is based on tpm2-tss. tpm2-tools is a batch of testing tools for tpm2.0. It is based on tpm2-tss.
%prep %prep
%autosetup -n %{pkg_prefix}-%{version} %autosetup -p1 -n %{pkg_prefix}-%{version}
./bootstrap ./bootstrap
%build %build
@ -48,6 +51,9 @@ tpm2-tools is a batch of testing tools for tpm2.0. It is based on tpm2-tss.
%{_mandir}/man8/tpm2_*.8.gz %{_mandir}/man8/tpm2_*.8.gz
%changelog %changelog
* Mon Jul 31 2017 Sun Yunying <yunying.sun@intel.com> - 2.1.0-2
- Add patch to fix gcc7 complaining about implicit-fallthrough cases
* Fri Jul 28 2017 Sun Yunying <yunying.sun@intel.com> - 2.1.0-1 * Fri Jul 28 2017 Sun Yunying <yunying.sun@intel.com> - 2.1.0-1
- Update to latest upstream release 2.1.0 - Update to latest upstream release 2.1.0