1 From d729b06f0ac7a5ebd3648ef60bef0499b59bf82d Mon Sep 17 00:00:00 2001
2 From: Michal Sekletar <msekleta@redhat.com>
3 Date: Fri, 4 Apr 2014 11:29:39 +0200
4 Subject: [PATCH 03/25] build-sys: utilize compiler flags handed to us by
8 chat/Makefile.linux | 2 +-
9 pppd/Makefile.linux | 3 +--
10 pppd/plugins/Makefile.linux | 2 +-
11 pppd/plugins/pppoatm/Makefile.linux | 2 +-
12 pppd/plugins/radius/Makefile.linux | 2 +-
13 pppd/plugins/rp-pppoe/Makefile.linux | 2 +-
14 pppdump/Makefile.linux | 2 +-
15 pppstats/Makefile.linux | 2 +-
16 8 files changed, 8 insertions(+), 9 deletions(-)
18 diff --git a/chat/Makefile.linux b/chat/Makefile.linux
19 index 1065ac5..848cd8d 100644
20 --- a/chat/Makefile.linux
21 +++ b/chat/Makefile.linux
22 @@ -10,7 +10,7 @@ CDEF3= -UNO_SLEEP # Use the usleep function
23 CDEF4= -DFNDELAY=O_NDELAY # Old name value
24 CDEFS= $(CDEF1) $(CDEF2) $(CDEF3) $(CDEF4)
27 +COPTS= $(RPM_OPT_FLAGS)
28 CFLAGS= $(COPTS) $(CDEFS)
31 diff --git a/pppd/Makefile.linux b/pppd/Makefile.linux
32 index 5a44d30..63872eb 100644
33 --- a/pppd/Makefile.linux
34 +++ b/pppd/Makefile.linux
35 @@ -32,8 +32,7 @@ endif
39 -COPTS = -O2 -pipe -Wall -g
41 +COPTS = -Wall $(RPM_OPT_FLAGS)
43 # Uncomment the next 2 lines to include support for Microsoft's
44 # MS-CHAP authentication protocol. Also, edit plugins/radius/Makefile.linux.
45 diff --git a/pppd/plugins/Makefile.linux b/pppd/plugins/Makefile.linux
46 index 0a7ec7b..e09a369 100644
47 --- a/pppd/plugins/Makefile.linux
48 +++ b/pppd/plugins/Makefile.linux
52 +COPTS = $(RPM_OPT_FLAGS)
53 CFLAGS = $(COPTS) -I.. -I../../include -fPIC
56 diff --git a/pppd/plugins/pppoatm/Makefile.linux b/pppd/plugins/pppoatm/Makefile.linux
57 index 20f62e6..5a81447 100644
58 --- a/pppd/plugins/pppoatm/Makefile.linux
59 +++ b/pppd/plugins/pppoatm/Makefile.linux
63 +COPTS = $(RPM_OPT_FLAGS)
64 CFLAGS = $(COPTS) -I../.. -I../../../include -fPIC
67 diff --git a/pppd/plugins/radius/Makefile.linux b/pppd/plugins/radius/Makefile.linux
68 index 24ed3e5..45b3b8d 100644
69 --- a/pppd/plugins/radius/Makefile.linux
70 +++ b/pppd/plugins/radius/Makefile.linux
71 @@ -12,7 +12,7 @@ VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h)
74 PLUGIN=radius.so radattr.so radrealms.so
75 -CFLAGS=-I. -I../.. -I../../../include -O2 -fPIC -DRC_LOG_FACILITY=LOG_DAEMON
76 +CFLAGS=-I. -I../.. -I../../../include $(RPM_OPT_FLAGS) -DRC_LOG_FACILITY=LOG_DAEMON
78 # Uncomment the next line to include support for Microsoft's
79 # MS-CHAP authentication protocol.
80 diff --git a/pppd/plugins/rp-pppoe/Makefile.linux b/pppd/plugins/rp-pppoe/Makefile.linux
81 index 5d7a271..352991a 100644
82 --- a/pppd/plugins/rp-pppoe/Makefile.linux
83 +++ b/pppd/plugins/rp-pppoe/Makefile.linux
84 @@ -25,7 +25,7 @@ INSTALL = install
85 # Version is set ONLY IN THE MAKEFILE! Don't delete this!
89 +COPTS=$(RPM_OPT_FLAGS)
90 CFLAGS=$(COPTS) -I../../../include '-DRP_VERSION="$(RP_VERSION)"'
91 all: rp-pppoe.so pppoe-discovery
93 diff --git a/pppdump/Makefile.linux b/pppdump/Makefile.linux
94 index ac028f6..d0a5032 100644
95 --- a/pppdump/Makefile.linux
96 +++ b/pppdump/Makefile.linux
97 @@ -2,7 +2,7 @@ DESTDIR = $(INSTROOT)@DESTDIR@
98 BINDIR = $(DESTDIR)/sbin
99 MANDIR = $(DESTDIR)/share/man/man8
101 -CFLAGS= -O -I../include/net
102 +CFLAGS= $(RPM_OPT_FLAGS) -I../include/net
103 OBJS = pppdump.o bsd-comp.o deflate.o zlib.o
106 diff --git a/pppstats/Makefile.linux b/pppstats/Makefile.linux
107 index cca6f0f..42aba73 100644
108 --- a/pppstats/Makefile.linux
109 +++ b/pppstats/Makefile.linux
110 @@ -10,7 +10,7 @@ PPPSTATSRCS = pppstats.c
111 PPPSTATOBJS = pppstats.o
115 +COPTS = $(RPM_OPT_FLAGS)
116 COMPILE_FLAGS = -I../include