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/id3lib/Makefile | 7 ++++++- package/id3lib/patches/patch-ltmain_sh | 22 ++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 package/id3lib/patches/patch-ltmain_sh (limited to 'package/id3lib') diff --git a/package/id3lib/Makefile b/package/id3lib/Makefile index 63b31c5a3..3a20f34d6 100644 --- a/package/id3lib/Makefile +++ b/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 diff --git a/package/id3lib/patches/patch-ltmain_sh b/package/id3lib/patches/patch-ltmain_sh new file mode 100644 index 000000000..32b0e7b55 --- /dev/null +++ b/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 -- cgit v1.2.3