diff --git a/0001-sgpio-fix-cc.patch b/0001-sgpio-fix-cc.patch new file mode 100644 index 0000000000000000000000000000000000000000..77eb2cab50b9ef4c65f861da17b605d7f371ab79 --- /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 eda23d0e65d3836df7da5c1eba442acab58ab1e3..eafc31a7ea1caece005ae7d06313a1e5010a4316 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