fix busted patch
[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/plugins/sudoers/Makefile.in b/plugins/sudoers/Makefile.in
63 index 8769d38..0eb71e9 100644
64 --- a/plugins/sudoers/Makefile.in
65 +++ b/plugins/sudoers/Makefile.in
66 @@ -56,6 +56,9 @@ CPPFLAGS = -I$(incdir) -I$(top_builddir) -I$(devdir) -I$(srcdir) -I$(top_srcdir)
67  # Usually -O and/or -g
68  CFLAGS = @CFLAGS@
69  
70 +# Linker flags
71 +LDFLAGS = @LDFLAGS@
72 +
73  # Flags to pass to the link stage
74  LDFLAGS = @LDFLAGS@
75  SUDOERS_LDFLAGS = $(LDFLAGS) @SUDOERS_LDFLAGS@
76 @@ -163,7 +166,7 @@ Makefile: $(srcdir)/Makefile.in
77         (cd $(top_builddir) && ./config.status --file plugins/sudoers/Makefile)
78  
79  libparsesudoers.la: $(LIBPARSESUDOERS_OBJS)
80 -       $(LIBTOOL) --mode=link $(CC) -o $@ $(LIBPARSESUDOERS_OBJS) -no-install
81 +       $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ $(LIBPARSESUDOERS_OBJS) -no-install
82  
83  sudoers.la: $(SUDOERS_OBJS) $(LT_LIBS) libparsesudoers.la
84         $(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)