From 38d9b3e47167a136896b8da29696280e93927300 Mon Sep 17 00:00:00 2001 From: jammyjellyfish Date: Fri, 14 Apr 2023 22:29:22 +0800 Subject: [PATCH] Support specify CC (cherry picked from commit be8e2b790c8d2f02ce0d76e8b3a24db2fabba3d5) --- gsm.spec | 6 +++++- support-specify-cc.patch | 13 +++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 support-specify-cc.patch diff --git a/gsm.spec b/gsm.spec index f8489ee..c60858b 100644 --- a/gsm.spec +++ b/gsm.spec @@ -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 - 1.0.18-6 +- Support specify CC + * Fri Jun 4 2021 wangkerong 1.0.18-5 - Add a BuildRequires for gcc diff --git a/support-specify-cc.patch b/support-specify-cc.patch new file mode 100644 index 0000000..8ba536d --- /dev/null +++ b/support-specify-cc.patch @@ -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) -- Gitee