Build with -Wno-deprecated-declarations

This commit is contained in:
Stefan Berger 2021-09-14 15:37:21 -04:00
parent 0081b89fb2
commit b86d49e595
2 changed files with 37 additions and 1 deletions

View File

@ -0,0 +1,30 @@
From 082ead1db5165eec7679a0e01ff98a7b9bee44fa Mon Sep 17 00:00:00 2001
From: Stefan Berger <stefanb@linux.ibm.com>
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 <stefanb@linux.ibm.com>
---
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

View File

@ -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 <stefanb@linux.ibm.com> - 0.8.6-0.20210910git7a4d46a119.2
- Build with -Wno-deprecated-declarations
* Tue Sep 14 2021 Sahana Prasad <sahana@redhat.com> - 0.8.6-0.20210910git7a4d46a119.1
- Rebuilt with OpenSSL 3.0.0