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 --- package/ppp/patches/patch-pppd_Makefile_linux | 70 ++++++++++++++++++++++----- 1 file changed, 59 insertions(+), 11 deletions(-) (limited to 'package/ppp/patches/patch-pppd_Makefile_linux') diff --git a/package/ppp/patches/patch-pppd_Makefile_linux b/package/ppp/patches/patch-pppd_Makefile_linux index 32453b249..a447ae1ea 100644 --- a/package/ppp/patches/patch-pppd_Makefile_linux +++ b/package/ppp/patches/patch-pppd_Makefile_linux @@ -1,6 +1,31 @@ ---- ppp-2.4.4.orig/pppd/Makefile.linux 2006-06-04 07:07:46.000000000 +0200 -+++ ppp-2.4.4/pppd/Makefile.linux 2009-06-05 19:12:00.000000000 +0200 -@@ -48,7 +48,7 @@ MPPE=y +--- ppp-2.4.5.orig/pppd/Makefile.linux 2009-11-16 23:26:07.000000000 +0100 ++++ ppp-2.4.5/pppd/Makefile.linux 2011-01-16 17:09:40.000000000 +0100 +@@ -2,12 +2,7 @@ + # pppd makefile for Linux + # $Id: Makefile.linux,v 1.70 2007/06/19 02:08:34 carlsonj Exp $ + # +- +-# Default installation locations +-DESTDIR = $(INSTROOT)@DESTDIR@ +-BINDIR = $(DESTDIR)/sbin +-MANDIR = $(DESTDIR)/share/man/man8 +-INCDIR = $(DESTDIR)/include ++include ../makedefs.linux + + TARGETS = pppd + +@@ -30,10 +25,6 @@ ifeq (.depend,$(wildcard .depend)) + include .depend + endif + +-# CC = gcc +-# +-COPTS = -O2 -pipe -Wall -g +-LIBS = + + # Uncomment the next 2 lines to include support for Microsoft's + # MS-CHAP authentication protocol. Also, edit plugins/radius/Makefile.linux. +@@ -48,7 +39,7 @@ MPPE=y # Uncomment the next line to include support for PPP packet filtering. # This requires that the libpcap library and headers be installed # and that the kernel driver support PPP packet filtering. @@ -9,7 +34,7 @@ # Uncomment the next line to enable multilink PPP (enabled by default) # Linux distributions: Please leave multilink ENABLED in your builds -@@ -58,9 +58,9 @@ HAVE_MULTILINK=y +@@ -58,9 +49,9 @@ HAVE_MULTILINK=y # Uncomment the next line to enable the TDB database (enabled by default.) # If you enable multilink, then TDB is automatically enabled also. # Linux distributions: Please leave TDB ENABLED in your builds. @@ -21,16 +46,22 @@ #USE_PAM=y #HAVE_INET6=y -@@ -77,7 +77,7 @@ MAXOCTETS=y +@@ -75,11 +66,10 @@ PLUGIN=y - INCLUDE_DIRS= -I../include + MAXOCTETS=y +-INCLUDE_DIRS= -I../include +- -COMPILE_FLAGS= -DHAVE_PATHS_H -DIPX_CHANGE -DHAVE_MMAP -+COMPILE_FLAGS= -DHAVE_PATHS_H -DHAVE_MMAP ++CPPFLAGS += -I../include ++CPPFLAGS += -DHAVE_PATHS_H -DHAVE_MMAP - CFLAGS= $(COPTS) $(COMPILE_FLAGS) $(INCLUDE_DIRS) '-DDESTDIR="@DESTDIR@"' +-CFLAGS= $(COPTS) $(COMPILE_FLAGS) $(INCLUDE_DIRS) '-DDESTDIR="@DESTDIR@"' ++CFLAGS+= $(COPTS) $(COMPILE_FLAGS) $(INCLUDE_DIRS) '-DDESTDIR="@DESTDIR@"' -@@ -99,7 +99,7 @@ ifdef USE_SRP + ifdef CHAPMS + CFLAGS += -DCHAPMS=1 +@@ -99,7 +89,7 @@ ifdef USE_SRP CFLAGS += -DUSE_SRP -DOPENSSL -I/usr/local/ssl/include LIBS += -lsrp -L/usr/local/ssl/lib -lcrypto TARGETS += srp-entry @@ -39,7 +70,7 @@ MANPAGES += srp-entry.8 EXTRACLEAN += srp-entry.o NEEDDES=y -@@ -117,10 +117,8 @@ CFLAGS += -DHAS_SHADOW +@@ -117,10 +107,8 @@ CFLAGS += -DHAS_SHADOW #LIBS += -lshadow $(LIBS) endif @@ -50,7 +81,7 @@ ifdef NEEDDES ifndef USE_CRYPT -@@ -200,7 +198,7 @@ all: $(TARGETS) +@@ -200,16 +188,16 @@ all: $(TARGETS) install: pppd mkdir -p $(BINDIR) $(MANDIR) $(EXTRAINSTALL) @@ -59,3 +90,20 @@ if chgrp pppusers $(BINDIR)/pppd 2>/dev/null; then \ chmod o-rx,u+s $(BINDIR)/pppd; fi $(INSTALL) -c -m 444 pppd.8 $(MANDIR) + + pppd: $(PPPDOBJS) +- $(CC) $(CFLAGS) $(LDFLAGS) -o pppd $(PPPDOBJS) $(LIBS) ++ $(CC) $(LDFLAGS) -o pppd $(PPPDOBJS) $(LIBS) + + srp-entry: srp-entry.c +- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ srp-entry.c $(LIBS) ++ $(CC) $(LDFLAGS) -o $@ srp-entry.c $(LIBS) + + install-devel: + mkdir -p $(INCDIR)/pppd +@@ -219,4 +207,4 @@ clean: + rm -f $(PPPDOBJS) $(EXTRACLEAN) $(TARGETS) *~ #* core + + depend: +- $(CPP) -M $(CFLAGS) $(PPPDSRCS) >.depend ++ $(CPP) -M $(CPPFLAGS) $(CFLAGS) $(PPPDSRCS) >.depend -- cgit v1.2.3