From b86d49e5954e5b3f4f113363ee31e0c53f683352 Mon Sep 17 00:00:00 2001 From: Stefan Berger Date: Tue, 14 Sep 2021 15:37:21 -0400 Subject: [PATCH] Build with -Wno-deprecated-declarations --- ...o-deprecated-declarations-to-default.patch | 30 +++++++++++++++++++ libtpms.spec | 8 ++++- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 0001-build-sys-Add-Wno-deprecated-declarations-to-default.patch diff --git a/0001-build-sys-Add-Wno-deprecated-declarations-to-default.patch b/0001-build-sys-Add-Wno-deprecated-declarations-to-default.patch new file mode 100644 index 0000000..5d3c5fb --- /dev/null +++ b/0001-build-sys-Add-Wno-deprecated-declarations-to-default.patch @@ -0,0 +1,30 @@ +From 082ead1db5165eec7679a0e01ff98a7b9bee44fa Mon Sep 17 00:00:00 2001 +From: Stefan Berger +Date: Tue, 14 Sep 2021 15:14:57 -0400 +Subject: [PATCH] build-sys: Add -Wno-deprecated-declarations to default CFLAGS + (OSSL 3.0) + +To be able to build with OpenSSL 3.0 we need to added +-Wno-deprecated-declarations to the default CFLAGS. + +Signed-off-by: Stefan Berger +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 405755f2..f4c44e12 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -303,7 +303,7 @@ if test "x$enable_hardening" != "xno"; then + fi + + CFLAGS="$CFLAGS $COVERAGE_CFLAGS -Wall -Werror -Wreturn-type -Wsign-compare -Wno-self-assign" +-CFLAGS="$CFLAGS -Wmissing-prototypes" ++CFLAGS="$CFLAGS -Wmissing-prototypes -Wno-deprecated-declarations" + LDFLAGS="$LDFLAGS $COVERAGE_LDFLAGS" + + AC_CONFIG_FILES(Makefile \ +-- +2.33.0 + diff --git a/libtpms.spec b/libtpms.spec index cbe3e44..e350386 100644 --- a/libtpms.spec +++ b/libtpms.spec @@ -3,13 +3,15 @@ Name: libtpms Version: 0.8.6 -Release: 0.%{gitdate}git%{gitversion}%{?dist}.1 +Release: 0.%{gitdate}git%{gitversion}%{?dist}.2 Summary: Library providing Trusted Platform Module (TPM) functionality License: BSD Url: http://github.com/stefanberger/libtpms Source0: libtpms-%{gitdate}.tar.xz +Patch0001: 0001-build-sys-Add-Wno-deprecated-declarations-to-default.patch + BuildRequires: openssl-devel BuildRequires: pkgconfig gawk sed BuildRequires: automake autoconf libtool bash coreutils gcc-c++ @@ -28,6 +30,7 @@ Libtpms header files and documentation. %prep %setup -q -n %{name}-%{gitdate} +%patch0001 -p1 %build NOCONFIGURE=1 sh autogen.sh %configure --disable-static --with-tpm2 --with-openssl @@ -55,6 +58,9 @@ find %{buildroot} -type f -name '*.la' | xargs rm -f -- || : %{_mandir}/man3/* %changelog +* Tue Sep 14 2021 Stefan Berger - 0.8.6-0.20210910git7a4d46a119.2 +- Build with -Wno-deprecated-declarations + * Tue Sep 14 2021 Sahana Prasad - 0.8.6-0.20210910git7a4d46a119.1 - Rebuilt with OpenSSL 3.0.0