fix CC compiler error

This commit is contained in:
sjxur 2023-04-24 17:10:51 +08:00
parent b365c45e85
commit 583934ac7d
2 changed files with 46 additions and 2 deletions

View File

@ -0,0 +1,38 @@
From aa8e7871ddf3f852f79161f83a8f51f1fa186e42 Mon Sep 17 00:00:00 2001
From: sjxur <sjxur@isoftstone.com>
Date: Mon, 24 Apr 2023 17:26:43 +0800
Subject: [PATCH] fix CC compiler error
---
SConstruct | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/SConstruct b/SConstruct
index 4358a23..01aa8f7 100644
--- a/SConstruct
+++ b/SConstruct
@@ -72,6 +72,12 @@ else:
default_libdir='$PREFIX/lib'
default_prefix='/usr/local'
+cc_key = os.getenv('CC', 'null')
+if cc_key == 'null':
+ os_cc='gcc'
+else:
+ os_cc = os.environ["CC"]
+
opts = Variables(files=[SAVED_CONFIG])
opts.AddVariables(
PathVariable('PREFIX',
@@ -108,7 +114,7 @@ opts.AddVariables(
BoolVariable('APR_STATIC',
"Enable using a static compiled APR",
False),
- RawListVariable('CC', "Command name or path of the C compiler", None),
+ RawListVariable('CC', "Command name or path of the C compiler", os_cc),
RawListVariable('CFLAGS', "Extra flags for the C compiler (space-separated)",
None),
RawListVariable('LIBS', "Extra libraries passed to the linker, "
--
2.33.0

View File

@ -3,7 +3,7 @@
Name: libserf
Version: 1.3.9
Release: 16
Release: 17
Summary: High-Performance Asynchronous HTTP Client Library
License: ASL 2.0
URL: https://serf.apache.org/
@ -14,7 +14,7 @@ BuildRequires: apr-devel, apr-util-devel, krb5-devel, openssl-devel
Patch0: %{name}-norpath.patch
Patch1: %{name}-python3.patch
Patch2: backport-%{name}-1.3.9-errgetfunc.patch
Patch3: 0001-fix-CC-compiler-error.patch
%description
The serf library is a C-based HTTP client library built upon the Apache
Portable Runtime (APR) library. It multiplexes connections, running the
@ -70,6 +70,12 @@ export LD_LIBRARY_PATH=%{buildroot}%{_libdir}
%doc README CHANGES design-guide.txt
%changelog
* Mon Apr 24 2023 sjxur <sjxur@isoftstone.com> - 1.3.9-17
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix CC compiler error
* Wed Feb 01 2023 gaihuiying <eaglegai@163.com> - 1.3.9-16
- Type:bugfix
- ID:NA