!33 【LLVM平行宇宙】Add clang compile support
From: @liyunfei33 Reviewed-by: @t_feng Signed-off-by: @t_feng
This commit is contained in:
commit
dff6566d11
@ -1,6 +1,6 @@
|
||||
Name: python-dmidecode
|
||||
Version: 3.12.3
|
||||
Release: 3
|
||||
Release: 4
|
||||
Summary: Python extension module for dmidecode
|
||||
|
||||
License: GPLv2
|
||||
@ -13,6 +13,9 @@ Patch1: python-dmidecode-3.12.3-sw.patch
|
||||
Patch2: python-dmidecode-rhbz2154949.patch
|
||||
|
||||
BuildRequires: gcc libxml2-devel python3-libxml2 python3-devel
|
||||
%if "%toolchain" == "clang"
|
||||
BuildRequires: clang llvm lld
|
||||
%endif
|
||||
|
||||
%description
|
||||
Dmidecode reports information about your system's hardware as described in
|
||||
@ -47,7 +50,9 @@ sed -i 's/python2/python3/g' Makefile unit-tests/Makefile
|
||||
export PYTHON_BIN=%{__python3}
|
||||
export PYTHON_VERSION=%{python3_version}
|
||||
export CFLAGS="%{build_cflags} -std=gnu89"
|
||||
export CC=gcc
|
||||
%if "%toolchain" == "clang"
|
||||
export CFLAGS="$CFLAGS -Wno-error=int-conversion"
|
||||
%endif
|
||||
%make_build
|
||||
|
||||
%install
|
||||
@ -71,6 +76,9 @@ make -C unit-tests
|
||||
%doc README doc/README.upstream
|
||||
|
||||
%changelog
|
||||
* Fri Aug 11 2023 liyunfei <liyunfei33@huawei.com> - 3.12.3-4
|
||||
- add clang compile support
|
||||
|
||||
* Wed Jul 05 2023 zhouwenpei <zhouwenpei@h-partners.com> - 3.12.3-3
|
||||
- fix build error
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user