Support for building with clang

This commit is contained in:
zhoujing 2023-10-10 16:57:11 +08:00
parent ede29033ac
commit 9f3e384edd

View File

@ -2,7 +2,7 @@
%define name libtpms
%define version 0.9.5
%define release 2
%define release 3
# Valid crypto subsystems are 'freebl' and 'openssl'
%if "%{?crypto_subsystem}" == ""
@ -77,6 +77,10 @@ Libtpms header files and documentation.
%build
%if "%toolchain" == "clang"
export CFLAGS="${CFLAGS} -Wno-self-assign"
%endif
%if "%{crypto_subsystem}" == "openssl"
%define _with_openssl --with-openssl
%endif
@ -115,6 +119,9 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libtpms.la
%postun -p /sbin/ldconfig
%changelog
* Tue Oct 10 2023 zhoujing <zhoujing106@huawei.com> - 0.9.5-3
- Add -Wno-self-assign for building with clang
* Tue Mar 07 2023 jiangfangjie <jiangfangjie@huawei.com> - 0.9.5-2
- fix CVE-2023--1018 and CVE-2023-1017