!9 支持指定 CC 编译

From: @jammyjellyfish 
Reviewed-by: @leeffo 
Signed-off-by: @leeffo
This commit is contained in:
openeuler-ci-bot 2023-04-17 01:34:47 +00:00 committed by Gitee
commit b6db6ba8f8
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 18 additions and 1 deletions

View File

@ -1,6 +1,6 @@
Name: gsm
Version: 1.0.18
Release: 5
Release: 6
Summary: GSM speech compressor Shared libraries and Utilities
License: MIT
URL: http://www.quut.com/gsm/
@ -9,6 +9,7 @@ Source0: http://www.quut.com/gsm/%{name}-%{version}.tar.gz
# below patches are from redhat.
Patch0: gsm-makefile.patch
Patch1: gsm-warnings.patch
Patch2: support-specify-cc.patch
Provides: gsm-tool
Obsoletes: gsm-tool
@ -74,6 +75,9 @@ make addtst
%{_mandir}/man*/*
%changelog
* Fri Apr 14 2023 jammyjellyfish <jammyjellyfish255@outlook.com> - 1.0.18-6
- Support specify CC
* Fri Jun 4 2021 wangkerong <wangkerong@huawei.com> 1.0.18-5
- Add a BuildRequires for gcc

13
support-specify-cc.patch Normal file
View File

@ -0,0 +1,13 @@
diff -up gsm-1.0-pl18/Makefile.orig gsm-1.0-pl18/Makefile
--- gsm-1.0-pl18/Makefile.orig 2023-04-14 22:20:16.910186912 +0800
+++ gsm-1.0-pl18/Makefile 2023-04-14 22:25:09.582803780 +0800
@@ -43,7 +43,8 @@ WAV49 = -DWAV49
# CC = /usr/lang/acc
# CCFLAGS = -c -O
-CC = gcc -ansi -pedantic
+CC ?= gcc
+CC := $(CC) -ansi -pedantic
CCFLAGS = -c $(RPM_OPT_FLAGS) -DNeedFunctionPrototypes=1 -Wall -Wno-comment -D_XOPEN_SOURCE=700 -D_REENTRANT -fPIC
LD = $(CC)