1 Star 0 Fork 13

JofDiamonds/ipvsadm

forked from src-openEuler/ipvsadm 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
ipvsadm-use-CFLAGS-and-LDFLAGS-environment-variables.patch 1.46 KB
一键复制 编辑 原始数据 按行查看 历史
orange-snn 提交于 2019-12-30 11:49 . init
From 25d7aa2faef0c36f053ee1ba418fe14022ef6f7c Mon Sep 17 00:00:00 2001
From: Ryan O'Hara <rohara@redhat.com>
Date: Tue, 27 Feb 2018 11:49:44 -0600
Subject: [PATCH] ipvsadm: use CFLAGS and LDFLAGS environment variables
Signed-off-by: Ryan O'Hara <rohara@redhat.com>
---
Makefile | 6 +++---
libipvs/Makefile | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
index 91a2991..2a1d179 100644
--- a/Makefile
+++ b/Makefile
@@ -46,9 +46,9 @@ INSTALL = install
STATIC_LIBS = libipvs/libipvs.a
ifeq "${ARCH}" "sparc64"
- CFLAGS = -Wall -Wunused -Wstrict-prototypes -g -m64 -pipe -mcpu=ultrasparc -mcmodel=medlow
+ CFLAGS += -Wall -Wunused -Wstrict-prototypes -g -m64 -pipe -mcpu=ultrasparc -mcmodel=medlow
else
- CFLAGS = -Wall -Wunused -Wstrict-prototypes -g
+ CFLAGS += -Wall -Wunused -Wstrict-prototypes -g
endif
@@ -87,7 +87,7 @@ libs:
make -C libipvs
ipvsadm: $(OBJS) $(STATIC_LIBS)
- $(CC) $(CFLAGS) -o $@ $^ $(LIBS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
install: all
if [ ! -d $(SBIN) ]; then $(MKDIR) -p $(SBIN); fi
diff --git a/libipvs/Makefile b/libipvs/Makefile
index f845c8b..780f3f3 100644
--- a/libipvs/Makefile
+++ b/libipvs/Makefile
@@ -1,7 +1,7 @@
# Makefile for libipvs
CC = gcc
-CFLAGS = -Wall -Wunused -Wstrict-prototypes -g -fPIC
+CFLAGS += -Wall -Wunused -Wstrict-prototypes -g -fPIC
ifneq (0,$(HAVE_NL))
CFLAGS += -DLIBIPVS_USE_NL
CFLAGS += $(shell \
--
2.14.3
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/kwb0523/ipvsadm.git
git@gitee.com:kwb0523/ipvsadm.git
kwb0523
ipvsadm
ipvsadm
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385