support clang build

Signed-off-by: luofeng14 <luofeng13@huawei.com>
This commit is contained in:
luofeng14 2024-02-25 11:46:20 +00:00 committed by Gitee
parent 650643d8e1
commit 012612b76e
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -2,7 +2,7 @@
Name: etmem
Version: 1.1
Release: 6
Release: 7
Summary: etmem
License: MulanPSL-2.0
URL: https://gitee.com/openeuler/etmem
@ -31,6 +31,9 @@ etmem module
%build
mkdir -p build
cd build
%if "%{?toolchain}" == "clang"
CFLAGS="${CFLAGS:-%{?build_cflags}} -Wno-typedef-redefinition"; export CFLAGS;
%endif
cmake ..
make
@ -67,6 +70,12 @@ install -m 0644 userswap/include/uswap_api.h $RPM_BUILD_ROOT%{_includedir}
%postun -p /sbin/ldconfig
%changelog
* Thu Feb 22 2024 luofng <luofeng13@huawei.com> - 1.1-7
- Type: enhencement
- CVE:NA
- SUG:NA
- DESC:support for building with clang
* Thu Aug 24 2023 volcanodragon <linfeilong@huawei.com> - 1.1-6
- fix project stop cmd timeout problem