update patch to reflect changes in new upstream version
[debian/sudo] / debian / patches / actually-use-buildflags.diff
1 diff --git a/common/Makefile.in b/common/Makefile.in
2 index aff4c54..7f05e4b 100644
3 --- a/common/Makefile.in
4 +++ b/common/Makefile.in
5 @@ -45,6 +45,9 @@ CPPFLAGS = -I$(incdir) -I$(top_builddir) -I$(top_srcdir) @CPPFLAGS@
6  # Usually -O and/or -g
7  CFLAGS = @CFLAGS@
8  
9 +# Linker flags
10 +LDFLAGS = @LDFLAGS@
11 +
12  # OS dependent defines
13  DEFS = @OSDEFS@ -D_PATH_SUDO_CONF=\"$(sysconfdir)/sudo.conf\"
14  
15 @@ -67,7 +70,7 @@ Makefile: $(srcdir)/Makefile.in
16         $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $<
17  
18  libcommon.la: $(LTOBJS)
19 -       $(LIBTOOL) --mode=link $(CC) -o $@ $(LTOBJS) -no-install
20 +       $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ $(LTOBJS) -no-install
21  
22  pre-install:
23  
24 diff --git a/compat/Makefile.in b/compat/Makefile.in
25 index d0361ce..93672ac 100644
26 --- a/compat/Makefile.in
27 +++ b/compat/Makefile.in
28 @@ -45,6 +45,9 @@ CPPFLAGS = -I$(incdir) -I$(top_builddir) -I$(top_srcdir) @CPPFLAGS@
29  # Usually -O and/or -g
30  CFLAGS = @CFLAGS@
31  
32 +# Linker flags
33 +LDFLAGS = @LDFLAGS@
34 +
35  # OS dependent defines
36  DEFS = @OSDEFS@
37  
38 @@ -75,19 +78,19 @@ Makefile: $(srcdir)/Makefile.in
39         $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $<
40  
41  libreplace.la: $(LTLIBOBJS)
42 -       $(LIBTOOL) --mode=link $(CC) -o $@ $(LTLIBOBJS) -no-install
43 +       $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ $(LTLIBOBJS) -no-install
44  
45  siglist.c: mksiglist
46         ./mksiglist > $@
47  
48  mksiglist: $(srcdir)/mksiglist.c $(srcdir)/mksiglist.h $(incdir)/missing.h $(top_builddir)/config.h
49 -       $(CC) $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/mksiglist.c -o $@
50 +       $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(DEFS) $(srcdir)/mksiglist.c -o $@
51  
52  fnm_test: fnm_test.o libreplace.la
53 -       $(LIBTOOL) --mode=link $(CC) -o $@ fnm_test.o libreplace.la
54 +       $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ fnm_test.o libreplace.la
55  
56  globtest: globtest.o libreplace.la
57 -       $(LIBTOOL) --mode=link $(CC) -o $@ globtest.o libreplace.la
58 +       $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ globtest.o libreplace.la
59  
60  $(srcdir)/mksiglist.h: $(srcdir)/siglist.in
61         if [ -n "$(DEVEL)" ]; then \
62 diff --git a/debian/patches/actually-use-buildflags.diff b/debian/patches/actually-use-buildflags.diff
63 index 42bf4b5..e69de29 100644
64 --- a/debian/patches/actually-use-buildflags.diff
65 +++ b/debian/patches/actually-use-buildflags.diff
66 @@ -1,92 +0,0 @@
67 -Description: Use build flags from environment (dpkg-buildflags).
68 - Necessary for hardening flags.
69 -Author: Simon Ruderich <simon@ruderich.org>
70 -Last-Update: 2012-03-13
71 -
72 -Index: sudo-1.8.3p2/src/Makefile.in
73 -===================================================================
74 ---- sudo-1.8.3p2.orig/src/Makefile.in  2012-03-13 17:46:43.069036559 +0100
75 -+++ sudo-1.8.3p2/src/Makefile.in       2012-03-13 17:47:12.949037698 +0100
76 -@@ -101,7 +101,7 @@
77 -       $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) $(LTLDFLAGS) -o $@ sudo_noexec.lo -avoid-version -rpath $(noexecdir)
78
79 - sesh: sesh.o
80 --      $(CC) -o $@ sesh.o
81 -+      $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ sesh.o
82
83 - pre-install:
84
85 -Index: sudo-1.8.3p2/compat/Makefile.in
86 -===================================================================
87 ---- sudo-1.8.3p2.orig/compat/Makefile.in       2012-03-13 17:46:43.069036559 +0100
88 -+++ sudo-1.8.3p2/compat/Makefile.in    2012-03-13 17:47:12.949037698 +0100
89 -@@ -35,6 +35,9 @@
90 - # Usually -O and/or -g
91 - CFLAGS = @CFLAGS@
92
93 -+# Linker flags
94 -+LDFLAGS = @LDFLAGS@
95 -+
96 - # OS dependent defines
97 - DEFS = @OSDEFS@
98
99 -@@ -62,19 +65,19 @@
100 -       $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $<
101
102 - libreplace.la: $(LTLIBOBJS)
103 --      $(LIBTOOL) --mode=link $(CC) -o $@ $(LTLIBOBJS) -no-install
104 -+      $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ $(LTLIBOBJS) -no-install
105
106 - siglist.c: mksiglist
107 -       ./mksiglist > $@
108
109 - mksiglist: $(srcdir)/mksiglist.c $(srcdir)/mksiglist.h $(incdir)/missing.h $(top_builddir)/config.h
110 --      $(CC) $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/mksiglist.c -o $@
111 -+      $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(DEFS) $(srcdir)/mksiglist.c -o $@
112
113 - fnm_test: fnm_test.o libreplace.la
114 --      $(LIBTOOL) --mode=link $(CC) -o $@ fnm_test.o libreplace.la
115 -+      $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ fnm_test.o libreplace.la
116
117 - globtest: globtest.o libreplace.la
118 --      $(LIBTOOL) --mode=link $(CC) -o $@ globtest.o libreplace.la
119 -+      $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ globtest.o libreplace.la
120
121 - @DEV@$(srcdir)/mksiglist.h: $(srcdir)/siglist.in
122 - @DEV@ awk 'BEGIN {print "/* public domain */\n"} /^    [A-Z]/ {printf("#ifdef SIG%s\n    if (my_sys_siglist[SIG%s] == NULL)\n\tmy_sys_siglist[SIG%s] = \"%s\";\n#endif\n", $$1, $$1, $$1, substr($$0, 13))}' < $(srcdir)/siglist.in > $@
123 -Index: sudo-1.8.3p2/common/Makefile.in
124 -===================================================================
125 ---- sudo-1.8.3p2.orig/common/Makefile.in       2012-03-13 17:46:43.013036558 +0100
126 -+++ sudo-1.8.3p2/common/Makefile.in    2012-03-13 17:47:12.949037698 +0100
127 -@@ -35,6 +35,9 @@
128 - # Usually -O and/or -g
129 - CFLAGS = @CFLAGS@
130
131 -+# Linker flags
132 -+LDFLAGS = @LDFLAGS@
133 -+
134 - # OS dependent defines
135 - DEFS = @OSDEFS@
136
137 -@@ -56,7 +59,7 @@
138 -       $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $<
139
140 - libcommon.la: $(LTOBJS)
141 --      $(LIBTOOL) --mode=link $(CC) -o $@ $(LTOBJS) -no-install
142 -+      $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ $(LTOBJS) -no-install
143
144 - pre-install:
145
146 -Index: sudo-1.8.3p2/plugins/sudoers/Makefile.in
147 -===================================================================
148 ---- sudo-1.8.3p2.orig/plugins/sudoers/Makefile.in      2012-03-13 17:46:42.985036557 +0100
149 -+++ sudo-1.8.3p2/plugins/sudoers/Makefile.in   2012-03-13 17:47:12.949037698 +0100
150 -@@ -159,7 +159,7 @@
151 -       (cd $(top_builddir) && ./config.status --file plugins/sudoers/Makefile)
152
153 - libparsesudoers.la: $(LIBPARSESUDOERS_OBJS)
154 --      $(LIBTOOL) --mode=link $(CC) -o $@ $(LIBPARSESUDOERS_OBJS) -no-install
155 -+      $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ $(LIBPARSESUDOERS_OBJS) -no-install
156
157 - sudoers.la: $(SUDOERS_OBJS) $(LT_LIBS) libparsesudoers.la
158 -       $(LIBTOOL) @LT_STATIC@ --mode=link $(CC) $(SUDOERS_LDFLAGS) $(LTLDFLAGS) -o $@ $(SUDOERS_OBJS) libparsesudoers.la $(SUDOERS_LIBS) -module -export-symbols $(srcdir)/sudoers.sym -avoid-version -rpath $(plugindir)
159 diff --git a/plugins/sudoers/Makefile.in b/plugins/sudoers/Makefile.in
160 index 8769d38..0eb71e9 100644
161 --- a/plugins/sudoers/Makefile.in
162 +++ b/plugins/sudoers/Makefile.in
163 @@ -56,6 +56,9 @@ CPPFLAGS = -I$(incdir) -I$(top_builddir) -I$(devdir) -I$(srcdir) -I$(top_srcdir)
164  # Usually -O and/or -g
165  CFLAGS = @CFLAGS@
166  
167 +# Linker flags
168 +LDFLAGS = @LDFLAGS@
169 +
170  # Flags to pass to the link stage
171  LDFLAGS = @LDFLAGS@
172  SUDOERS_LDFLAGS = $(LDFLAGS) @SUDOERS_LDFLAGS@
173 @@ -163,7 +166,7 @@ Makefile: $(srcdir)/Makefile.in
174         (cd $(top_builddir) && ./config.status --file plugins/sudoers/Makefile)
175  
176  libparsesudoers.la: $(LIBPARSESUDOERS_OBJS)
177 -       $(LIBTOOL) --mode=link $(CC) -o $@ $(LIBPARSESUDOERS_OBJS) -no-install
178 +       $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ $(LIBPARSESUDOERS_OBJS) -no-install
179  
180  sudoers.la: $(SUDOERS_OBJS) $(LT_LIBS) libparsesudoers.la
181         $(LIBTOOL) @LT_STATIC@ --mode=link $(CC) $(SUDOERS_LDFLAGS) $(LTLDFLAGS) -o $@ $(SUDOERS_OBJS) libparsesudoers.la $(SUDOERS_LIBS) -module -export-symbols $(srcdir)/sudoers.sym -avoid-version -rpath $(plugindir)