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

This commit is contained in:
zhangchao13 2023-04-23 10:39:37 +08:00
parent 3dcd48dbce
commit 75a0ce9b43
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) #spec from source code(%{name}-%{version}.tar.gz)
Name: pigz Name: pigz
Version: 2.7 Version: 2.7
Release: 1 Release: 2
Summary: pigz is a parallel implementation of gzip which utilizes multiple cores Summary: pigz is a parallel implementation of gzip which utilizes multiple cores
License: zlib License: zlib
Source0: http://www.zlib.net/%{name}/%{name}-%{version}.tar.gz 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 %package_help
Patch0: 0001-pigz-fix-cc.patch
%prep %prep
%autosetup -n %{name}-%{version} -p1 %autosetup -n %{name}-%{version} -p1
@ -40,6 +42,9 @@ make test
%{_mandir}/man1/pigz.1* %{_mandir}/man1/pigz.1*
%changelog %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 * Thu Jan 19 2023 zhangnan <zhangnan134@huawei.com> - 2.7-1
- update to 2.7 - update to 2.7