!5 [sync] PR-3: fix issue:源代码 Makefile 文件指定了使用 gcc 编译器进行编译,导致编译失败。

From: @openeuler-sync-bot 
Reviewed-by: @xiezhipeng1 
Signed-off-by: @xiezhipeng1
This commit is contained in:
openeuler-ci-bot 2024-03-25 09:12:20 +00:00 committed by Gitee
commit b90c153e09
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 39 additions and 1 deletions

34
0001-sgpio-fix-cc.patch Normal file
View File

@ -0,0 +1,34 @@
From f602bd60636e16306c326276322e58fddbfb6c67 Mon Sep 17 00:00:00 2001
From: zhangchao13 <chaozhangm@isoftstone.com>
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

View File

@ -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 <chaozhangm@isoftstone.com> - 1.2.1-3
- Fix CC compiler support
* Fri Dec 20 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.2.1-2
- Modify the source0