Explorar el Código

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
Waldemar Brodkorb hace 13 años
padre
commit
15c84adca9
Se han modificado 100 ficheros con 978 adiciones y 102 borrados
  1. 1 0
      TODO
  2. 4 0
      mk/package.mk
  3. 1 0
      mk/vars.mk
  4. 11 0
      package/DirectFB/patches/patch-ltmain_sh
  5. 10 1
      package/ImageMagick/patches/patch-config_ltmain_sh
  6. 11 0
      package/alsa-lib/patches/patch-ltmain_sh
  7. 11 0
      package/apr/patches/patch-build_ltmain_sh
  8. 10 1
      package/autossh/patches/patch-Makefile_in
  9. 11 0
      package/avahi/patches/patch-ltmain_sh
  10. 11 0
      package/bind/patches/patch-ltmain_sh
  11. 11 0
      package/binutils/patches/patch-ltmain_sh
  12. 1 3
      package/bitlbee/Makefile
  13. 5 5
      package/bluez/patches/patch-Makefile_in
  14. 11 0
      package/bluez/patches/patch-ltmain_sh
  15. 1 0
      package/bogofilter/Makefile
  16. 11 0
      package/cairo/patches/patch-build_ltmain_sh
  17. 15 0
      package/cairo/patches/patch-src_cairo-features_h
  18. 11 0
      package/ccid/patches/patch-ltmain_sh
  19. 10 1
      package/cgilib/patches/patch-ltmain_sh
  20. 11 0
      package/collectd/patches/patch-ltmain_sh
  21. 2 1
      package/cryptsetup/Makefile
  22. 11 0
      package/cryptsetup/patches/patch-ltmain_sh
  23. 2 2
      package/cups/Makefile
  24. 3 3
      package/curl/patches/patch-configure
  25. 11 0
      package/curl/patches/patch-ltmain_sh
  26. 7 1
      package/dansguardian/Makefile
  27. 2 2
      package/dbus/patches/patch-configure
  28. 10 1
      package/dbus/patches/patch-ltmain_sh
  29. 30 3
      package/digitemp/patches/patch-Makefile
  30. 11 0
      package/dovecot/patches/patch-ltmain_sh
  31. 0 9
      package/drbd/patches/patch-drbd_drbd_buildtag_c
  32. 24 0
      package/drbd/patches/patch-user_Makefile_in
  33. 17 7
      package/ebtables/patches/patch-Makefile
  34. 3 3
      package/esound/patches/patch-esd_c
  35. 11 0
      package/esound/patches/patch-ltmain_sh
  36. 11 0
      package/expat/patches/patch-conftools_ltmain_sh
  37. 11 0
      package/faad2/patches/patch-ltmain_sh
  38. 11 0
      package/file/patches/patch-ltmain_sh
  39. 11 0
      package/flac/patches/patch-ltmain_sh
  40. 14 0
      package/fltk/Makefile
  41. 11 0
      package/fltk/patches/patch-Makefile
  42. 11 0
      package/fontconfig/patches/patch-ltmain_sh
  43. 11 0
      package/freeglut/patches/patch-ltmain_sh
  44. 11 0
      package/freeradius-client/patches/patch-ltmain_sh
  45. 11 0
      package/freeradius-server/patches/patch-ltmain_sh
  46. 11 0
      package/freetype/patches/patch-builds_unix_ltmain_sh
  47. 13 4
      package/gatling/patches/patch-GNUmakefile
  48. 2 1
      package/gcc/Makefile
  49. 5 5
      package/gcc/patches/cross-gcc-fix.patch
  50. 12 0
      package/gcc/patches/ltmain.patch
  51. 11 0
      package/gdb/patches/patch-ltmain_sh
  52. 11 0
      package/gdk-pixbuf/patches/patch-ltmain_sh
  53. 10 1
      package/gettext/patches/patch-build-aux_ltmain_sh
  54. 3 4
      package/gkrellm/Makefile
  55. 0 0
      package/gkrellm/files/gkrellmd.init
  56. 0 0
      package/gkrellm/files/gkrellmd.postinst
  57. 22 0
      package/gkrellm/patches/patch-server_Makefile
  58. 7 13
      package/glib/Makefile
  59. 16 0
      package/glib/patches/patch-glib_gconvert_c
  60. 11 0
      package/glib/patches/patch-ltmain_sh
  61. 11 0
      package/gmp/patches/patch-ltmain_sh
  62. 11 0
      package/gnutls/patches/patch-build-aux_ltmain_sh
  63. 11 0
      package/gnutls/patches/patch-lib_build-aux_ltmain_sh
  64. 11 0
      package/gnutls/patches/patch-libextra_build-aux_ltmain_sh
  65. 8 3
      package/gpsd/Makefile
  66. 10 1
      package/gpsd/patches/patch-Makefile_in
  67. 20 0
      package/gpsd/patches/patch-ltmain_sh
  68. 11 0
      package/gtk+/patches/patch-ltmain_sh
  69. 17 13
      package/hdparm/patches/patch-Makefile
  70. 11 0
      package/heimdal/patches/patch-ltmain_sh
  71. 6 1
      package/id3lib/Makefile
  72. 22 0
      package/id3lib/patches/patch-ltmain_sh
  73. 11 0
      package/imlib2/patches/patch-ltmain_sh
  74. 4 0
      package/iperf/Makefile
  75. 11 0
      package/ipsec-tools/patches/patch-ltmain_sh
  76. 11 0
      package/iptables/patches/patch-ltmain_sh
  77. 1 1
      package/iptraf/Makefile
  78. 11 0
      package/jamvm/patches/patch-ltmain_sh
  79. 11 0
      package/jpeg/patches/patch-ltmain_sh
  80. 11 0
      package/lame/patches/patch-ltmain_sh
  81. 11 0
      package/libICE/patches/patch-ltmain_sh
  82. 11 0
      package/libSM/patches/patch-ltmain_sh
  83. 11 0
      package/libX11/patches/patch-ltmain_sh
  84. 11 0
      package/libXau/patches/patch-ltmain_sh
  85. 11 0
      package/libXaw/patches/patch-ltmain_sh
  86. 11 0
      package/libXcursor/patches/patch-ltmain_sh
  87. 11 0
      package/libXdmcp/patches/patch-ltmain_sh
  88. 11 0
      package/libXext/patches/patch-ltmain_sh
  89. 11 0
      package/libXfont/patches/patch-ltmain_sh
  90. 11 0
      package/libXft/patches/patch-ltmain_sh
  91. 11 0
      package/libXi/patches/patch-ltmain_sh
  92. 11 0
      package/libXmu/patches/patch-ltmain_sh
  93. 11 0
      package/libXpm/patches/patch-ltmain_sh
  94. 11 0
      package/libXt/patches/patch-ltmain_sh
  95. 11 0
      package/libXv/patches/patch-ltmain_sh
  96. 11 0
      package/libao/patches/patch-ltmain_sh
  97. 3 3
      package/libart/patches/100-cross_compile_fix.patch
  98. 11 0
      package/libart/patches/patch-ltmain_sh
  99. 6 6
      package/libaudiofile/Makefile
  100. 3 3
      package/libaudiofile/patches/001-audiofile-config-libdirs.patch

+ 1 - 0
TODO

@@ -1,4 +1,5 @@
 - man pages in ipkg/tgz packages (automatic)
+- automate /etc handling via conffiles
 - ccache support for speedup
 - distcc evaluation
 - GCC SSP evaluation

+ 4 - 0
mk/package.mk

@@ -3,6 +3,10 @@
 
 all: build-all-pkgs
 
+ifeq ($(ADK_HOST_CYGWIN),y)
+EXEEXT:=		.exe
+endif
+
 TCFLAGS:=		${TARGET_CFLAGS}
 TCXXFLAGS:=		${TARGET_CFLAGS}
 TCPPFLAGS:=		${TARGET_CPPFLAGS}

+ 1 - 0
mk/vars.mk

@@ -21,6 +21,7 @@ endif
 TARGET_CFLAGS:=		$(TARGET_CFLAGS_ARCH) $(TARGET_DEBUGGING) -fwrapv
 ifneq ($(ADK_TOOLCHAIN_GCC_USE_SSP),)
 TARGET_CFLAGS+=		-fstack-protector
+TARGET_CXXFLAGS+=	-fstack-protector
 TARGET_LDFLAGS+=	-fstack-protector
 endif
 ifneq ($(ADK_TOOLCHAIN_GCC_USE_LTO),)

+ 11 - 0
package/DirectFB/patches/patch-ltmain_sh

@@ -0,0 +1,11 @@
+--- DirectFB-1.4.11.orig/ltmain.sh	2010-11-03 11:14:45.000000000 +0100
++++ DirectFB-1.4.11/ltmain.sh	2011-01-14 00:24:52.000000000 +0100
+@@ -4765,7 +4765,7 @@ func_mode_link ()
+       # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
+       # @file GCC response files
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
++      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto)
+         func_quote_for_eval "$arg"
+ 	arg="$func_quote_for_eval_result"
+         func_append compile_command " $arg"

+ 10 - 1
package/ImageMagick/patches/patch-config_ltmain_sh

@@ -1,5 +1,14 @@
 --- ImageMagick-6.6.5-10.orig/config/ltmain.sh	2010-11-21 22:35:22.000000000 +0100
-+++ ImageMagick-6.6.5-10/config/ltmain.sh	2011-01-08 23:20:33.000000000 +0100
++++ ImageMagick-6.6.5-10/config/ltmain.sh	2011-01-14 00:59:45.000000000 +0100
+@@ -5091,7 +5091,7 @@ func_mode_link ()
+       # @file                GCC response files
+       # -tp=*                Portland pgcc target processor selection
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*)
++      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|-fstack-protector*|-flto)
+         func_quote_for_eval "$arg"
+ 	arg="$func_quote_for_eval_result"
+         func_append compile_command " $arg"
 @@ -5843,27 +5843,6 @@ func_mode_link ()
  	      esac
  	    fi

+ 11 - 0
package/alsa-lib/patches/patch-ltmain_sh

@@ -0,0 +1,11 @@
+--- alsa-lib-1.0.22.orig/ltmain.sh	2006-11-25 12:04:27.000000000 +0100
++++ alsa-lib-1.0.22/ltmain.sh	2011-01-14 11:34:46.000000000 +0100
+@@ -1623,7 +1623,7 @@ EOF
+       # -pg pass through profiling flag for GCC
+       # @file GCC response files
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \
+-      -t[45]*|-txscale*|@*)
++      -t[45]*|-txscale*|@*|-fstack-protector*|-flto)
+ 
+ 	# Unknown arguments in both finalize_command and compile_command need
+ 	# to be aesthetically quoted because they are evaled later.

+ 11 - 0
package/apr/patches/patch-build_ltmain_sh

@@ -0,0 +1,11 @@
+--- apr-1.4.2.orig/build/ltmain.sh	2010-01-21 08:59:41.000000000 +0100
++++ apr-1.4.2/build/ltmain.sh	2011-01-14 11:41:48.000000000 +0100
+@@ -4765,7 +4765,7 @@ func_mode_link ()
+       # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
+       # @file GCC response files
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
++      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto)
+         func_quote_for_eval "$arg"
+ 	arg="$func_quote_for_eval_result"
+         func_append compile_command " $arg"

+ 10 - 1
package/autossh/patches/patch-Makefile_in

@@ -1,5 +1,14 @@
 --- autossh-1.4b.orig/Makefile.in	2008-04-11 22:47:46.000000000 +0200
-+++ autossh-1.4b/Makefile.in	2010-02-05 17:49:30.511836749 +0100
++++ autossh-1.4b/Makefile.in	2011-01-14 18:20:25.000000000 +0100
+@@ -31,7 +31,7 @@ all:		$(TARGET)
+ 
+ 
+ $(TARGET):	$(OFILES)
+-		$(CC) $(CPPFLAGS) -o $(TARGET) $(OFILES) $(LIBS)
++		$(CC) $(LDFLAGS) -o $(TARGET) $(OFILES) $(LIBS)
+ 
+ clean:
+ 		- /bin/rm -f *.o *.a *.core *~
 @@ -45,18 +45,18 @@ distclean:	allclean
  		- /bin/rm -f Makefile
  

+ 11 - 0
package/avahi/patches/patch-ltmain_sh

@@ -0,0 +1,11 @@
+--- avahi-0.6.25.orig/ltmain.sh	2009-04-14 03:48:18.000000000 +0200
++++ avahi-0.6.25/ltmain.sh	2011-01-14 18:46:07.000000000 +0100
+@@ -4765,7 +4765,7 @@ func_mode_link ()
+       # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
+       # @file GCC response files
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
++      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto)
+         func_quote_for_eval "$arg"
+ 	arg="$func_quote_for_eval_result"
+         func_append compile_command " $arg"

+ 11 - 0
package/bind/patches/patch-ltmain_sh

@@ -0,0 +1,11 @@
+--- bind-9.7.0.orig/ltmain.sh	2009-01-19 02:38:41.000000000 +0100
++++ bind-9.7.0/ltmain.sh	2011-01-14 18:53:09.000000000 +0100
+@@ -1706,7 +1706,7 @@ EOF
+       # -F/path gives path to uninstalled frameworks, gcc on darwin
+       # @file GCC response files
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
++      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto)
+ 
+ 	# Unknown arguments in both finalize_command and compile_command need
+ 	# to be aesthetically quoted because they are evaled later.

+ 11 - 0
package/binutils/patches/patch-ltmain_sh

@@ -0,0 +1,11 @@
+--- binutils-2.21.orig/ltmain.sh	2010-01-09 22:11:32.000000000 +0100
++++ binutils-2.21/ltmain.sh	2011-01-14 19:07:08.000000000 +0100
+@@ -4980,7 +4980,7 @@ func_mode_link ()
+       # @file GCC response files
+       # -tp=* Portland pgcc target processor selection
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*)
++      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|-fstack-protector*|-flto)
+         func_quote_for_eval "$arg"
+ 	arg="$func_quote_for_eval_result"
+         func_append compile_command " $arg"

+ 1 - 3
package/bitlbee/Makefile

@@ -19,7 +19,6 @@ include ${TOPDIR}/mk/package.mk
 $(eval $(call PKG_template,BITLBEE,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
 
 CONFIG_STYLE:=		minimal
-
 TCFLAGS+=		-fPIC
 CONFIGURE_ARGS:=	--target=${REAL_GNU_TARGET_NAME} \
 			--prefix=/usr/ \
@@ -33,13 +32,12 @@ CONFIGURE_ARGS:=	--target=${REAL_GNU_TARGET_NAME} \
 			--strip=0 \
 			--ipv6=1 \
 			--ssl=openssl
-
 INSTALL_TARGET=		install-etc install-bin
 
 post-configure:
 	@echo 'CFLAGS+="-I${STAGING_TARGET_DIR}/usr/include/iconv"' >> \
 		${WRKBUILD}/Makefile.settings
-	@echo 'LFLAGS+="-L${STAGING_TARGET_DIR}/usr/lib"' >> \
+	@echo 'LFLAGS+=${TARGET_LDFLAGS}' >> \
 		${WRKBUILD}/Makefile.settings
 
 post-install:

+ 5 - 5
package/bluez/patches/patch-Makefile_in

@@ -1,6 +1,6 @@
---- bluez-4.59.orig/Makefile.in	Thu Dec 24 17:42:48 2009
-+++ bluez-4.59/Makefile.in	Tue Dec 29 01:31:12 2009
-@@ -48,7 +48,6 @@ noinst_PROGRAMS = $(am__EXEEXT_7) $(am__EXEEXT_8) $(am
+--- bluez-4.59.orig/Makefile.in	2009-12-24 17:42:48.000000000 +0100
++++ bluez-4.59/Makefile.in	2011-01-14 19:24:13.000000000 +0100
+@@ -48,7 +48,6 @@ noinst_PROGRAMS = $(am__EXEEXT_7) $(am__
  	$(am__EXEEXT_10) $(am__EXEEXT_11)
  @SBC_TRUE@am__append_1 = sbc/libsbc.la
  @SBC_TRUE@am__append_2 = sbc/sbcinfo sbc/sbcdec sbc/sbcenc
@@ -8,7 +8,7 @@
  @NETLINK_TRUE@am__append_4 = plugins/netlink.la
  @ECHOPLUGIN_TRUE@am__append_5 = echo
  @ECHOPLUGIN_TRUE@am__append_6 = plugins/echo.c
-@@ -318,7 +317,6 @@ sbc_libsbc_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(
+@@ -318,7 +317,6 @@ sbc_libsbc_la_LINK = $(LIBTOOL) $(AM_V_l
  @DUND_TRUE@am__EXEEXT_6 = compat/dund$(EXEEXT)
  @SBC_TRUE@am__EXEEXT_7 = sbc/sbcinfo$(EXEEXT) sbc/sbcdec$(EXEEXT) \
  @SBC_TRUE@	sbc/sbcenc$(EXEEXT)
@@ -16,7 +16,7 @@
  @TOOLS_TRUE@am__EXEEXT_9 = tools/avinfo$(EXEEXT) tools/ppporc$(EXEEXT) \
  @TOOLS_TRUE@	tools/hcieventmask$(EXEEXT) \
  @TOOLS_TRUE@	tools/hcisecfilter$(EXEEXT)
-@@ -918,8 +916,6 @@ lib_libbluetooth_la_DEPENDENCIES = $(local_headers)
+@@ -918,8 +916,6 @@ lib_libbluetooth_la_DEPENDENCIES = $(loc
  @SBC_TRUE@sbc_sbcdec_LDADD = sbc/libsbc.la
  @SBC_TRUE@sbc_sbcenc_SOURCES = sbc/sbcenc.c sbc/formats.h
  @SBC_TRUE@sbc_sbcenc_LDADD = sbc/libsbc.la

+ 11 - 0
package/bluez/patches/patch-ltmain_sh

@@ -0,0 +1,11 @@
+--- bluez-4.59.orig/ltmain.sh	2009-12-24 17:42:43.000000000 +0100
++++ bluez-4.59/ltmain.sh	2011-01-14 19:25:00.000000000 +0100
+@@ -4765,7 +4765,7 @@ func_mode_link ()
+       # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
+       # @file GCC response files
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
++      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto)
+         func_quote_for_eval "$arg"
+ 	arg="$func_quote_for_eval_result"
+         func_append compile_command " $arg"

+ 1 - 0
package/bogofilter/Makefile

@@ -23,6 +23,7 @@ CONFIGURE_ENV+=		LIBS="-liconv" \
 CONFIGURE_ARGS+=	--without-libsqlite3-prefix \
 			--without-libqdbm-prefix \
 			--with-included-gsl \
+			--disable-static \
 			--with-libdb-prefix=${STAGING_TARGET_DIR}/usr \
 			--disable-transactions
 

+ 11 - 0
package/cairo/patches/patch-build_ltmain_sh

@@ -0,0 +1,11 @@
+--- cairo-1.8.10.orig/build/ltmain.sh	2010-02-20 00:39:43.000000000 +0100
++++ cairo-1.8.10/build/ltmain.sh	2011-01-14 20:17:40.000000000 +0100
+@@ -4765,7 +4765,7 @@ func_mode_link ()
+       # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
+       # @file GCC response files
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
++      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto)
+         func_quote_for_eval "$arg"
+ 	arg="$func_quote_for_eval_result"
+         func_append compile_command " $arg"

+ 15 - 0
package/cairo/patches/patch-src_cairo-features_h

@@ -0,0 +1,15 @@
+--- cairo-1.8.10.orig/src/cairo-features.h	2010-02-19 22:34:38.000000000 +0100
++++ cairo-1.8.10/src/cairo-features.h	2011-01-14 20:12:28.000000000 +0100
+@@ -10,11 +10,11 @@
+ #define CAIRO_HAS_SVG_SURFACE 1
+ #define CAIRO_HAS_USER_FONT 1
+ #define CAIRO_HAS_XLIB_SURFACE 1
+-#define CAIRO_HAS_XLIB_XRENDER_SURFACE 1
+ 
+ /*#undef CAIRO_HAS_QUARTZ_FONT */
+ /*#undef CAIRO_HAS_QUARTZ_SURFACE */
+ /*#undef CAIRO_HAS_WIN32_FONT */
+ /*#undef CAIRO_HAS_WIN32_SURFACE */
++/*#undef CAIRO_HAS_XLIB_XRENDER_SURFACE */
+ 
+ #endif

+ 11 - 0
package/ccid/patches/patch-ltmain_sh

@@ -0,0 +1,11 @@
+--- ccid-1.4.1.orig/ltmain.sh	2010-08-04 15:28:29.000000000 +0200
++++ ccid-1.4.1/ltmain.sh	2011-01-14 20:22:38.000000000 +0100
+@@ -4765,7 +4765,7 @@ func_mode_link ()
+       # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
+       # @file GCC response files
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
++      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto)
+         func_quote_for_eval "$arg"
+ 	arg="$func_quote_for_eval_result"
+         func_append compile_command " $arg"

+ 10 - 1
package/cgilib/patches/patch-ltmain_sh

@@ -1,6 +1,6 @@
 $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
 --- cgilib-0.7.orig/ltmain.sh	2008-04-29 23:33:55.000000000 +0200
-+++ cgilib-0.7/ltmain.sh	2009-05-09 03:58:09.000000000 +0200
++++ cgilib-0.7/ltmain.sh	2011-01-14 20:26:24.000000000 +0100
 @@ -43,8 +43,8 @@ EXIT_FAILURE=1
  
  PROGRAM=ltmain.sh
@@ -65,6 +65,15 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
  	continue
  	;;
  
+@@ -1676,7 +1706,7 @@ EOF
+       # -F/path gives path to uninstalled frameworks, gcc on darwin
+       # @file GCC response files
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
++      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto)
+ 
+ 	# Unknown arguments in both finalize_command and compile_command need
+ 	# to be aesthetically quoted because they are evaled later.
 @@ -2135,10 +2165,7 @@ EOF
  	case $pass in
  	dlopen) libs="$dlfiles" ;;

+ 11 - 0
package/collectd/patches/patch-ltmain_sh

@@ -0,0 +1,11 @@
+--- collectd-4.10.0.orig/ltmain.sh	2010-05-01 11:15:57.000000000 +0200
++++ collectd-4.10.0/ltmain.sh	2011-01-14 20:29:06.000000000 +0100
+@@ -4765,7 +4765,7 @@ func_mode_link ()
+       # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
+       # @file GCC response files
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
++      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto)
+         func_quote_for_eval "$arg"
+ 	arg="$func_quote_for_eval_result"
+         func_append compile_command " $arg"

+ 2 - 1
package/cryptsetup/Makefile

@@ -24,7 +24,8 @@ include ${TOPDIR}/mk/package.mk
 
 $(eval $(call PKG_template,CRYPTSETUP,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
 
-CONFIGURE_ARGS+=	--disable-selinux
+CONFIGURE_ARGS+=	--disable-selinux \
+			--disable-static
 
 post-install:
 	${INSTALL_DIR} ${IDIR_CRYPTSETUP}/usr/sbin ${IDIR_CRYPTSETUP}/usr/lib

+ 11 - 0
package/cryptsetup/patches/patch-ltmain_sh

@@ -0,0 +1,11 @@
+--- cryptsetup-1.1.3.orig/ltmain.sh	2010-01-17 11:29:15.000000000 +0100
++++ cryptsetup-1.1.3/ltmain.sh	2011-01-14 20:48:34.000000000 +0100
+@@ -4765,7 +4765,7 @@ func_mode_link ()
+       # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
+       # @file GCC response files
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
++      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto)
+         func_quote_for_eval "$arg"
+ 	arg="$func_quote_for_eval_result"
+         func_append compile_command " $arg"

+ 2 - 2
package/cups/Makefile

@@ -21,7 +21,7 @@ include ${TOPDIR}/mk/package.mk
 $(eval $(call PKG_template,CUPS,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
 
 CONFIGURE_ENV+=		ac_cv_func_sigset=no \
-			OPTIM='-fPIC'
+			OPTIM='-fPIC $(TARGET_CFLAGS)'
 
 CONFIGURE_ARGS+=	--with-cups-user=cups \
 			--with-cups-group=cups \
@@ -42,7 +42,7 @@ CONFIGURE_ARGS+=	--with-cups-user=cups \
 			--disable-ssl
 
 FAKE_FLAGS+=		DSTROOT="${WRKINST}" STRIP="/bin/true"
-XAKE_FLAGS+=		OPTIM='-fPIC'
+XAKE_FLAGS+=		OPTIM='-fPIC $(TARGET_CFLAGS)'
 
 post-install:
 	${INSTALL_DIR} ${IDIR_CUPS}/usr/bin

+ 3 - 3
package/curl/patches/patch-configure

@@ -1,6 +1,6 @@
---- curl-7.19.7.orig/configure	2009-11-04 13:26:02.000000000 +0100
-+++ curl-7.19.7/configure	2009-12-03 21:07:01.000000000 +0100
-@@ -19233,15 +19233,6 @@ fi
+--- curl-7.21.0.orig/configure	2010-06-05 00:32:04.000000000 +0200
++++ curl-7.21.0/configure	2011-01-14 12:05:38.000000000 +0100
+@@ -19714,15 +19714,6 @@ fi
  rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    fi
  

+ 11 - 0
package/curl/patches/patch-ltmain_sh

@@ -0,0 +1,11 @@
+--- curl-7.21.0.orig/ltmain.sh	2010-05-27 21:20:16.000000000 +0200
++++ curl-7.21.0/ltmain.sh	2011-01-14 12:07:25.000000000 +0100
+@@ -4765,7 +4765,7 @@ func_mode_link ()
+       # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
+       # @file GCC response files
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
++      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto)
+         func_quote_for_eval "$arg"
+ 	arg="$func_quote_for_eval_result"
+         func_append compile_command " $arg"

+ 7 - 1
package/dansguardian/Makefile

@@ -20,12 +20,18 @@ include ${TOPDIR}/mk/package.mk
 
 $(eval $(call PKG_template,DANSGUARDIAN,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
 
+LIBRARIES:=-nodefaultlibs -luClibc++ -lgcc -lm
+ifeq ($(ADK_TOOLCHAIN_GCC_USE_SSP),y)
+LIBRARIES+=-lssp
+endif
+
 ifeq ($(ADK_COMPILE_DANSGUARDIAN_WITH_UCLIBCXX),y)
 CONFIGURE_ENV+=		CXXFLAGS="-fno-threadsafe-statics -fno-builtin -nostdinc++ \
 			-I${STAGING_TARGET_DIR}/usr/include/uClibc++" \
-			LIBS="-nodefaultlibs -luClibc++ -lgcc -lm"
+			LIBS="$(LIBRARIES)"
 endif
 
+
 CONFIGURE_ARGS+=	--enable-orig-ip \
 			--with-proxyuser=proxy \
 			--with-proxygroup=proxy

+ 2 - 2
package/dbus/patches/patch-configure

@@ -1,6 +1,6 @@
 --- dbus-1.2.24.orig/configure	2010-03-23 20:11:22.000000000 +0100
-+++ dbus-1.2.24/configure	2011-01-08 22:50:31.000000000 +0100
-@@ -25294,19 +25296,6 @@ if test "x$GCC" = "xyes"; then
++++ dbus-1.2.24/configure	2011-01-14 19:21:37.000000000 +0100
+@@ -25294,19 +25294,6 @@ if test "x$GCC" = "xyes"; then
       ;;
    esac
  

+ 10 - 1
package/dbus/patches/patch-ltmain_sh

@@ -1,5 +1,14 @@
 --- dbus-1.2.24.orig/ltmain.sh	2010-03-12 23:22:29.000000000 +0100
-+++ dbus-1.2.24/ltmain.sh	2011-01-08 22:57:14.000000000 +0100
++++ dbus-1.2.24/ltmain.sh	2011-01-14 19:22:39.000000000 +0100
+@@ -4765,7 +4765,7 @@ func_mode_link ()
+       # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
+       # @file GCC response files
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
++      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto)
+         func_quote_for_eval "$arg"
+ 	arg="$func_quote_for_eval_result"
+         func_append compile_command " $arg"
 @@ -5516,27 +5516,6 @@ func_mode_link ()
  	      esac
  	    fi

+ 30 - 3
package/digitemp/patches/patch-Makefile

@@ -1,7 +1,7 @@
 do not use static linking on Cygwin
 --- digitemp-3.6.0.orig/Makefile	2008-08-28 23:37:00.000000000 +0200
-+++ digitemp-3.6.0/Makefile	2010-01-06 19:12:56.868375000 +0100
-@@ -11,8 +11,8 @@
++++ digitemp-3.6.0/Makefile	2011-01-14 21:37:33.000000000 +0100
+@@ -11,8 +11,9 @@
  
  VERSION = 3.6.0
  
@@ -9,10 +9,20 @@ do not use static linking on Cygwin
 -CFLAGS	= -I./src -I./userial -O2 -Wall # -g
 +CC	?= gcc
 +CFLAGS	?= -I./src -I./userial 
++LDFLAGS ?=
  
  OBJS		=	src/digitemp.o src/device_name.o src/ds2438.o
  HDRS		= 	src/digitemp.h src/device_name.h
-@@ -57,7 +57,6 @@ endif
+@@ -45,7 +46,7 @@ DS2490OBJS	=	userial/ds2490/ownet.o user
+ # If you add a new OSTYPE here please email it to me so that I can add
+ # it to the distribution in the next release
+ # -----------------------------------------------------------------------
+-SYSTYPE := $(shell uname -s)
++SYSTYPE := Linux
+ 
+ ifeq ($(SYSTYPE), Linux)
+   CFLAGS += -DLINUX
+@@ -57,7 +58,6 @@ endif
  
  ifneq (, $(findstring CYGWIN,$(SYSTYPE)))
    CFLAGS += -DCYGWIN
@@ -20,3 +30,20 @@ do not use static linking on Cygwin
  endif
  
  ifeq ($(SYSTYPE), SunOS)
+@@ -116,13 +116,13 @@ all:		help
+ 
+ # Build the Linux executable
+ ds9097:		$(OBJS) $(HDRS) $(ONEWIREOBJS) $(ONEWIREHDRS) $(DS9097OBJS)
+-		$(CC) $(OBJS) $(ONEWIREOBJS) $(DS9097OBJS) -o digitemp_DS9097 $(LIBS)
++		$(CC) $(LDFLAGS) $(OBJS) $(ONEWIREOBJS) $(DS9097OBJS) -o digitemp_DS9097 $(LIBS)
+ 
+ ds9097u:	$(OBJS) $(HDRS) $(ONEWIREOBJS) $(ONEWIREHDRS) $(DS9097UOBJS)
+-		$(CC) $(OBJS) $(ONEWIREOBJS) $(DS9097UOBJS) -o digitemp_DS9097U $(LIBS)
++		$(CC) $(LDFLAGS) $(OBJS) $(ONEWIREOBJS) $(DS9097UOBJS) -o digitemp_DS9097U $(LIBS)
+ 
+ ds2490:		$(OBJS) $(HDRS) $(ONEWIREOBJS) $(ONEWIREHDRS) $(DS2490OBJS)
+-		$(CC) $(OBJS) $(ONEWIREOBJS) $(DS2490OBJS) -o digitemp_DS2490 $(LIBS)
++		$(CC) $(LDFLAGS) $(OBJS) $(ONEWIREOBJS) $(DS2490OBJS) -o digitemp_DS2490 $(LIBS)
+ 
+ 
+ # Clean up the object files and the sub-directory for distributions

+ 11 - 0
package/dovecot/patches/patch-ltmain_sh

@@ -0,0 +1,11 @@
+--- dovecot-2.0.5.orig/ltmain.sh	2010-05-24 16:48:06.000000000 +0200
++++ dovecot-2.0.5/ltmain.sh	2011-01-14 22:05:48.000000000 +0100
+@@ -4765,7 +4765,7 @@ func_mode_link ()
+       # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
+       # @file GCC response files
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
++      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto)
+         func_quote_for_eval "$arg"
+ 	arg="$func_quote_for_eval_result"
+         func_append compile_command " $arg"

+ 0 - 9
package/drbd/patches/patch-drbd_drbd_buildtag_c

@@ -1,9 +0,0 @@
---- drbd-8.3.8.1.orig/drbd/drbd_buildtag.c	2010-07-09 10:19:05.000000000 +0200
-+++ drbd-8.3.8.1/drbd/drbd_buildtag.c	2010-11-26 18:59:58.000000000 +0100
-@@ -3,5 +3,5 @@
- const char *drbd_buildtag(void)
- {
- 	return "GIT-hash: 0d8589fcc32c874df57c930ca1691399b55ec893"
--		" build by lars@soda, 2010-07-09 10:19:24";
-+		" build by wbx@neon.lan, 2010-11-26 18:59:58";
- }

+ 24 - 0
package/drbd/patches/patch-user_Makefile_in

@@ -0,0 +1,24 @@
+--- drbd-8.3.8.1.orig/user/Makefile.in	2010-05-10 16:09:13.000000000 +0200
++++ drbd-8.3.8.1/user/Makefile.in	2011-01-14 22:16:28.000000000 +0100
+@@ -74,7 +74,7 @@ drbd_strings.c: ../drbd/drbd_strings.c
+ 	cp $^ $@
+ 
+ drbdadm: $(drbdadm-obj)
+-	$(CC) -o $@ $^
++	$(CC) $(LDFLAGS) -o $@ $^
+ 
+ drbdadm_scanner.c: drbdadm_scanner.fl drbdadm_parser.h
+ 	flex -s -odrbdadm_scanner.c drbdadm_scanner.fl
+@@ -83,10 +83,10 @@ drbdmeta_scanner.c: drbdmeta_scanner.fl 
+ 	flex -s -odrbdmeta_scanner.c drbdmeta_scanner.fl
+ 
+ drbdsetup: $(drbdsetup-obj)
+-	$(CC) -o $@ $^
++	$(CC) $(LDFLAGS) -o $@ $^
+ 
+ drbdmeta: $(drbdmeta-obj)
+-	$(CC) -o $@ $^
++	$(CC) $(LDFLAGS) -o $@ $^
+ 
+ clean:
+ 	rm -f drbdadm_scanner.c drbdmeta_scanner.c

+ 17 - 7
package/ebtables/patches/patch-Makefile

@@ -1,6 +1,6 @@
 --- ebtables-v2.0.9-1.orig/Makefile	2009-06-21 15:13:25.000000000 +0200
-+++ ebtables-v2.0.9-1/Makefile	2009-11-29 15:39:30.000000000 +0100
-@@ -8,17 +8,16 @@ PROGDATE:=June\ 2009
++++ ebtables-v2.0.9-1/Makefile	2011-01-14 22:24:16.000000000 +0100
+@@ -8,17 +8,17 @@ PROGDATE:=June\ 2009
  
  # default paths
  LIBDIR:=/usr/lib
@@ -16,6 +16,7 @@
  
 -CFLAGS:=-Wall -Wunused
 +CFLAGS?=-Wall -Wunused
++LDFLAGS?=
  CFLAGS_SH_LIB:=-fPIC
 -CC:=gcc
 -LD:=ld
@@ -23,16 +24,25 @@
  
  ifeq ($(shell uname -m),sparc64)
  CFLAGS+=-DEBT_MIN_ALIGN=8 -DKERNEL_64_USERSPACE_32
-@@ -85,7 +84,7 @@ ebtables-standalone.o: ebtables-standalo
+@@ -85,14 +85,14 @@ ebtables-standalone.o: ebtables-standalo
  
  .PHONY: libebtc
  libebtc: $(OBJECTS2)
 -	$(LD) -shared -soname libebtc.so -o libebtc.so -lc $(OBJECTS2)
-+	$(CC) -shared -o libebtc.so -lc $(OBJECTS2)
++	$(CC) -shared $(LDFLAGS) -o libebtc.so -lc $(OBJECTS2)
  
  ebtables: $(OBJECTS) ebtables-standalone.o libebtc
- 	$(CC) $(CFLAGS) $(CFLAGS_SH_LIB) -o $@ ebtables-standalone.o -I$(KERNEL_INCLUDES) -L. -Lextensions -lebtc $(EXT_LIBSI) \
-@@ -154,28 +153,29 @@ tmp3:=$(shell printf $(PIPE) | sed 's/\/
+-	$(CC) $(CFLAGS) $(CFLAGS_SH_LIB) -o $@ ebtables-standalone.o -I$(KERNEL_INCLUDES) -L. -Lextensions -lebtc $(EXT_LIBSI) \
++	$(CC) $(LDFLAGS) $(CFLAGS) $(CFLAGS_SH_LIB) -o $@ ebtables-standalone.o -I$(KERNEL_INCLUDES) -L. -Lextensions -lebtc $(EXT_LIBSI) \
+ 	-Wl,-rpath,$(LIBDIR)
+ 
+ ebtablesu: ebtablesu.c
+-	$(CC) $(CFLAGS) $(PROGSPECSD) $< -o $@
++	$(CC) $(LDFLAGS) $(CFLAGS) $(PROGSPECSD) $< -o $@
+ 
+ ebtablesd.o: ebtablesd.c include/ebtables_u.h
+ 	$(CC) $(CFLAGS) $(PROGSPECSD) -c $< -o $@  -I$(KERNEL_INCLUDES)
+@@ -154,28 +154,29 @@ tmp3:=$(shell printf $(PIPE) | sed 's/\/
  .PHONY: scripts
  scripts: ebtables-save ebtables.sysv ebtables-config
  	cat ebtables-save | sed 's/__EXEC_PATH__/$(tmp1)/g' > ebtables-save_
@@ -69,7 +79,7 @@
  
  .PHONY: install
  install: $(MANDIR)/man8/ebtables.8 $(ETHERTYPESFILE) exec scripts
-@@ -199,18 +199,18 @@ release:
+@@ -199,18 +200,18 @@ release:
  	rm -f extensions/ebt_inat.c
  	rm -rf $(CVSDIRS)
  	mkdir -p include/linux/netfilter_bridge

+ 3 - 3
package/esound/patches/patch-esd_c

@@ -2,9 +2,9 @@ $Id$
 
  cast to double, to avoid sinf, patch from Sven Gugges
 
---- esound-0.2.38.orig/esd.c	2007-05-03 22:28:35.000000000 +0200
-+++ esound-0.2.38/esd.c	2007-05-19 17:21:23.000000000 +0200
-@@ -131,14 +131,14 @@ void set_audio_buffer( void *buf, esd_fo
+--- esound-0.2.41.orig/esd.c	2008-11-18 21:35:19.000000000 +0100
++++ esound-0.2.41/esd.c	2011-01-14 23:15:33.000000000 +0100
+@@ -134,14 +134,14 @@ void set_audio_buffer( void *buf, esd_fo
      {
      case ESD_BITS8:
  	for ( i = 0 ; i < length ; i+=2 ) {

+ 11 - 0
package/esound/patches/patch-ltmain_sh

@@ -0,0 +1,11 @@
+--- esound-0.2.41.orig/ltmain.sh	2008-06-06 20:28:34.000000000 +0200
++++ esound-0.2.41/ltmain.sh	2011-01-14 23:16:51.000000000 +0100
+@@ -1676,7 +1676,7 @@ EOF
+       # -F/path gives path to uninstalled frameworks, gcc on darwin
+       # @file GCC response files
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
++      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto)
+ 
+ 	# Unknown arguments in both finalize_command and compile_command need
+ 	# to be aesthetically quoted because they are evaled later.

+ 11 - 0
package/expat/patches/patch-conftools_ltmain_sh

@@ -0,0 +1,11 @@
+--- expat-2.0.1.orig/conftools/ltmain.sh	2006-12-19 20:28:40.000000000 +0100
++++ expat-2.0.1/conftools/ltmain.sh	2011-01-14 01:24:32.000000000 +0100
+@@ -1623,7 +1623,7 @@ EOF
+       # -pg pass through profiling flag for GCC
+       # @file GCC response files
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \
+-      -t[45]*|-txscale*|@*)
++      -t[45]*|-txscale*|@*|-fstack-protector*|-flto)
+ 
+ 	# Unknown arguments in both finalize_command and compile_command need
+ 	# to be aesthetically quoted because they are evaled later.

+ 11 - 0
package/faad2/patches/patch-ltmain_sh

@@ -0,0 +1,11 @@
+--- faad2-2.7.orig/ltmain.sh	2006-03-22 01:06:55.000000000 +0100
++++ faad2-2.7/ltmain.sh	2011-01-14 23:20:01.000000000 +0100
+@@ -1623,7 +1623,7 @@ EOF
+       # -pg pass through profiling flag for GCC
+       # @file GCC response files
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \
+-      -t[45]*|-txscale*|@*)
++      -t[45]*|-txscale*|@*|-fstack-protector*|-flto)
+ 
+ 	# Unknown arguments in both finalize_command and compile_command need
+ 	# to be aesthetically quoted because they are evaled later.

+ 11 - 0
package/file/patches/patch-ltmain_sh

@@ -0,0 +1,11 @@
+--- file-5.04.orig/ltmain.sh	2009-02-09 17:40:06.000000000 +0100
++++ file-5.04/ltmain.sh	2011-01-14 23:37:41.000000000 +0100
+@@ -1735,7 +1735,7 @@ EOF
+       # -F/path gives path to uninstalled frameworks, gcc on darwin
+       # @file GCC response files
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
++      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto)
+ 
+ 	# Unknown arguments in both finalize_command and compile_command need
+ 	# to be aesthetically quoted because they are evaled later.

+ 11 - 0
package/flac/patches/patch-ltmain_sh

@@ -0,0 +1,11 @@
+--- flac-1.2.1.orig/ltmain.sh	2005-04-26 20:23:39.000000000 +0200
++++ flac-1.2.1/ltmain.sh	2011-01-15 11:22:29.000000000 +0100
+@@ -1533,7 +1533,7 @@ EOF
+       # +DA*, +DD* enable 64-bit mode on the HP compiler
+       # -q* pass through compiler args for the IBM compiler
+       # -m* pass through architecture-specific compiler args for GCC
+-      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*)
++      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-fstack-protector*|-flto)
+ 
+ 	# Unknown arguments in both finalize_command and compile_command need
+ 	# to be aesthetically quoted because they are evaled later.

+ 14 - 0
package/fltk/Makefile

@@ -13,6 +13,9 @@ PKG_BUILDDEP:=		libX11 libXi MesaLib freeglut
 PKG_URL:=		http://www.fltk.org/
 PKG_SITES:=		http://ftp.funet.fi/pub/mirrors/ftp.easysw.com/pub/fltk/snapshots/
 
+PKG_NEED_CXX:=		1
+PKG_CXX:=		LIBFLTK
+
 PKG_SUBPKGS:=		LIBFLTK
 PKG_ARCH_DEPENDS:=	x86 x86_64 mips mipsel mips64 mips64el
 
@@ -23,6 +26,17 @@ include $(TOPDIR)/mk/package.mk
 
 $(eval $(call PKG_template,LIBFLTK,libfltk,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
 
+LIBRARIES:=-nodefaultlibs -luClibc++ -lgcc -lm
+ifeq ($(ADK_TOOLCHAIN_GCC_USE_SSP),y)
+LIBRARIES+=-lssp
+endif
+
+ifeq ($(ADK_COMPILE_LIBFLTK_WITH_UCLIBCXX),y)
+CONFIGURE_ENV+=		CXXFLAGS="-fno-threadsafe-statics -fno-builtin -nostdinc++ \
+			-I${STAGING_TARGET_DIR}/usr/include/uClibc++" \
+			LIBS="$(LIBRARIES)"
+endif
+
 post-install:
 	$(INSTALL_DIR) $(IDIR_LIBFLTK)/usr/lib
 	$(CP) ${WRKINST}/usr/lib/libfltk*.so* $(IDIR_LIBFLTK)/usr/lib

+ 11 - 0
package/fltk/patches/patch-Makefile

@@ -0,0 +1,11 @@
+--- fltk-2.0.x-r7513.orig/Makefile	2010-04-15 18:29:49.000000000 +0200
++++ fltk-2.0.x-r7513/Makefile	2011-01-14 22:01:49.000000000 +0100
+@@ -25,7 +25,7 @@
+ 
+ include makeinclude
+ 
+-DIRS = src $(LOCALIMAGES) images OpenGL fluid glut test
++DIRS = src $(LOCALIMAGES) images OpenGL fluid
+ 
+ all: makeinclude
+ 	for dir in $(DIRS); do\

+ 11 - 0
package/fontconfig/patches/patch-ltmain_sh

@@ -0,0 +1,11 @@
+--- fontconfig-2.8.0.orig/ltmain.sh	2009-11-16 21:49:43.000000000 +0100
++++ fontconfig-2.8.0/ltmain.sh	2011-01-14 00:39:50.000000000 +0100
+@@ -4765,7 +4765,7 @@ func_mode_link ()
+       # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
+       # @file GCC response files
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
++      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto)
+         func_quote_for_eval "$arg"
+ 	arg="$func_quote_for_eval_result"
+         func_append compile_command " $arg"

+ 11 - 0
package/freeglut/patches/patch-ltmain_sh

@@ -0,0 +1,11 @@
+--- freeglut-2.6.0.orig/ltmain.sh	2008-04-29 23:33:55.000000000 +0200
++++ freeglut-2.6.0/ltmain.sh	2011-01-14 21:40:47.000000000 +0100
+@@ -1676,7 +1676,7 @@ EOF
+       # -F/path gives path to uninstalled frameworks, gcc on darwin
+       # @file GCC response files
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
++      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto)
+ 
+ 	# Unknown arguments in both finalize_command and compile_command need
+ 	# to be aesthetically quoted because they are evaled later.

+ 11 - 0
package/freeradius-client/patches/patch-ltmain_sh

@@ -0,0 +1,11 @@
+--- freeradius-client-1.1.6.orig/ltmain.sh	2008-03-05 19:02:55.000000000 +0100
++++ freeradius-client-1.1.6/ltmain.sh	2011-01-15 11:55:40.000000000 +0100
+@@ -1653,7 +1653,7 @@ EOF
+       # -pg pass through profiling flag for GCC
+       # @file GCC response files
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \
+-      -t[45]*|-txscale*|@*)
++      -t[45]*|-txscale*|@*|-fstack-protector*|-flto)
+ 
+ 	# Unknown arguments in both finalize_command and compile_command need
+ 	# to be aesthetically quoted because they are evaled later.

+ 11 - 0
package/freeradius-server/patches/patch-ltmain_sh

@@ -0,0 +1,11 @@
+--- freeradius-server-2.1.8.orig/ltmain.sh	2009-12-30 16:44:35.000000000 +0100
++++ freeradius-server-2.1.8/ltmain.sh	2011-01-15 13:13:33.000000000 +0100
+@@ -1623,7 +1623,7 @@ EOF
+       # -pg pass through profiling flag for GCC
+       # @file GCC response files
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \
+-      -t[45]*|-txscale*|@*)
++      -t[45]*|-txscale*|@*|-fstack-protector*|-flto)
+ 
+ 	# Unknown arguments in both finalize_command and compile_command need
+ 	# to be aesthetically quoted because they are evaled later.

+ 11 - 0
package/freetype/patches/patch-builds_unix_ltmain_sh

@@ -0,0 +1,11 @@
+--- freetype-2.3.11.orig/builds/unix/ltmain.sh	2009-10-10 20:37:53.000000000 +0200
++++ freetype-2.3.11/builds/unix/ltmain.sh	2011-01-14 00:21:25.000000000 +0100
+@@ -4765,7 +4765,7 @@ func_mode_link ()
+       # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
+       # @file GCC response files
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
++      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto)
+         func_quote_for_eval "$arg"
+ 	arg="$func_quote_for_eval_result"
+         func_append compile_command " $arg"

+ 13 - 4
package/gatling/patches/patch-GNUmakefile

@@ -1,7 +1,16 @@
 $Id$
---- gatling-0.8.orig/GNUmakefile	Thu May 19 05:30:26 2005
-+++ gatling-0.8/GNUmakefile	Mon Jul  9 11:52:58 2007
-@@ -96,9 +96,10 @@ libiconv: tryiconv.c
+--- gatling-0.11.orig/GNUmakefile	2008-12-05 13:31:01.000000000 +0100
++++ gatling-0.11/GNUmakefile	2011-01-15 14:10:40.000000000 +0100
+@@ -17,7 +17,7 @@ CROSS=
+ #CROSS=i686-mingw32-
+ CC=$(CROSS)gcc
+ CFLAGS=-pipe -Wall
+-LDFLAGS=
++LDFLAGS?=
+ 
+ path = $(subst :, ,$(PATH))
+ diet_path = $(foreach dir,$(path),$(wildcard $(dir)/diet))
+@@ -147,9 +147,10 @@ havesetresuid.h: trysetresuid.c
  dummy.c:
  	touch $@
  
@@ -11,5 +20,5 @@ $Id$
 -	-ranlib $@
 +	-${RANLIB} $@
  
- LDLIBS+=`cat libsocket libiconv`
+ LDLIBS+=`cat libsocket libiconv libcrypt`
  

+ 2 - 1
package/gcc/Makefile

@@ -36,7 +36,8 @@ CONFIGURE_ARGS+=	--enable-languages=c,c++ \
 			--disable-libmudflap \
 			--disable-libgomp \
 			--disable-multilib \
-			--disable-libstdcxx-pch
+			--disable-libstdcxx-pch \
+			--enable-cxx-flags="${TARGET_LDFLAGS}"
 
 post-install:
 	${INSTALL_DIR} ${IDIR_GCC}/usr/lib/gcc ${IDIR_GCC}/usr/bin

+ 5 - 5
package/gcc/patches/cross-gcc-fix.patch

@@ -1,7 +1,7 @@
 diff -Nur gcc-4.4.2.orig/gcc/Makefile.in gcc-4.4.2/gcc/Makefile.in
---- gcc-4.4.2.orig/gcc/Makefile.in	2009-07-25 19:53:35.000000000 +0200
-+++ gcc-4.4.2/gcc/Makefile.in	2009-11-22 15:30:27.000000000 +0100
-@@ -898,7 +898,8 @@
+--- gcc-4.5.2.orig/gcc/Makefile.in	2010-09-02 15:05:30.000000000 +0200
++++ gcc-4.5.2/gcc/Makefile.in	2011-01-15 14:29:18.000000000 +0100
+@@ -980,7 +980,8 @@ ALL_CXXFLAGS = $(T_CFLAGS) $(CXXFLAGS) $
  # Likewise.  Put INCLUDES at the beginning: this way, if some autoconf macro
  # puts -I options in CPPFLAGS, our include files in the srcdir will always
  # win against random include files in /usr/include.
@@ -9,5 +9,5 @@ diff -Nur gcc-4.4.2.orig/gcc/Makefile.in gcc-4.4.2/gcc/Makefile.in
 +#ALL_CPPFLAGS = $(INCLUDES) $(CPPFLAGS)
 +ALL_CPPFLAGS = $(INCLUDES)
  
- # Build and host support libraries.
- LIBIBERTY = ../libiberty/libiberty.a
+ # This is the variable to use when using $(COMPILER).
+ ifneq ($(ENABLE_BUILD_WITH_CXX),yes)

+ 12 - 0
package/gcc/patches/ltmain.patch

@@ -0,0 +1,12 @@
+diff -Nur gcc-4.5.2.orig/ltmain.sh gcc-4.5.2/ltmain.sh
+--- gcc-4.5.2.orig/ltmain.sh	2009-12-05 18:18:53.000000000 +0100
++++ gcc-4.5.2/ltmain.sh	2011-01-15 14:45:07.000000000 +0100
+@@ -4980,7 +4980,7 @@
+       # @file GCC response files
+       # -tp=* Portland pgcc target processor selection
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*)
++      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|-fstack-protector*|-flto)
+         func_quote_for_eval "$arg"
+ 	arg="$func_quote_for_eval_result"
+         func_append compile_command " $arg"

+ 11 - 0
package/gdb/patches/patch-ltmain_sh

@@ -0,0 +1,11 @@
+--- gdb-7.1.orig/ltmain.sh	2010-01-09 22:11:32.000000000 +0100
++++ gdb-7.1/ltmain.sh	2011-01-15 18:15:38.000000000 +0100
+@@ -4980,7 +4980,7 @@ func_mode_link ()
+       # @file GCC response files
+       # -tp=* Portland pgcc target processor selection
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*)
++      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|-fstack-protector*|-flto)
+         func_quote_for_eval "$arg"
+ 	arg="$func_quote_for_eval_result"
+         func_append compile_command " $arg"

+ 11 - 0
package/gdk-pixbuf/patches/patch-ltmain_sh

@@ -0,0 +1,11 @@
+--- gdk-pixbuf-2.23.0.orig/ltmain.sh	2010-12-06 15:06:25.000000000 +0100
++++ gdk-pixbuf-2.23.0/ltmain.sh	2011-01-14 23:45:56.000000000 +0100
+@@ -5840,7 +5840,7 @@ func_mode_link ()
+       # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+       -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
+-      -O*|-flto*|-fwhopr*|-fuse-linker-plugin)
++      -O*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*)
+         func_quote_for_eval "$arg"
+ 	arg="$func_quote_for_eval_result"
+         func_append compile_command " $arg"

+ 10 - 1
package/gettext/patches/patch-build-aux_ltmain_sh

@@ -1,5 +1,14 @@
 --- gettext-0.18.1.1.orig/build-aux/ltmain.sh	2010-06-06 14:49:57.000000000 +0200
-+++ gettext-0.18.1.1/build-aux/ltmain.sh	2011-01-08 23:49:55.000000000 +0100
++++ gettext-0.18.1.1/build-aux/ltmain.sh	2011-01-14 12:26:11.000000000 +0100
+@@ -4901,7 +4901,7 @@ func_mode_link ()
+       # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
+       # @file GCC response files
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
++      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto)
+         func_quote_for_eval "$arg"
+ 	arg="$func_quote_for_eval_result"
+         func_append compile_command " $arg"
 @@ -5652,27 +5652,6 @@ func_mode_link ()
  	      esac
  	    fi

+ 3 - 4
package/gkrellmd/Makefile → package/gkrellm/Makefile

@@ -3,7 +3,7 @@
 
 include ${TOPDIR}/rules.mk
 
-PKG_NAME:=		gkrellmd
+PKG_NAME:=		gkrellm
 PKG_VERSION:=		2.3.4
 PKG_RELEASE:=		1
 PKG_MD5SUM:=		600f4daa395112ed19a3633deb0829ff
@@ -14,12 +14,11 @@ PKG_BUILDDEP:=		glib
 PKG_URL:=		http://members.dslextreme.com/users/billw/gkrellm/gkrellm.html
 PKG_SITES:=		http://members.dslextreme.com/users/billw/gkrellm/
 
-DISTFILES:=		gkrellm-${PKG_VERSION}.tar.gz
-WRKDIST=		${WRKDIR}/gkrellm-${PKG_VERSION}/server
+WRKSRC=			${WRKDIR}/gkrellm-${PKG_VERSION}/server
 
 include ${TOPDIR}/mk/package.mk
 
-$(eval $(call PKG_template,GKRELLMD,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+$(eval $(call PKG_template,GKRELLMD,gkrellmd,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
 
 CONFIG_STYLE:=		manual
 INSTALL_STYLE:=		manual

+ 0 - 0
package/gkrellmd/files/gkrellmd.init → package/gkrellm/files/gkrellmd.init


+ 0 - 0
package/gkrellmd/files/gkrellmd.postinst → package/gkrellm/files/gkrellmd.postinst


+ 22 - 0
package/gkrellm/patches/patch-server_Makefile

@@ -0,0 +1,22 @@
+--- gkrellm-2.3.4.orig/server/Makefile	2008-10-03 23:52:48.000000000 +0200
++++ gkrellm-2.3.4/server/Makefile	2011-01-15 18:37:40.000000000 +0100
+@@ -26,7 +26,7 @@ SMANDIR ?= $(INSTALLROOT)/share/man/man1
+ MANMODE ?= 644
+ MANDIRMODE ?= 755
+ INSTALL ?= install
+-LINK_FLAGS ?= -Wl,-E
++LINK_FLAGS ?= -Wl,-E $(LDFLAGS)
+ EXTRAOBJS =
+ 
+ SHARED_PATH = ../shared
+@@ -109,8 +109,8 @@ endif
+ 
+ override CC += -Wall $(FLAGS)
+ 
+-OS_NAME=$(shell uname -s)
+-OS_RELEASE=$(shell uname -r)
++OS_NAME=Linux
++OS_RELEASE=2.6
+ 
+ OBJS = main.o monitor.o mail.o plugins.o glib.o utils.o sysdeps-unix.o log.o
+ 

+ 7 - 13
package/glib/Makefile

@@ -35,27 +35,21 @@ CONFIGURE_ENV+=		glib_cv_long_long_format=ll \
 			ac_cv_func_posix_getpwuid_r=yes \
 			ac_cv_func_posix_getgrgid_r=yes
 
-ifeq ($(ADK_HOST_CYGWIN),y)
-EXEEXT:=		.exe
-endif
-
 pre-configure:
-	(cd ${WRKBUILD}; rm -rf config.{cache,status} ; \
-		env CFLAGS="-static" LDFLAGS="-static" \
+ifneq ($(OStype),Darwin)
+	(cd ${WRKBUILD}; rm -rf config.{cache,status}; \
 		./configure --prefix=$(STAGING_HOST_DIR) \
-			$(CONFIGURE_ARGS) \
-			--with-libiconv=no \
+			--enable-debug=no \
 			--with-threads=posix \
-			--enable-static \
-			--disable-shared \
 	);
 	${MAKE} -C ${WRKBUILD}/glib
 	${MAKE} -C ${WRKBUILD}/gthread
-	${MAKE} -C ${WRKBUILD}/gio glib-compile-schemas
-	${MAKE} -C ${WRKBUILD}/gobject glib-genmarshal
+	env CFLAGS="-static" LDFLAGS="-static" ${MAKE} -C ${WRKBUILD}/gio glib-compile-schemas
+	env CFLAGS="-static" LDFLAGS="-static" ${MAKE} -C ${WRKBUILD}/gobject glib-genmarshal
 	$(CP) ${WRKBUILD}/gio/glib-compile-schemas ${STAGING_HOST_DIR}/bin
-	$(CP) ${WRKBUILD}/gobject/glib-genmarshal ${STAGING_HOST_DIR}/bin
+	$(CP) ${WRKBUILD}/gobject/.libs/glib-genmarshal ${STAGING_HOST_DIR}/bin
 	${MAKE} -C ${WRKBUILD} clean
+endif
 
 post-install:
 	${INSTALL_DIR} ${IDIR_GLIB}/usr/lib

+ 16 - 0
package/glib/patches/patch-glib_gconvert_c

@@ -0,0 +1,16 @@
+--- glib-2.27.5.orig/glib/gconvert.c	2010-09-13 15:40:53.000000000 +0200
++++ glib-2.27.5/glib/gconvert.c	2011-01-14 17:17:40.000000000 +0100
+@@ -58,13 +58,6 @@
+ 
+ #include "glibintl.h"
+ 
+-#if defined(USE_LIBICONV_GNU) && !defined (_LIBICONV_H)
+-#error GNU libiconv in use but included iconv.h not from libiconv
+-#endif
+-#if !defined(USE_LIBICONV_GNU) && defined (_LIBICONV_H)
+-#error GNU libiconv not in use but included iconv.h is from libiconv
+-#endif
+-
+ 
+ /**
+  * SECTION:conversions

+ 11 - 0
package/glib/patches/patch-ltmain_sh

@@ -0,0 +1,11 @@
+--- glib-2.27.5.orig/ltmain.sh	2010-12-06 15:06:25.000000000 +0100
++++ glib-2.27.5/ltmain.sh	2011-01-14 17:22:21.000000000 +0100
+@@ -5840,7 +5840,7 @@ func_mode_link ()
+       # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+       -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
+-      -O*|-flto*|-fwhopr*|-fuse-linker-plugin)
++      -O*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*)
+         func_quote_for_eval "$arg"
+ 	arg="$func_quote_for_eval_result"
+         func_append compile_command " $arg"

+ 11 - 0
package/gmp/patches/patch-ltmain_sh

@@ -0,0 +1,11 @@
+--- gmp-4.3.2.orig/ltmain.sh	2010-01-07 21:09:02.000000000 +0100
++++ gmp-4.3.2/ltmain.sh	2011-01-15 14:17:38.000000000 +0100
+@@ -1663,7 +1663,7 @@ EOF
+       # -F/path gives path to uninstalled frameworks, gcc on darwin
+       # @file GCC response files
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
++      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto)
+ 
+ 	# Unknown arguments in both finalize_command and compile_command need
+ 	# to be aesthetically quoted because they are evaled later.

+ 11 - 0
package/gnutls/patches/patch-build-aux_ltmain_sh

@@ -0,0 +1,11 @@
+--- gnutls-2.8.6.orig/build-aux/ltmain.sh	2010-03-15 11:28:59.000000000 +0100
++++ gnutls-2.8.6/build-aux/ltmain.sh	2011-01-15 19:40:55.000000000 +0100
+@@ -4765,7 +4765,7 @@ func_mode_link ()
+       # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
+       # @file GCC response files
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
++      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto)
+         func_quote_for_eval "$arg"
+ 	arg="$func_quote_for_eval_result"
+         func_append compile_command " $arg"

+ 11 - 0
package/gnutls/patches/patch-lib_build-aux_ltmain_sh

@@ -0,0 +1,11 @@
+--- gnutls-2.8.6.orig/lib/build-aux/ltmain.sh	2010-03-15 11:28:24.000000000 +0100
++++ gnutls-2.8.6/lib/build-aux/ltmain.sh	2011-01-15 19:44:32.000000000 +0100
+@@ -4765,7 +4765,7 @@ func_mode_link ()
+       # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
+       # @file GCC response files
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
++      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto)
+         func_quote_for_eval "$arg"
+ 	arg="$func_quote_for_eval_result"
+         func_append compile_command " $arg"

+ 11 - 0
package/gnutls/patches/patch-libextra_build-aux_ltmain_sh

@@ -0,0 +1,11 @@
+--- gnutls-2.8.6.orig/libextra/build-aux/ltmain.sh	2010-03-15 11:28:49.000000000 +0100
++++ gnutls-2.8.6/libextra/build-aux/ltmain.sh	2011-01-15 19:44:14.000000000 +0100
+@@ -4765,7 +4765,7 @@ func_mode_link ()
+       # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
+       # @file GCC response files
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
++      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto)
+         func_quote_for_eval "$arg"
+ 	arg="$func_quote_for_eval_result"
+         func_append compile_command " $arg"

+ 8 - 3
package/gpsd/Makefile

@@ -13,8 +13,8 @@ PKG_DEPENDS:=		libpthread
 PKG_BUILDDEP:=		ncurses
 PKG_SITES:=		http://download.berlios.de/gpsd/
 PKG_URL:=		http://gpsd.berlios.de/
-PKG_NEED_CXX:=		1
 PKG_CXX:=		GPSD
+PKG_NEED_CXX:=		1
 
 PKG_SUBPKGS:=		GPSD GPSD_CLIENTS
 PKGSD_GPSD_CLIENTS:=	GPS client utilities
@@ -32,10 +32,15 @@ CONFIGURE_ENV+=		EGREP="grep -E" \
 CONFIGURE_ARGS+=	--disable-dbus
 TCFLAGS+=		-fPIC
 
+LIBRARIES:=-nodefaultlibs -luClibc++
+ifeq ($(ADK_TOOLCHAIN_GCC_USE_SSP),y)
+LIBRARIES+=-lssp -lssp_nonshared
+endif
+
 ifeq ($(ADK_COMPILE_GPSD_WITH_UCLIBCXX),y)
-TCXXFLAGS+=		-fno-builtin -fno-rtti -nostdinc++ \
+TCXXFLAGS+=		-fno-rtti -nostdinc++ \
 			-I${STAGING_TARGET_DIR}/usr/include/uClibc++
-TLDFLAGS+=		-luClibc++ -lc -lm -pthread -nodefaultlibs
+TLDFLAGS+=		$(LIBRARIES)
 else
 TLDFLAGS+=		-shared -pthread
 endif

+ 10 - 1
package/gpsd/patches/patch-Makefile_in

@@ -1,5 +1,5 @@
 --- gpsd-2.95.orig/Makefile.in	2010-07-14 00:48:24.000000000 +0200
-+++ gpsd-2.95/Makefile.in	2010-07-30 13:04:19.000000000 +0200
++++ gpsd-2.95/Makefile.in	2011-01-15 19:56:22.000000000 +0100
 @@ -612,8 +612,8 @@ libgps_la_SOURCES = $(libgps_c_sources) 
  libgpsd_la_SOURCES = $(libgpsd_c_sources) $(libgpsd_h_sources) \
  				driver_rtcm2.h packet_states.h
@@ -11,3 +11,12 @@
  nodist_libgpsd_la_SOURCES = packet_names.h ais_json.i
  libgps_la_LIBADD = $(LIBM) $(LIBC) $(LIBNSL) $(LIBSOCKET) $(LIBPTHREAD)
  libgpsd_la_LIBADD = $(LIBM) $(LIBC) $(LIBNSL) $(LIBSOCKET) $(LIBPTHREAD) $(BLUEZ_LIBS) libgps.la
+@@ -996,7 +996,7 @@ clean-libLTLIBRARIES:
+ 	  rm -f "$${dir}/so_locations"; \
+ 	done
+ libgps.la: $(libgps_la_OBJECTS) $(libgps_la_DEPENDENCIES) 
+-	$(libgps_la_LINK) -rpath $(libdir) $(libgps_la_OBJECTS) $(libgps_la_LIBADD) $(LIBS)
++	$(libgps_la_LINK) -rpath $(libdir) $(libgps_la_OBJECTS) $(libgps_la_LIBADD) $(LDFLAGS) $(LIBS)
+ libgpsd.la: $(libgpsd_la_OBJECTS) $(libgpsd_la_DEPENDENCIES) 
+ 	$(LINK) -rpath $(libdir) $(libgpsd_la_OBJECTS) $(libgpsd_la_LIBADD) $(LIBS)
+ install-binPROGRAMS: $(bin_PROGRAMS)

+ 20 - 0
package/gpsd/patches/patch-ltmain_sh

@@ -0,0 +1,20 @@
+--- gpsd-2.95.orig/ltmain.sh	2010-06-18 22:54:26.000000000 +0200
++++ gpsd-2.95/ltmain.sh	2011-01-15 20:23:12.000000000 +0100
+@@ -4765,7 +4765,7 @@ func_mode_link ()
+       # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
+       # @file GCC response files
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
++      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto)
+         func_quote_for_eval "$arg"
+ 	arg="$func_quote_for_eval_result"
+         func_append compile_command " $arg"
+@@ -4963,7 +4963,7 @@ func_mode_link ()
+     done
+ 
+     if test "$linkmode" = lib; then
+-      libs="$predeps $libs $compiler_lib_search_path $postdeps"
++      libs="$libs $compiler_lib_search_path"
+ 
+       # Compute libraries that are listed more than once in $predeps
+       # $postdeps and mark them as special (i.e., whose duplicates are

+ 11 - 0
package/gtk+/patches/patch-ltmain_sh

@@ -0,0 +1,11 @@
+--- gtk+-2.22.1.orig/ltmain.sh	2010-08-13 04:09:38.000000000 +0200
++++ gtk+-2.22.1/ltmain.sh	2011-01-14 23:50:15.000000000 +0100
+@@ -5091,7 +5091,7 @@ func_mode_link ()
+       # @file                GCC response files
+       # -tp=*                Portland pgcc target processor selection
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*)
++      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|-fstack-protector*|-flto)
+         func_quote_for_eval "$arg"
+ 	arg="$func_quote_for_eval_result"
+         func_append compile_command " $arg"

+ 17 - 13
package/hdparm/patches/patch-Makefile

@@ -1,32 +1,36 @@
 --- hdparm-9.15.orig/Makefile	2008-12-10 01:14:28.000000000 +0100
-+++ hdparm-9.15/Makefile	2010-02-13 12:24:25.000000000 +0100
-@@ -13,7 +13,7 @@ oldmandir = $(manprefix)/man
++++ hdparm-9.15/Makefile	2011-01-15 20:46:42.000000000 +0100
+@@ -13,10 +13,10 @@ oldmandir = $(manprefix)/man
  CC ?= gcc
  STRIP ?= strip
-
+ 
 -CFLAGS := -O2 -W -Wall -Wbad-function-cast -Wcast-align -Wpointer-arith -Wcast-qual -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -fkeep-inline-functions -Wwrite-strings -Waggregate-return -Wnested-externs -Wtrigraphs $(CFLAGS)
 +CFLAGS ?= -O2 -W -Wall -Wbad-function-cast -Wcast-align -Wpointer-arith -Wcast-qual -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -fkeep-inline-functions -Wwrite-strings -Waggregate-return -Wnested-externs -Wtrigraphs $(CFLAGS)
-
+ 
  #LDFLAGS = -s -static
- LDFLAGS = -s
+-LDFLAGS = -s
++LDFLAGS ?= -s
+ INSTALL = install
+ INSTALL_DATA = $(INSTALL) -m 644
+ INSTALL_DIR = $(INSTALL) -m 755 -d
 @@ -28,7 +28,6 @@ all: hdparm
-
+ 
  hdparm: hdparm.h sgio.h $(OBJS)
  	$(CC) $(LDFLAGS) -o hdparm $(OBJS)
 -	$(STRIP) hdparm
-
+ 
  hdparm.o:	hdparm.h sgio.h
-
+ 
 @@ -46,9 +45,9 @@ install: all hdparm.8
-	if [ -f $(DESTDIR)$(sbindir)/hdparm ]; then rm -f $(DESTDIR)$(sbindir)/hdparm ; fi
-	if [ -f $(DESTDIR)$(mandir)/man8/hdparm.8 ]; then rm -f $(DESTDIR)$(mandir)/man8/hdparm.8 ;\
-	elif [ -f $(DESTDIR)$(oldmandir)/man8/hdparm.8 ]; then rm -f $(DESTDIR)$(oldmandir)/man8/hdparm.8 ; fi
+ 	if [ -f $(DESTDIR)$(sbindir)/hdparm ]; then rm -f $(DESTDIR)$(sbindir)/hdparm ; fi
+ 	if [ -f $(DESTDIR)$(mandir)/man8/hdparm.8 ]; then rm -f $(DESTDIR)$(mandir)/man8/hdparm.8 ;\
+ 	elif [ -f $(DESTDIR)$(oldmandir)/man8/hdparm.8 ]; then rm -f $(DESTDIR)$(oldmandir)/man8/hdparm.8 ; fi
 -	$(INSTALL_PROGRAM) -D hdparm $(DESTDIR)$(sbindir)/hdparm
 -	if [ -d $(DESTDIR)$(mandir) ]; then $(INSTALL_DATA) -D hdparm.8 $(DESTDIR)$(mandir)/man8/hdparm.8 ;\
 -	elif [ -d $(DESTDIR)$(oldmandir) ]; then $(INSTALL_DATA) -D hdparm.8 $(DESTDIR)$(oldmandir)/man8/hdparm.8 ; fi
 +	$(INSTALL_PROGRAM) hdparm $(DESTDIR)$(sbindir)/hdparm
 +	if [ -d $(DESTDIR)$(mandir) ]; then $(INSTALL_DATA) hdparm.8 $(DESTDIR)$(mandir)/man8/hdparm.8 ;\
 +	elif [ -d $(DESTDIR)$(oldmandir) ]; then $(INSTALL_DATA) hdparm.8 $(DESTDIR)$(oldmandir)/man8/hdparm.8 ; fi
-
+ 
  clean:
-	-rm -f hdparm $(OBJS) core 2>/dev/null
+ 	-rm -f hdparm $(OBJS) core 2>/dev/null

+ 11 - 0
package/heimdal/patches/patch-ltmain_sh

@@ -0,0 +1,11 @@
+--- heimdal-1.4.orig/ltmain.sh	2010-09-13 09:24:01.000000000 +0200
++++ heimdal-1.4/ltmain.sh	2011-01-15 20:52:41.000000000 +0100
+@@ -4238,7 +4238,7 @@ func_mode_link ()
+       # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
+       # @file GCC response files
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
++      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto)
+         func_quote_for_eval "$arg"
+ 	arg="$func_quote_for_eval_result"
+         func_append compile_command " $arg"

+ 6 - 1
package/id3lib/Makefile

@@ -23,10 +23,15 @@ $(eval $(call PKG_template,ID3LIB,id3lib,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEP
 TCFLAGS+=		-fPIC
 CONFIGURE_ARGS+=	--enable-cxx-warnings=no
 
+LIBRARIES:=-nodefaultlibs -luClibc++ -lz -lm -lc
+ifeq ($(ADK_TOOLCHAIN_GCC_USE_SSP),y)
+LIBRARIES+=-lssp -fstack-protector
+endif
+
 ifeq ($(ADK_COMPILE_ID3LIB_WITH_UCLIBCXX),y)
 TCXXFLAGS+=		-fno-builtin -fno-rtti -nostdinc++ \
 			-I${STAGING_TARGET_DIR}/usr/include/uClibc++
-CONFIGURE_ENV+=		LIBS="-nodefaultlibs -luClibc++ -lz -lm -lc"
+CONFIGURE_ENV+=		LIBS="${LIBRARIES}"
 else
 TLDFLAGS+=		-shared
 endif

+ 22 - 0
package/id3lib/patches/patch-ltmain_sh

@@ -0,0 +1,22 @@
+--- id3lib-3.8.3.orig/ltmain.sh	2003-03-02 01:23:00.000000000 +0100
++++ id3lib-3.8.3/ltmain.sh	2011-01-15 19:06:56.000000000 +0100
+@@ -1065,6 +1065,19 @@ compiler."
+ 	continue
+ 	;;
+ 
++      -fstack-protector*|-flto)
++	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
++	case $arg in
++        *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
++          arg="\"$arg\""
++          ;;
++        esac
++        compile_command="$compile_command $arg"
++        finalize_command="$finalize_command $arg"
++        compiler_flags="$compiler_flags $arg"
++        continue
++        ;;
++
+       -no-fast-install)
+ 	fast_install=no
+ 	continue

+ 11 - 0
package/imlib2/patches/patch-ltmain_sh

@@ -0,0 +1,11 @@
+--- imlib2-1.4.4.orig/ltmain.sh	2010-05-05 20:26:26.000000000 +0200
++++ imlib2-1.4.4/ltmain.sh	2011-01-15 11:42:11.000000000 +0100
+@@ -4765,7 +4765,7 @@ func_mode_link ()
+       # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
+       # @file GCC response files
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
++      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto)
+         func_quote_for_eval "$arg"
+ 	arg="$func_quote_for_eval_result"
+         func_append compile_command " $arg"

+ 4 - 0
package/iperf/Makefile

@@ -19,6 +19,10 @@ include ${TOPDIR}/mk/package.mk
 
 $(eval $(call PKG_template,IPERF,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
 
+ifeq ($(ADK_TOOLCHAIN_GCC_USE_SSP),y)
+TLDFLAGS+=		-lssp
+endif
+
 ifeq ($(ADK_COMPILE_IPERF_WITH_UCLIBCXX),y)
 TCXXFLAGS+=		-fno-builtin -fno-rtti -nostdinc++
 TLDFLAGS+=		-nodefaultlibs

+ 11 - 0
package/ipsec-tools/patches/patch-ltmain_sh

@@ -0,0 +1,11 @@
+--- ipsec-tools-0.7.2.orig/ltmain.sh	2009-04-21 16:41:43.000000000 +0200
++++ ipsec-tools-0.7.2/ltmain.sh	2011-01-15 21:50:23.000000000 +0100
+@@ -4238,7 +4238,7 @@ func_mode_link ()
+       # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
+       # @file GCC response files
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
++      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto)
+         func_quote_for_eval "$arg"
+ 	arg="$func_quote_for_eval_result"
+         func_append compile_command " $arg"

+ 11 - 0
package/iptables/patches/patch-ltmain_sh

@@ -0,0 +1,11 @@
+--- iptables-1.4.10.orig/ltmain.sh	2010-10-29 16:40:34.000000000 +0200
++++ iptables-1.4.10/ltmain.sh	2011-01-15 21:45:03.000000000 +0100
+@@ -4765,7 +4765,7 @@ func_mode_link ()
+       # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
+       # @file GCC response files
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
++      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto)
+         func_quote_for_eval "$arg"
+ 	arg="$func_quote_for_eval_result"
+         func_append compile_command " $arg"

+ 1 - 1
package/iptraf/Makefile

@@ -28,7 +28,7 @@ do-build:
 		CFLAGS="${TARGET_CFLAGS}" \
 		DEBUG="" \
 		INCLUDEDIR="-I../support -I${STAGING_TARGET_DIR}/usr/include" \
-		LDOPTS="-L${STAGING_TARGET_DIR}/usr/lib -L${STAGING_TARGET_DIR}/lib" \
+		LDOPTS="${TARGET_LDFLAGS}" \
 		PLATFORM="-DPLATFORM=\\\"Linux/${ARCH}\\\"" \
 		TARGET="/usr/bin" \
 		WORKDIR="/var/lib/iptraf" \

+ 11 - 0
package/jamvm/patches/patch-ltmain_sh

@@ -0,0 +1,11 @@
+--- jamvm-1.5.4.orig/ltmain.sh	2009-01-03 07:08:36.000000000 +0100
++++ jamvm-1.5.4/ltmain.sh	2011-01-15 22:06:10.000000000 +0100
+@@ -1676,7 +1676,7 @@ EOF
+       # -F/path gives path to uninstalled frameworks, gcc on darwin
+       # @file GCC response files
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
++      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto)
+ 
+ 	# Unknown arguments in both finalize_command and compile_command need
+ 	# to be aesthetically quoted because they are evaled later.

+ 11 - 0
package/jpeg/patches/patch-ltmain_sh

@@ -0,0 +1,11 @@
+--- jpeg-8b.orig/ltmain.sh	2010-05-02 18:49:25.000000000 +0200
++++ jpeg-8b/ltmain.sh	2011-01-14 00:16:39.000000000 +0100
+@@ -4765,7 +4765,7 @@ func_mode_link ()
+       # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
+       # @file GCC response files
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
++      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto)
+         func_quote_for_eval "$arg"
+ 	arg="$func_quote_for_eval_result"
+         func_append compile_command " $arg"

+ 11 - 0
package/lame/patches/patch-ltmain_sh

@@ -0,0 +1,11 @@
+--- lame-398-2.orig/ltmain.sh	2008-01-03 01:00:01.000000000 +0100
++++ lame-398-2/ltmain.sh	2011-01-15 22:13:38.000000000 +0100
+@@ -1693,7 +1693,7 @@ EOF
+       # -F/path gives path to uninstalled frameworks, gcc on darwin
+       # @file GCC response files
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
++      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto)
+ 
+ 	# Unknown arguments in both finalize_command and compile_command need
+ 	# to be aesthetically quoted because they are evaled later.

+ 11 - 0
package/libICE/patches/patch-ltmain_sh

@@ -0,0 +1,11 @@
+--- libICE-1.0.6.orig/ltmain.sh	2009-05-18 04:30:07.000000000 +0200
++++ libICE-1.0.6/ltmain.sh	2011-01-15 00:09:27.000000000 +0100
+@@ -4765,7 +4765,7 @@ func_mode_link ()
+       # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
+       # @file GCC response files
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
++      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto)
+         func_quote_for_eval "$arg"
+ 	arg="$func_quote_for_eval_result"
+         func_append compile_command " $arg"

+ 11 - 0
package/libSM/patches/patch-ltmain_sh

@@ -0,0 +1,11 @@
+--- libSM-1.1.1.orig/ltmain.sh	2009-08-07 14:22:14.000000000 +0200
++++ libSM-1.1.1/ltmain.sh	2011-01-15 00:11:06.000000000 +0100
+@@ -4772,7 +4772,7 @@ func_mode_link ()
+       # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
+       # @file GCC response files
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
++      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto)
+         func_quote_for_eval "$arg"
+ 	arg="$func_quote_for_eval_result"
+         func_append compile_command " $arg"

+ 11 - 0
package/libX11/patches/patch-ltmain_sh

@@ -0,0 +1,11 @@
+--- libX11-1.3.2.orig/ltmain.sh	2009-10-17 07:26:21.000000000 +0200
++++ libX11-1.3.2/ltmain.sh	2011-01-14 00:51:57.000000000 +0100
+@@ -1676,7 +1676,7 @@ EOF
+       # -F/path gives path to uninstalled frameworks, gcc on darwin
+       # @file GCC response files
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
++      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto)
+ 
+ 	# Unknown arguments in both finalize_command and compile_command need
+ 	# to be aesthetically quoted because they are evaled later.

+ 11 - 0
package/libXau/patches/patch-ltmain_sh

@@ -0,0 +1,11 @@
+--- libXau-1.0.5.orig/ltmain.sh	2009-05-18 04:20:07.000000000 +0200
++++ libXau-1.0.5/ltmain.sh	2011-01-14 00:48:29.000000000 +0100
+@@ -4765,7 +4765,7 @@ func_mode_link ()
+       # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
+       # @file GCC response files
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
++      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto)
+         func_quote_for_eval "$arg"
+ 	arg="$func_quote_for_eval_result"
+         func_append compile_command " $arg"

+ 11 - 0
package/libXaw/patches/patch-ltmain_sh

@@ -0,0 +1,11 @@
+--- libXaw-1.0.7.orig/ltmain.sh	2009-10-17 07:26:21.000000000 +0200
++++ libXaw-1.0.7/ltmain.sh	2011-01-15 22:19:32.000000000 +0100
+@@ -1676,7 +1676,7 @@ EOF
+       # -F/path gives path to uninstalled frameworks, gcc on darwin
+       # @file GCC response files
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
++      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto)
+ 
+ 	# Unknown arguments in both finalize_command and compile_command need
+ 	# to be aesthetically quoted because they are evaled later.

+ 11 - 0
package/libXcursor/patches/patch-ltmain_sh

@@ -0,0 +1,11 @@
+--- libXcursor-1.1.11.orig/ltmain.sh	2010-10-28 07:48:42.000000000 +0200
++++ libXcursor-1.1.11/ltmain.sh	2011-01-15 22:22:45.000000000 +0100
+@@ -5091,7 +5091,7 @@ func_mode_link ()
+       # @file                GCC response files
+       # -tp=*                Portland pgcc target processor selection
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*)
++      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|-fstack-protector*|-flto)
+         func_quote_for_eval "$arg"
+ 	arg="$func_quote_for_eval_result"
+         func_append compile_command " $arg"

+ 11 - 0
package/libXdmcp/patches/patch-ltmain_sh

@@ -0,0 +1,11 @@
+--- libXdmcp-1.0.3.orig/ltmain.sh	2009-05-18 04:20:38.000000000 +0200
++++ libXdmcp-1.0.3/ltmain.sh	2011-01-14 00:47:12.000000000 +0100
+@@ -4765,7 +4765,7 @@ func_mode_link ()
+       # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
+       # @file GCC response files
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
++      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto)
+         func_quote_for_eval "$arg"
+ 	arg="$func_quote_for_eval_result"
+         func_append compile_command " $arg"

+ 11 - 0
package/libXext/patches/patch-ltmain_sh

@@ -0,0 +1,11 @@
+--- libXext-1.1.1.orig/ltmain.sh	2009-10-17 07:26:21.000000000 +0200
++++ libXext-1.1.1/ltmain.sh	2011-01-14 01:11:30.000000000 +0100
+@@ -1676,7 +1676,7 @@ EOF
+       # -F/path gives path to uninstalled frameworks, gcc on darwin
+       # @file GCC response files
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
++      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto)
+ 
+ 	# Unknown arguments in both finalize_command and compile_command need
+ 	# to be aesthetically quoted because they are evaled later.

+ 11 - 0
package/libXfont/patches/patch-ltmain_sh

@@ -0,0 +1,11 @@
+--- libXfont-1.4.1.orig/ltmain.sh	2009-09-11 16:54:52.000000000 +0200
++++ libXfont-1.4.1/ltmain.sh	2011-01-15 22:27:42.000000000 +0100
+@@ -1676,7 +1676,7 @@ EOF
+       # -F/path gives path to uninstalled frameworks, gcc on darwin
+       # @file GCC response files
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
++      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto)
+ 
+ 	# Unknown arguments in both finalize_command and compile_command need
+ 	# to be aesthetically quoted because they are evaled later.

+ 11 - 0
package/libXft/patches/patch-ltmain_sh

@@ -0,0 +1,11 @@
+--- libXft-2.1.9.orig/ltmain.sh	2006-01-10 16:23:50.000000000 +0100
++++ libXft-2.1.9/ltmain.sh	2011-01-15 22:30:29.000000000 +0100
+@@ -1623,7 +1623,7 @@ EOF
+       # -pg pass through profiling flag for GCC
+       # @file GCC response files
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \
+-      -t[45]*|-txscale*|@*)
++      -t[45]*|-txscale*|@*|-fstack-protector*|-flto)
+ 
+ 	# Unknown arguments in both finalize_command and compile_command need
+ 	# to be aesthetically quoted because they are evaled later.

+ 11 - 0
package/libXi/patches/patch-ltmain_sh

@@ -0,0 +1,11 @@
+--- libXi-1.3.orig/ltmain.sh	2009-10-02 04:21:36.000000000 +0200
++++ libXi-1.3/ltmain.sh	2011-01-14 21:38:48.000000000 +0100
+@@ -4765,7 +4765,7 @@ func_mode_link ()
+       # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
+       # @file GCC response files
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
++      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto)
+         func_quote_for_eval "$arg"
+ 	arg="$func_quote_for_eval_result"
+         func_append compile_command " $arg"

+ 11 - 0
package/libXmu/patches/patch-ltmain_sh

@@ -0,0 +1,11 @@
+--- libXmu-1.0.5.orig/ltmain.sh	2009-09-11 16:54:52.000000000 +0200
++++ libXmu-1.0.5/ltmain.sh	2011-01-15 22:16:42.000000000 +0100
+@@ -1676,7 +1676,7 @@ EOF
+       # -F/path gives path to uninstalled frameworks, gcc on darwin
+       # @file GCC response files
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
++      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto)
+ 
+ 	# Unknown arguments in both finalize_command and compile_command need
+ 	# to be aesthetically quoted because they are evaled later.

+ 11 - 0
package/libXpm/patches/patch-ltmain_sh

@@ -0,0 +1,11 @@
+--- libXpm-3.5.8.orig/ltmain.sh	2009-09-11 16:54:52.000000000 +0200
++++ libXpm-3.5.8/ltmain.sh	2011-01-15 11:27:44.000000000 +0100
+@@ -1676,7 +1676,7 @@ EOF
+       # -F/path gives path to uninstalled frameworks, gcc on darwin
+       # @file GCC response files
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
++      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto)
+ 
+ 	# Unknown arguments in both finalize_command and compile_command need
+ 	# to be aesthetically quoted because they are evaled later.

+ 11 - 0
package/libXt/patches/patch-ltmain_sh

@@ -0,0 +1,11 @@
+--- libXt-1.0.7.orig/ltmain.sh	2009-09-11 16:54:52.000000000 +0200
++++ libXt-1.0.7/ltmain.sh	2011-01-15 00:13:20.000000000 +0100
+@@ -1676,7 +1676,7 @@ EOF
+       # -F/path gives path to uninstalled frameworks, gcc on darwin
+       # @file GCC response files
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
++      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto)
+ 
+ 	# Unknown arguments in both finalize_command and compile_command need
+ 	# to be aesthetically quoted because they are evaled later.

+ 11 - 0
package/libXv/patches/patch-ltmain_sh

@@ -0,0 +1,11 @@
+--- libXv-1.0.5.orig/ltmain.sh	2009-09-11 16:54:52.000000000 +0200
++++ libXv-1.0.5/ltmain.sh	2011-01-15 22:32:11.000000000 +0100
+@@ -1676,7 +1676,7 @@ EOF
+       # -F/path gives path to uninstalled frameworks, gcc on darwin
+       # @file GCC response files
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
++      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto)
+ 
+ 	# Unknown arguments in both finalize_command and compile_command need
+ 	# to be aesthetically quoted because they are evaled later.

+ 11 - 0
package/libao/patches/patch-ltmain_sh

@@ -0,0 +1,11 @@
+--- libao-0.8.8.orig/ltmain.sh	2007-02-21 12:45:54.000000000 +0100
++++ libao-0.8.8/ltmain.sh	2011-01-15 22:34:13.000000000 +0100
+@@ -1677,7 +1677,7 @@ EOF
+       # -F/path gives path to uninstalled frameworks, gcc on darwin
+       # @file GCC response files
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
++      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto)
+ 
+ 	# Unknown arguments in both finalize_command and compile_command need
+ 	# to be aesthetically quoted because they are evaled later.

+ 3 - 3
package/libart/patches/100-cross_compile_fix.patch

@@ -1,7 +1,7 @@
 diff -urN libart.old/Makefile.in libart.dev/Makefile.in
---- libart.old/Makefile.in	2005-01-21 10:52:11.000000000 +0100
-+++ libart.dev/Makefile.in	2005-07-17 19:31:05.000000000 +0200
-@@ -440,9 +440,9 @@
+--- libart_lgpl-2.3.17.orig/Makefile.in	2005-01-21 10:52:11.000000000 +0100
++++ libart_lgpl-2.3.17/Makefile.in	2011-01-15 22:35:19.000000000 +0100
+@@ -440,9 +440,9 @@ testuta$(EXEEXT): $(testuta_OBJECTS) $(t
  	@rm -f testuta$(EXEEXT)
  	$(LINK) $(testuta_LDFLAGS) $(testuta_OBJECTS) $(testuta_LDADD) $(LIBS)
  

+ 11 - 0
package/libart/patches/patch-ltmain_sh

@@ -0,0 +1,11 @@
+--- libart_lgpl-2.3.17.orig/ltmain.sh	2004-07-06 05:30:16.000000000 +0200
++++ libart_lgpl-2.3.17/ltmain.sh	2011-01-15 22:36:41.000000000 +0100
+@@ -1385,7 +1385,7 @@ EOF
+       # but this is not reliable with gcc because gcc may use -mfoo to
+       # select a different linker, different libraries, etc, while
+       # -Wl,-mfoo simply passes -mfoo to the linker.
+-      -m*)
++      -m*|-fstack-protector*|-flto)
+ 	# Unknown arguments in both finalize_command and compile_command need
+ 	# to be aesthetically quoted because they are evaled later.
+ 	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`

+ 6 - 6
package/libaudiofile/Makefile

@@ -3,14 +3,14 @@
 
 include ${TOPDIR}/rules.mk
 
-PKG_NAME:=		libaudiofile
-PKG_VERSION:=		0.2.6
-PKG_RELEASE:=		2
-PKG_MD5SUM:=		460f848ce5f4a33ae66b15a4fb7720ec
+PKG_NAME:=		audiofile
+PKG_VERSION:=		0.2.7
+PKG_RELEASE:=		1
+PKG_MD5SUM:=		a39be317a7b1971b408805dc5e371862
 PKG_DESCR:=		audiofile library
 PKG_SECTION:=		libs
-PKG_URL:=		http://www.68k.org/~michael/audiofile
-PKG_SITES:=		http://www.openadk.org/distfiles/
+PKG_URL:=		http://www.68k.org/~michael/audiofile/
+PKG_SITES:=		http://www.68k.org/~michael/audiofile/
 
 include ${TOPDIR}/mk/package.mk
 

+ 3 - 3
package/libaudiofile/patches/001-audiofile-config-libdirs.patch

@@ -1,6 +1,6 @@
---- libaudiofile-0.2.6/audiofile-config.in.orig	2004-03-06 07:39:23.000000000 +0100
-+++ libaudiofile-0.2.6/audiofile-config.in	2005-12-13 14:15:52.000000000 +0100
-@@ -45,7 +45,9 @@
+--- libaudiofile-0.2.6.orig/audiofile-config.in	2004-03-06 07:39:23.000000000 +0100
++++ libaudiofile-0.2.6/audiofile-config.in	2011-01-14 22:38:44.000000000 +0100
+@@ -45,7 +45,9 @@ while test $# -gt 0; do
        echo $includes
        ;;
      --libs)

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio