Gentoo Archives: gentoo-commits

From: "Kacper Kowalik (xarthisius)" <xarthisius@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-cluster/ipvsadm/files: ipvsadm-1.25-r1-build-fixup.diff ipvsadm-1.25-build-fixup.diff
Date: Thu, 09 Sep 2010 09:41:05
Message-Id: 20100909094054.64E2E2003C@flycatcher.gentoo.org
1 xarthisius 10/09/09 09:40:54
2
3 Added: ipvsadm-1.25-r1-build-fixup.diff
4 Removed: ipvsadm-1.25-build-fixup.diff
5 Log:
6 Respect LDFLAGS wrt bug 335908. Thanks to Diego for the report.
7
8 (Portage version: 2.2_rc77/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.1 sys-cluster/ipvsadm/files/ipvsadm-1.25-r1-build-fixup.diff
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/ipvsadm/files/ipvsadm-1.25-r1-build-fixup.diff?rev=1.1&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/ipvsadm/files/ipvsadm-1.25-r1-build-fixup.diff?rev=1.1&content-type=text/plain
15
16 Index: ipvsadm-1.25-r1-build-fixup.diff
17 ===================================================================
18 --- ipvsadm-1.25/Makefile
19 +++ ipvsadm-1.25/Makefile
20 @@ -45,11 +45,11 @@
21 STATIC_LIBS = libipvs/libipvs.a
22
23 ifeq "${ARCH}" "sparc64"
24 - CFLAGS = -Wall -Wunused -Wstrict-prototypes -g -m64 -pipe -mcpu=ultrasparc -mcmodel=medlow
25 + CFLAGS := -g -m64 -pipe -mcpu=ultrasparc -mcmodel=medlow
26 else
27 - CFLAGS = -Wall -Wunused -Wstrict-prototypes -g
28 + CFLAGS := -g
29 endif
30 -
31 +OPTFLAGS += -Wall -Wunused -Wstrict-prototypes
32
33 #####################################
34 # No servicable parts below this line
35 @@ -92,10 +92,12 @@
36 all: libs ipvsadm
37
38 libs:
39 - make -C libipvs
40 + $(MAKE) -C libipvs
41 +
42 +$(STATIC_LIBS): libs
43
44 ipvsadm: $(OBJS) $(STATIC_LIBS)
45 - $(CC) $(CFLAGS) -o $@ $^ $(LIBS)
46 + $(CC) $(LDFLAGS) $(OPTFLAGS) $(CFLAGS) -o $@ $^ $(LIBS)
47
48 install: all
49 if [ ! -d $(SBIN) ]; then $(MKDIR) -p $(SBIN); fi
50 @@ -115,7 +117,7 @@
51 rm -rf debian/tmp
52 find . -name '*.[ao]' -o -name "*~" -o -name "*.orig" \
53 -o -name "*.rej" -o -name core | xargs rm -f
54 - make -C libipvs clean
55 + $(MAKE) -C libipvs clean
56
57 distclean: clean
58
59 @@ -148,4 +150,4 @@
60 dpkg-buildpackage
61
62 %.o: %.c
63 - $(CC) $(CFLAGS) $(INCLUDE) $(DEFINES) -c -o $@ $<
64 + $(CC) $(OPTFLAGS) $(CFLAGS) $(INCLUDE) $(DEFINES) -c -o $@ $<
65 --- ipvsadm-1.25/libipvs/Makefile
66 +++ ipvsadm-1.25/libipvs/Makefile
67 @@ -1,14 +1,14 @@
68 # Makefile for libipvs
69
70 CC = gcc
71 -CFLAGS = -Wall -Wunused -Wstrict-prototypes -g -fPIC
72 +OPTFLAGS = -Wall -Wunused -Wstrict-prototypes -fPIC
73 ifneq (0,$(HAVE_NL))
74 -CFLAGS += -DLIBIPVS_USE_NL
75 +DEFINES += -DLIBIPVS_USE_NL
76 endif
77
78 INCLUDE += $(shell if [ -f ../../ip_vs.h ]; then \
79 echo "-I../../."; fi;)
80 -DEFINES = $(shell if [ ! -f ../../ip_vs.h ]; then \
81 +DEFINES += $(shell if [ ! -f ../../ip_vs.h ]; then \
82 echo "-DHAVE_NET_IP_VS_H"; fi;)
83
84 .PHONY = all clean install dist distclean rpm rpms
85 @@ -21,10 +21,10 @@
86 ar rv $@ $^
87
88 $(SHARED_LIB): libipvs.o ip_vs_nl_policy.o
89 - $(CC) -shared -Wl,-soname,$@ -o $@ $^
90 + $(CC) $(LDFLAGS) -shared -Wl,-soname,$@ -o $@ $^
91
92 %.o: %.c
93 - $(CC) $(CFLAGS) $(INCLUDE) $(DEFINES) -c -o $@ $<
94 + $(CC) $(OPTFLAGS) $(CFLAGS) $(INCLUDE) $(DEFINES) -c -o $@ $<
95
96 clean:
97 rm -f *.[ao] *~ *.orig *.rej core *.so