!9 fix issue:源代码 Makefile 文件指定了使用 gcc 编译器进行编译,导致编译失败。

From: @zhangchao13 
Reviewed-by: @dillon_chen 
Signed-off-by: @dillon_chen
This commit is contained in:
openeuler-ci-bot 2023-05-25 08:03:18 +00:00 committed by Gitee
commit c2f700a5ef
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 28 additions and 1 deletions

22
0001-pigz-fix-cc.patch Normal file
View File

@ -0,0 +1,22 @@
From 568d3b532e8861fdde4e3b16be8af692d5eac032 Mon Sep 17 00:00:00 2001
From: zhangchao13 <chaozhangm@isoftstone.com>
Date: Sun, 23 Apr 2023 10:33:13 +0800
Subject: [PATCH] pigz-fix-cc
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index b1866cf..0fc97fa 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-CC=gcc
+CC?=gcc
CFLAGS=-O3 -Wall -Wextra -Wno-unknown-pragmas -Wcast-qual
LDFLAGS=
# CFLAGS=-O3 -Wall -Wextra -Wno-unknown-pragmas -Wcast-qual -g -fsanitize=thread
--
2.33.0

View File

@ -1,7 +1,7 @@
#spec from source code(%{name}-%{version}.tar.gz)
Name: pigz
Version: 2.7
Release: 1
Release: 2
Summary: pigz is a parallel implementation of gzip which utilizes multiple cores
License: zlib
Source0: http://www.zlib.net/%{name}/%{name}-%{version}.tar.gz
@ -16,6 +16,8 @@ Mark Adler, and uses the zlib and pthread libraries.
%package_help
Patch0: 0001-pigz-fix-cc.patch
%prep
%autosetup -n %{name}-%{version} -p1
@ -40,6 +42,9 @@ make test
%{_mandir}/man1/pigz.1*
%changelog
* Sun Apr 23 2023 Zhang Chao <chaozhangm@isoftstone.com> - 2.7-2
- Fix CC compiler support
* Thu Jan 19 2023 zhangnan <zhangnan134@huawei.com> - 2.7-1
- update to 2.7