1 Description: Use build flags from environment (dpkg-buildflags).
2 Necessary for hardening flags.
3 Author: Simon Ruderich <simon@ruderich.org>
4 Last-Update: 2012-03-13
6 Index: sudo-1.8.3p2/src/Makefile.in
7 ===================================================================
8 --- sudo-1.8.3p2.orig/src/Makefile.in 2012-03-13 17:46:43.069036559 +0100
9 +++ sudo-1.8.3p2/src/Makefile.in 2012-03-13 17:47:12.949037698 +0100
11 $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) $(LTLDFLAGS) -o $@ sudo_noexec.lo -avoid-version -rpath $(noexecdir)
15 + $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ sesh.o
19 Index: sudo-1.8.3p2/compat/Makefile.in
20 ===================================================================
21 --- sudo-1.8.3p2.orig/compat/Makefile.in 2012-03-13 17:46:43.069036559 +0100
22 +++ sudo-1.8.3p2/compat/Makefile.in 2012-03-13 17:47:12.949037698 +0100
24 # Usually -O and/or -g
30 # OS dependent defines
34 $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $<
36 libreplace.la: $(LTLIBOBJS)
37 - $(LIBTOOL) --mode=link $(CC) -o $@ $(LTLIBOBJS) -no-install
38 + $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ $(LTLIBOBJS) -no-install
43 mksiglist: $(srcdir)/mksiglist.c $(srcdir)/mksiglist.h $(incdir)/missing.h $(top_builddir)/config.h
44 - $(CC) $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/mksiglist.c -o $@
45 + $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(DEFS) $(srcdir)/mksiglist.c -o $@
47 fnm_test: fnm_test.o libreplace.la
48 - $(LIBTOOL) --mode=link $(CC) -o $@ fnm_test.o libreplace.la
49 + $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ fnm_test.o libreplace.la
51 globtest: globtest.o libreplace.la
52 - $(LIBTOOL) --mode=link $(CC) -o $@ globtest.o libreplace.la
53 + $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ globtest.o libreplace.la
55 @DEV@$(srcdir)/mksiglist.h: $(srcdir)/siglist.in
56 @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 > $@
57 Index: sudo-1.8.3p2/common/Makefile.in
58 ===================================================================
59 --- sudo-1.8.3p2.orig/common/Makefile.in 2012-03-13 17:46:43.013036558 +0100
60 +++ sudo-1.8.3p2/common/Makefile.in 2012-03-13 17:47:12.949037698 +0100
62 # Usually -O and/or -g
68 # OS dependent defines
72 $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $<
74 libcommon.la: $(LTOBJS)
75 - $(LIBTOOL) --mode=link $(CC) -o $@ $(LTOBJS) -no-install
76 + $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ $(LTOBJS) -no-install
80 Index: sudo-1.8.3p2/plugins/sudoers/Makefile.in
81 ===================================================================
82 --- sudo-1.8.3p2.orig/plugins/sudoers/Makefile.in 2012-03-13 17:46:42.985036557 +0100
83 +++ sudo-1.8.3p2/plugins/sudoers/Makefile.in 2012-03-13 17:47:12.949037698 +0100
85 (cd $(top_builddir) && ./config.status --file plugins/sudoers/Makefile)
87 libparsesudoers.la: $(LIBPARSESUDOERS_OBJS)
88 - $(LIBTOOL) --mode=link $(CC) -o $@ $(LIBPARSESUDOERS_OBJS) -no-install
89 + $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ $(LIBPARSESUDOERS_OBJS) -no-install
91 sudoers.la: $(SUDOERS_OBJS) $(LT_LIBS) libparsesudoers.la
92 $(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)