From 9436a026e2e23d207fbdcb9e8bc9b076e3573700 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sat, 22 Jan 2011 22:37:50 +0100 Subject: activate GCC cflags check, cleanup FLAGS stuff in OpenADK. * remove TCFLAGS/TLDFLAGS/TCPPFLAGS and only use TARGET_CFLAGS/TARGET_LDFLAGS/TARGET_CPPFLAGS, ... * activate GCC_HONOUR_COPTS and fix all packages to honour CFLAGS * use CC_FOR_BUILD, CFLAGS_FOR_BUILD, ... for all build compilation, remove HOST* variants * introduce KERNEL_MODULE_FLAGS for external kernel modules * mark rpm package as broken, mark syslinux for native builds only, mark libhugetlb for eglibc/glibc only usage --- .../patch-pppd_plugins_pppoatm_Makefile_linux | 50 ++++++++++++++++------ 1 file changed, 37 insertions(+), 13 deletions(-) (limited to 'package/ppp/patches/patch-pppd_plugins_pppoatm_Makefile_linux') diff --git a/package/ppp/patches/patch-pppd_plugins_pppoatm_Makefile_linux b/package/ppp/patches/patch-pppd_plugins_pppoatm_Makefile_linux index e7fb3f5e7..32a86eaf7 100644 --- a/package/ppp/patches/patch-pppd_plugins_pppoatm_Makefile_linux +++ b/package/ppp/patches/patch-pppd_plugins_pppoatm_Makefile_linux @@ -1,36 +1,60 @@ --- ppp-2.4.5.orig/pppd/plugins/pppoatm/Makefile.linux 2009-11-16 23:26:07.000000000 +0100 -+++ ppp-2.4.5/pppd/plugins/pppoatm/Makefile.linux 2011-01-16 21:12:55.000000000 +0100 -@@ -1,13 +1,10 @@ ++++ ppp-2.4.5/pppd/plugins/pppoatm/Makefile.linux 2011-01-21 21:29:58.177408277 +0100 +@@ -1,15 +1,16 @@ -#CC = gcc -COPTS = -O2 -g -CFLAGS = $(COPTS) -I../.. -I../../../include -fPIC -LDFLAGS = -shared -INSTALL = install -+include ../../../makedefs.linux ++VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h) -#*********************************************************************** -+CPPFLAGS += -I../.. -I../../../include -+CFLAGS += -fPIC -+LDFLAGS += -shared ++include ../../../Makedefs.com -DESTDIR = $(INSTROOT)@DESTDIR@ -LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION) ++CPPFLAGS += -I../.. -I../../../include ++ifeq (,$(filter -fPIC,$(CFLAGS))) ++CFLAGS += -fPIC ++endif ++ifeq (,$(filter -shared,$(LDFLAGS))) ++LDFLAGS += -shared ++endif + +-VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h) +#*********************************************************************** - VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h) + PLUGIN := pppoatm.so + PLUGIN_OBJS := pppoatm.o +@@ -22,25 +23,22 @@ PLUGIN_OBJS := pppoatm.o + #HAVE_LIBATM=yes + + ifdef HAVE_LIBATM +-LIBS := -latm ++LIBS += -latm + else +-CFLAGS += -I. ++CPPFLAGS += -I. + PLUGIN_OBJS += text2qos.o text2atm.o misc.o ans.o +-LIBS := -lresolv ++LIBS += -lresolv + endif -@@ -33,7 +30,7 @@ endif + #********* all: $(PLUGIN) $(PLUGIN): $(PLUGIN_OBJS) - $(CC) $(CFLAGS) -o $@ -shared $^ $(LIBS) + $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) - install: all +-install: all ++install: $(PLUGIN) $(INSTALL) -d -m 755 $(LIBDIR) -@@ -43,4 +40,4 @@ clean: - rm -f *.o *.so +- $(INSTALL) -c -m 4550 $(PLUGIN) $(LIBDIR) ++ $(INSTALL) $(STRIP) -c -m 4550 $(PLUGIN) $(LIBDIR) - %.o: %.c + clean: + rm -f *.o *.so +- +-%.o: %.c - $(CC) $(CFLAGS) -c -o $@ $< -+ $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $< -- cgit v1.2.3