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@
12 # OS dependent defines
13 DEFS = @OSDEFS@ -D_PATH_SUDO_CONF=\"$(sysconfdir)/sudo.conf\"
15 @@ -67,7 +70,7 @@ Makefile: $(srcdir)/Makefile.in
16 $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $<
18 libcommon.la: $(LTOBJS)
19 - $(LIBTOOL) --mode=link $(CC) -o $@ $(LTOBJS) -no-install
20 + $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ $(LTOBJS) -no-install
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
35 # OS dependent defines
38 @@ -75,19 +78,19 @@ Makefile: $(srcdir)/Makefile.in
39 $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $<
41 libreplace.la: $(LTLIBOBJS)
42 - $(LIBTOOL) --mode=link $(CC) -o $@ $(LTLIBOBJS) -no-install
43 + $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ $(LTLIBOBJS) -no-install
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 $@
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
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
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
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
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
77 - $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) $(LTLDFLAGS) -o $@ sudo_noexec.lo -avoid-version -rpath $(noexecdir)
81 -+ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ sesh.o
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
90 - # Usually -O and/or -g
96 - # OS dependent defines
100 - $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $<
102 - libreplace.la: $(LTLIBOBJS)
103 -- $(LIBTOOL) --mode=link $(CC) -o $@ $(LTLIBOBJS) -no-install
104 -+ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ $(LTLIBOBJS) -no-install
106 - siglist.c: mksiglist
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 $@
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
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
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
128 - # Usually -O and/or -g
132 -+LDFLAGS = @LDFLAGS@
134 - # OS dependent defines
138 - $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $<
140 - libcommon.la: $(LTOBJS)
141 -- $(LIBTOOL) --mode=link $(CC) -o $@ $(LTOBJS) -no-install
142 -+ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ $(LTOBJS) -no-install
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
151 - (cd $(top_builddir) && ./config.status --file plugins/sudoers/Makefile)
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
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
170 # Flags to pass to the link stage
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)
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
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)