!40 LLVM平行宇宙:Support for building with clang

From: @zj94 
Reviewed-by: @cf-zhao, @zhujianwei001 
Signed-off-by: @zhujianwei001
This commit is contained in:
openeuler-ci-bot 2023-10-21 08:23:49 +00:00 committed by Gitee
commit 32bf6ee7c9
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

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