diff --git a/0002-Support-specify-CC.patch b/0002-Support-specify-CC.patch new file mode 100644 index 0000000000000000000000000000000000000000..6799585581acf87117ad58e1046472d68edbda8a --- /dev/null +++ b/0002-Support-specify-CC.patch @@ -0,0 +1,28 @@ +From 407ebd58308dcb057b547cae165038d927ef3220 Mon Sep 17 00:00:00 2001 +From: jammyjellyfish +Date: Wed, 19 Apr 2023 15:21:48 +0800 +Subject: [PATCH] Support specify CC + +Makefile set CC compiler as gcc, and not reading CC from +environment variable. This patch lets Makefile read $CC +environment variable and use it as compiler, if exists +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index cf099ea..50945a9 100644 +--- a/Makefile ++++ b/Makefile +@@ -49,7 +49,7 @@ STRIP=-s + ifdef CROSS_COMPILE + CC=$(CROSS_COMPILE)gcc + else +-CC=cc ++CC?=cc + endif + AR=$(CROSS_COMPILE)ar + RANLIB=$(CROSS_COMPILE)ranlib +-- +2.40.0 + diff --git a/pciutils.spec b/pciutils.spec index f736b1872338f369e4e227d40dbd98084a261d76..eb5759096a23e135e801d49bcee92b8d4c146ef8 100644 --- a/pciutils.spec +++ b/pciutils.spec @@ -1,6 +1,6 @@ Name: pciutils Version: 3.9.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 +* Wed Apr 19 2023 jammyjellyfish - 3.9.0-2 +- Support specify CC + * Thu Feb 09 2023 suweifeng 3.9.0-1 - upgrade to 3.9.0