Blame SOURCES/0003-ipvsadm-use-CFLAGS-and-LDFLAGS-environment-variables.patch

1fcf34
From 25d7aa2faef0c36f053ee1ba418fe14022ef6f7c Mon Sep 17 00:00:00 2001
1fcf34
From: Ryan O'Hara <rohara@redhat.com>
1fcf34
Date: Tue, 27 Feb 2018 11:49:44 -0600
1fcf34
Subject: [PATCH] ipvsadm: use CFLAGS and LDFLAGS environment variables
1fcf34
1fcf34
Signed-off-by: Ryan O'Hara <rohara@redhat.com>
1fcf34
---
1fcf34
 Makefile         | 6 +++---
1fcf34
 libipvs/Makefile | 2 +-
1fcf34
 2 files changed, 4 insertions(+), 4 deletions(-)
1fcf34
1fcf34
diff --git a/Makefile b/Makefile
1fcf34
index 91a2991..2a1d179 100644
1fcf34
--- a/Makefile
1fcf34
+++ b/Makefile
1fcf34
@@ -46,9 +46,9 @@ INSTALL		= install
1fcf34
 STATIC_LIBS	= libipvs/libipvs.a
1fcf34
 
1fcf34
 ifeq "${ARCH}" "sparc64"
1fcf34
-    CFLAGS = -Wall -Wunused -Wstrict-prototypes -g -m64 -pipe -mcpu=ultrasparc -mcmodel=medlow
1fcf34
+    CFLAGS += -Wall -Wunused -Wstrict-prototypes -g -m64 -pipe -mcpu=ultrasparc -mcmodel=medlow
1fcf34
 else
1fcf34
-    CFLAGS = -Wall -Wunused -Wstrict-prototypes -g
1fcf34
+    CFLAGS += -Wall -Wunused -Wstrict-prototypes -g
1fcf34
 endif
1fcf34
 
1fcf34
 
1fcf34
@@ -87,7 +87,7 @@ libs:
1fcf34
 		make -C libipvs
1fcf34
 
1fcf34
 ipvsadm:	$(OBJS) $(STATIC_LIBS)
1fcf34
-		$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
1fcf34
+		$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
1fcf34
 
1fcf34
 install:        all
1fcf34
 		if [ ! -d $(SBIN) ]; then $(MKDIR) -p $(SBIN); fi
1fcf34
diff --git a/libipvs/Makefile b/libipvs/Makefile
1fcf34
index f845c8b..780f3f3 100644
1fcf34
--- a/libipvs/Makefile
1fcf34
+++ b/libipvs/Makefile
1fcf34
@@ -1,7 +1,7 @@
1fcf34
 # Makefile for libipvs
1fcf34
 
1fcf34
 CC		= gcc
1fcf34
-CFLAGS		= -Wall -Wunused -Wstrict-prototypes -g -fPIC
1fcf34
+CFLAGS		+= -Wall -Wunused -Wstrict-prototypes -g -fPIC
1fcf34
 ifneq (0,$(HAVE_NL))
1fcf34
 CFLAGS		+= -DLIBIPVS_USE_NL
1fcf34
 CFLAGS		+= $(shell \
1fcf34
-- 
1fcf34
2.14.3
1fcf34