From 9e0e154529e4933b37064066fbefec3a75aff0b9 Mon Sep 17 00:00:00 2001 From: jammyjellyfish Date: Fri, 14 Apr 2023 22:51:30 +0800 Subject: [PATCH] Support specify CC --- ipvsadm.spec | 9 ++++++++- support-specify-cc.patch | 26 ++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 support-specify-cc.patch diff --git a/ipvsadm.spec b/ipvsadm.spec index 586a275..e24d346 100644 --- a/ipvsadm.spec +++ b/ipvsadm.spec @@ -1,6 +1,6 @@ Name: ipvsadm Version: 1.31 -Release: 5 +Release: 6 Summary: A utility to administer the IP virtual server services License: GPLv2+ URL: https://kernel.org/pub/linux/utils/kernel/ipvsadm/ @@ -9,6 +9,7 @@ Source1: ipvsadm.service Source2: ipvsadm-config Patch6000: ipvsadm-use-CFLAGS-and-LDFLAGS-environment-variables.patch +Patch6001: support-specify-cc.patch BuildRequires: gcc libnl3-devel popt-devel systemd Requires(post): systemd @@ -56,6 +57,12 @@ install -p -D -m 0600 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/%{name}-co %{_mandir}/man8/*8* %changelog +* Fri Apr 14 2023 jammyjellyfish - 1.31-6 +- Type: requirement +- ID: NA +- SUG: NA +- DESC: Support specify CC + * Fri Apr 22 2022 kwb0523 - 1.31-5 - Type: requirement - ID: NA diff --git a/support-specify-cc.patch b/support-specify-cc.patch new file mode 100644 index 0000000..3926d9c --- /dev/null +++ b/support-specify-cc.patch @@ -0,0 +1,26 @@ +From: jammyjellyfish +Date: Mon Apr 17 01:40:15 PM CST 2023 +Subject: 支持指定 CC 编译 +diff -up ipvsadm-1.31/libipvs/Makefile.orig2 ipvsadm-1.31/libipvs/Makefile +--- ipvsadm-1.31/libipvs/Makefile.orig2 2023-04-14 22:49:49.730489743 +0800 ++++ ipvsadm-1.31/libipvs/Makefile 2023-04-14 22:50:04.302529121 +0800 +@@ -1,6 +1,6 @@ + # Makefile for libipvs + +-CC = gcc ++CC ?= gcc + CFLAGS += -Wall -Wunused -Wstrict-prototypes -g -fPIC + ifneq (0,$(HAVE_NL)) + CFLAGS += -DLIBIPVS_USE_NL +diff -up ipvsadm-1.31/Makefile.orig2 ipvsadm-1.31/Makefile +--- ipvsadm-1.31/Makefile.orig2 2023-04-14 22:46:08.529892021 +0800 ++++ ipvsadm-1.31/Makefile 2023-04-14 22:48:39.174299080 +0800 +@@ -35,7 +35,7 @@ ARCH = $(shell uname -m) + RPMSOURCEDIR = $(shell rpm --eval '%_sourcedir') + RPMSPECDIR = $(shell rpm --eval '%_specdir') + +-CC = gcc ++CC ?= gcc + INCLUDE = + SBIN = $(BUILD_ROOT)/sbin + MANDIR = usr/man -- Gitee