From 4d04f7506905743bc3474f9b0e092072993c8e43 Mon Sep 17 00:00:00 2001 From: zhangchao13 Date: Sun, 23 Apr 2023 10:24:12 +0800 Subject: [PATCH] =?UTF-8?q?fix=20issue:=E6=BA=90=E4=BB=A3=E7=A0=81=20Makef?= =?UTF-8?q?ile=20=E6=96=87=E4=BB=B6=E6=8C=87=E5=AE=9A=E4=BA=86=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=20gcc=20=E7=BC=96=E8=AF=91=E5=99=A8=E8=BF=9B=E8=A1=8C?= =?UTF-8?q?=E7=BC=96=E8=AF=91=EF=BC=8C=E5=AF=BC=E8=87=B4=E7=BC=96=E8=AF=91?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 25d2f054f6d329553283fd9f70fa6e271bfe9c9d) --- 0001-sgpio-fix-cc.patch | 34 ++++++++++++++++++++++++++++++++++ sgpio.spec | 6 +++++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 0001-sgpio-fix-cc.patch diff --git a/0001-sgpio-fix-cc.patch b/0001-sgpio-fix-cc.patch new file mode 100644 index 0000000..77eb2ca --- /dev/null +++ b/0001-sgpio-fix-cc.patch @@ -0,0 +1,34 @@ +From f602bd60636e16306c326276322e58fddbfb6c67 Mon Sep 17 00:00:00 2001 +From: zhangchao13 +Date: Sun, 23 Apr 2023 17:05:26 +0800 +Subject: [PATCH] sgpio-fix-cc + +--- + Makefile | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index 2b1abe5..cb72daa 100755 +--- a/Makefile ++++ b/Makefile +@@ -26,14 +26,15 @@ MANDIR ?= /usr/local/man + SBINDIR = /sbin + INSTALL = /usr/bin/install + ALL = sgpio ++CC ?= gcc + + all: $(ALL) + + sgpio.o: sgpio.c +- gcc $(CFLAGS) -g -Wall -c sgpio.c ++ $(CC) $(CFLAGS) -g -Wall -c sgpio.c + + sgpio: sgpio.o +- gcc $(LDFLAGS) -g sgpio.o -o sgpio ++ $(CC) $(LDFLAGS) -g sgpio.o -o sgpio + + clean: + rm -f sgpio.o sgpio +-- +2.33.0 + diff --git a/sgpio.spec b/sgpio.spec index eda23d0..eafc31a 100644 --- a/sgpio.spec +++ b/sgpio.spec @@ -1,6 +1,6 @@ Name: sgpio Version: 1.2.1 -Release: 2 +Release: 3 Summary: captive backplane LED control utility License: GPLv2+ URL: http://sources.redhat.com/lvm2/wiki/DMRAID_Eventing @@ -9,6 +9,7 @@ Source0: https://www.sourceware.org/lvm2/wiki/DMRAID_Eventing?action=AttachFile& BuildRequires: gcc, dos2unix Patch0: sgpio-makefile.patch +Patch1: 0001-sgpio-fix-cc.patch %description Serial General Purpose Input Output (SGPIO) is a communication method used @@ -48,6 +49,9 @@ dos2unix README LICENSE_GPL %{_mandir}/man*/* %changelog +* Sun Apr 23 2023 Zhang Chao - 1.2.1-3 +- Fix CC compiler support + * Fri Dec 20 2019 openEuler Buildteam - 1.2.1-2 - Modify the source0 -- Gitee