--- /dev/null
+tinylogin will meet segment fault if compiled by gcc-4.5.0 when enable both
+frename-registers and Os options. Use O2 instead.
+
+Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
+
+diff -ruN tinylogin-1.4-orig/Makefile tinylogin-1.4/Makefile
+--- tinylogin-1.4-orig/Makefile 2010-09-16 13:02:06.302192295 +0800
++++ tinylogin-1.4/Makefile 2010-09-16 13:02:34.634167846 +0800
+@@ -97,9 +97,7 @@
+ #--------------------------------------------------------
+
+
+-# use '-Os' optimization if available, else use -O2
+-OPTIMIZATION = $(shell if $(CC) -Os -S -o /dev/null -xc /dev/null >/dev/null 2>&1; \
+- then echo "-Os"; else echo "-O2" ; fi)
++OPTIMIZATION = -O2
+
+ WARNINGS = -Wall
+
and groups on an embedded system."
HOMEPAGE = "http://tinylogin.busybox.net/"
LICENSE = "GPL"
-PR = "r4"
+PR = "r5"
SRC_URI = "http://tinylogin.busybox.net/downloads/tinylogin-${PV}.tar.bz2 \
file://cvs-20040608.patch;patch=1;pnum=1 \
file://add-system.patch;patch=1;pnum=1 \
file://adduser-empty_pwd.patch;patch=1 \
- file://remove-index.patch;patch=1"
+ file://remove-index.patch;patch=1 \
+ file://use_O2_option.patch"
EXTRA_OEMAKE = ""
# hidden symbols in libgcc.a which linker complains
# when linking shared libraries further in the build like (gnutls)
-OPTSPACE = "${@base_contains('TARGET_ARCH', ['powerpc', 'arm'], '', '--enable-target-optspace',d)}"
+SPECIAL_ARCH_LIST = "powerpc arm"
+OPTSPACE = ${@base_contains("SPECIAL_ARCH_LIST", "${TARGET_ARCH}", "", "--enable-target-optspace",d)}
EXTRA_OECONF_BASE ?= ""
EXTRA_OECONF_PATHS ?= ""
--- /dev/null
+Add new method to judge whether <altivec.h> is needed
+
+The original logic will use "typedef vector int t;" to judge
+whether <altivec.h> is needed. altivec.h contains the following
+statement:
+
+ #if !defined(__APPLE_ALTIVEC__)
+ #define vector __vector
+ #define pixel __pixel
+ #define bool
+ #endif
+
+In gcc-4.3.3, __APPLE_ALTIVEC__ is not defined by compiler, neither
+as vector, pixel, and bool. In order to make "typedef vector int t;"
+pass the compilation, we need to include altivec.h.
+
+However in gcc-4.5.0, __APPLE_ALTIVEC__ is defined by compiler,
+so as vector, pixel, and bool. We could not judge whether
+altivec.h is needed by "typedef vector int t;".
+Here we include another statement "int tmp = __CR6_EQ;", in
+which __CR6_EQ is defined in altivec.h.
+
+Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
+
+diff -ruN mpeg2dec-0.4.1-orig/configure.in mpeg2dec-0.4.1/configure.in
+--- mpeg2dec-0.4.1-orig/configure.in 2010-09-14 20:55:42.399687663 +0800
++++ mpeg2dec-0.4.1/configure.in 2010-09-14 20:56:43.403204648 +0800
+@@ -75,11 +75,11 @@
+ CFLAGS="$OPT_CFLAGS $TRY_CFLAGS $CFLAGS"
+ AC_MSG_CHECKING([if <altivec.h> is needed])
+ AC_TRY_COMPILE([],
+- [typedef vector int t;
++ [typedef vector int t; int tmp = __CR6_EQ;
+ vec_ld(0, (unsigned char *)0);],
+ [have_altivec=yes; AC_MSG_RESULT(no)],
+ [AC_TRY_COMPILE([#include <altivec.h>],
+- [typedef vector int t; vec_ld(0, (unsigned char *)0);],
++ [typedef vector int t; int tmp = __CR6_EQ; vec_ld(0, (unsigned char *)0);],
+ [AC_DEFINE([HAVE_ALTIVEC_H],,
+ [Define to 1 if you have the <altivec.h> header.])
+ have_altivec=yes; AC_MSG_RESULT(yes)],