From 0ff070bbf1575be62691eea7b9fb3ca74f2ab373 Mon Sep 17 00:00:00 2001 From: Dongxiao Xu Date: Thu, 16 Sep 2010 13:51:09 +0800 Subject: gcc: upgrade gcc for powerpc to version 4.5.0 Fix one parameter order issue for base_contains function, which impacts glibc build under new gcc. Add new judge code to determine whether is needed. This fixes the mpeg2dec build failure under new gcc. Use O2 as the optimization flag to tinylogin as it will meet segfault if compiled by gcc-4.5.0 when enable both frename-registers and Os options. Use O2 instead. Signed-off-by: Dongxiao Xu --- .../mpeg2dec/mpeg2dec-0.4.1/altivec_h_needed.patch | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 meta/recipes-multimedia/mpeg2dec/mpeg2dec-0.4.1/altivec_h_needed.patch (limited to 'meta/recipes-multimedia/mpeg2dec/mpeg2dec-0.4.1') diff --git a/meta/recipes-multimedia/mpeg2dec/mpeg2dec-0.4.1/altivec_h_needed.patch b/meta/recipes-multimedia/mpeg2dec/mpeg2dec-0.4.1/altivec_h_needed.patch new file mode 100644 index 0000000000..ecb3a9d32e --- /dev/null +++ b/meta/recipes-multimedia/mpeg2dec/mpeg2dec-0.4.1/altivec_h_needed.patch @@ -0,0 +1,41 @@ +Add new method to judge whether is needed + +The original logic will use "typedef vector int t;" to judge +whether 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 + +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 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 ], +- [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 header.]) + have_altivec=yes; AC_MSG_RESULT(yes)], -- cgit 1.2.3-korg