From ef586f23b77d26237ed9b5c7ee3a6f62e1a6d8aa Mon Sep 17 00:00:00 2001 From: luofeng14 Date: Thu, 21 Mar 2024 10:37:55 +0800 Subject: [PATCH] support clang build --- open-iscsi.spec | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/open-iscsi.spec b/open-iscsi.spec index 7479529..f6c708f 100644 --- a/open-iscsi.spec +++ b/open-iscsi.spec @@ -4,7 +4,7 @@ Name: open-iscsi Version: 2.1.5 -Release: 14 +Release: 15 Summary: ISCSI software initiator daemon and utility programs License: GPLv2+ and BSD URL: http://www.open-iscsi.com @@ -89,6 +89,9 @@ This contains man files for the using of %{name}. %prep %autosetup -n %{name}-%{version} -p1 perl -i -pe 's|^exec_prefix = /$|exec_prefix = %{_exec_prefix}|' Makefile +%if "%toolchain" == "clang" +sed -i '/^WARNFLAGS/{s/$/ -Wno-error=single-bit-bitfield-constant-conversion -Wno-error=gnu-variable-sized-type-not-at-end -Wno-error=ignored-attributes -Wno-error=header-guard/}' usr/Makefile +%endif %build %make_build OPTFLAGS="%{optflags} %{?__global_ldflags} -DUSE_KMOD -lkmod" LIB_DIR=%{_libdir} @@ -163,6 +166,12 @@ fi %{_mandir}/man8/* %changelog +* Thu Feb 22 2024 r30030392 - 2.1.5-15 +- Type:NA +- CVE:NA +- SUG:NA +- DESC:support for building with clang + * Tue Feb 20 2024 jiangjianjun - 2.1.5-14 - update open-iscsi.spec -- Gitee