From 15c84adca94bfe4a89ece5c04f06a884cf508ebb Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Mon, 17 Jan 2011 21:55:49 +0100 Subject: fix packages to be compile with stack protector - libtool do not pass -fstack-protector while linking, but this is required to successfully link libraries or executables with SSP - pass LDFLAGS for non-libtool packages --- .../patch-pppd_plugins_pppol2tp_Makefile_linux | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 package/ppp/patches/patch-pppd_plugins_pppol2tp_Makefile_linux (limited to 'package/ppp/patches/patch-pppd_plugins_pppol2tp_Makefile_linux') diff --git a/package/ppp/patches/patch-pppd_plugins_pppol2tp_Makefile_linux b/package/ppp/patches/patch-pppd_plugins_pppol2tp_Makefile_linux new file mode 100644 index 000000000..4c46c5971 --- /dev/null +++ b/package/ppp/patches/patch-pppd_plugins_pppol2tp_Makefile_linux @@ -0,0 +1,41 @@ +--- ppp-2.4.5.orig/pppd/plugins/pppol2tp/Makefile.linux 2009-11-16 23:26:07.000000000 +0100 ++++ ppp-2.4.5/pppd/plugins/pppol2tp/Makefile.linux 2011-01-16 21:32:19.000000000 +0100 +@@ -1,13 +1,10 @@ +-#CC = gcc +-COPTS = -O2 -g +-CFLAGS = $(COPTS) -I. -I../.. -I../../../include -fPIC +-LDFLAGS = -shared +-INSTALL = install ++include ../../../makedefs.linux + +-#*********************************************************************** ++CPPFLAGS += -I. -I../.. -I../../../include ++#CFLAGS += -fPIC ++#LDFLAGS += -shared + +-DESTDIR = @DESTDIR@ +-LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION) ++#*********************************************************************** + + VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h) + +@@ -16,7 +13,11 @@ PLUGINS := pppol2tp.so openl2tp.so + all: $(PLUGINS) + + %.so: %.o +- $(CC) $(CFLAGS) -o $@ -shared $^ $(LIBS) ++ $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) ++ echo $(LDFLAGS) ++ ++%.o: %.c ++ $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $< + + install: all + $(INSTALL) -d -m 755 $(LIBDIR) +@@ -25,5 +26,4 @@ install: all + clean: + rm -f *.o *.so + +-%.o: %.c +- $(CC) $(CFLAGS) -c -o $@ $< ++.PHONY: clean -- cgit v1.2.3