!37 [sync] PR-36: Support build with clang

From: @openeuler-sync-bot 
Reviewed-by: @swf504 
Signed-off-by: @swf504
This commit is contained in:
openeuler-ci-bot 2024-03-21 09:33:34 +00:00 committed by Gitee
commit 1fab56ebf1
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 30 additions and 1 deletions

View File

@ -0,0 +1,25 @@
From 31159c692224d645275a7fa8ce772ef5748e6a54 Mon Sep 17 00:00:00 2001
From: luofeng <luofeng13@huawei.com>
Date: Thu, 21 Mar 2024 10:41:53 +0800
Subject: [PATCH] support specify CC
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 68dc923..d2e3dea 100644
--- a/Makefile
+++ b/Makefile
@@ -50,7 +50,7 @@ STRIP=--strip-program $(CROSS_COMPILE)-strip
CC=$(CROSS_COMPILE)gcc
else
STRIP=-s
-CC=cc
+CC?=cc
endif
AR=$(CROSS_COMPILE)ar
RANLIB=$(CROSS_COMPILE)ranlib
--
2.19.1

View File

@ -1,6 +1,6 @@
Name: pciutils
Version: 3.10.0
Release: 1
Release: 2
Summary: PCI bus related utilities
License: GPLv2+
URL: http://atrey.karlin.mff.cuni.cz/~mj/pciutils.shtml
@ -10,6 +10,7 @@ Source0: https://mirrors.edge.kernel.org/pub/software/utils/pciutils/%{na
Patch0: 0000-pciutils-2.2.1-idpath.patch
# patch1 is from fedora, rhbz#195327
Patch1: 0001-pciutils-dir-d.patch
Patch2: 0002-Support-specify-CC.patch
ExclusiveOS: Linux
BuildRequires: gcc sed kmod-devel pkgconfig zlib-devel
@ -105,6 +106,9 @@ rm -rf $RPM_BUILD_ROOT/usr/share/hwdata/pci.ids*
rm -rf $RPM_BUILD_ROOT
%changelog
* Thu Mar 21 2024 luofeng <luofeng13@huawei.com> - 3.10.0-2
- Support specify CC
* Tue Feb 06 2024 Jiangtian Feng <fengjiangtian@huawei.com> 3.10.0-1
- upgrade to 3.10.0