add clang compile support
This commit is contained in:
parent
3af3ff2d5c
commit
4392ad20d0
@ -1,6 +1,6 @@
|
|||||||
Name: python-dmidecode
|
Name: python-dmidecode
|
||||||
Version: 3.12.3
|
Version: 3.12.3
|
||||||
Release: 3
|
Release: 4
|
||||||
Summary: Python extension module for dmidecode
|
Summary: Python extension module for dmidecode
|
||||||
|
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
@ -13,6 +13,9 @@ Patch1: python-dmidecode-3.12.3-sw.patch
|
|||||||
Patch2: python-dmidecode-rhbz2154949.patch
|
Patch2: python-dmidecode-rhbz2154949.patch
|
||||||
|
|
||||||
BuildRequires: gcc libxml2-devel python3-libxml2 python3-devel
|
BuildRequires: gcc libxml2-devel python3-libxml2 python3-devel
|
||||||
|
%if "%toolchain" == "clang"
|
||||||
|
BuildRequires: clang llvm lld
|
||||||
|
%endif
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Dmidecode reports information about your system's hardware as described in
|
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_BIN=%{__python3}
|
||||||
export PYTHON_VERSION=%{python3_version}
|
export PYTHON_VERSION=%{python3_version}
|
||||||
export CFLAGS="%{build_cflags} -std=gnu89"
|
export CFLAGS="%{build_cflags} -std=gnu89"
|
||||||
export CC=gcc
|
%if "%toolchain" == "clang"
|
||||||
|
export CFLAGS="$CFLAGS -Wno-error=int-conversion"
|
||||||
|
%endif
|
||||||
%make_build
|
%make_build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
@ -71,6 +76,9 @@ make -C unit-tests
|
|||||||
%doc README doc/README.upstream
|
%doc README doc/README.upstream
|
||||||
|
|
||||||
%changelog
|
%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
|
* Wed Jul 05 2023 zhouwenpei <zhouwenpei@h-partners.com> - 3.12.3-3
|
||||||
- fix build error
|
- fix build error
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user