diff options
author | Dongxiao Xu <dongxiao.xu@intel.com> | 2010-09-16 13:51:09 +0800 |
---|---|---|
committer | Saul Wold <Saul.Wold@intel.com> | 2010-09-17 11:41:58 -0700 |
commit | 0ff070bbf1575be62691eea7b9fb3ca74f2ab373 (patch) | |
tree | 225ec6b34647a07998183aff261c1afde493740c | |
parent | 8e9caafd0b94016568dfccf969a0e326f3645fa6 (diff) | |
download | openembedded-core-0ff070bbf1575be62691eea7b9fb3ca74f2ab373.tar.gz openembedded-core-0ff070bbf1575be62691eea7b9fb3ca74f2ab373.tar.bz2 openembedded-core-0ff070bbf1575be62691eea7b9fb3ca74f2ab373.tar.xz openembedded-core-0ff070bbf1575be62691eea7b9fb3ca74f2ab373.zip |
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 <altivec.h> 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 <dongxiao.xu@intel.com>
27 files changed, 89 insertions, 27 deletions
diff --git a/meta/conf/distro/include/poky-default.inc b/meta/conf/distro/include/poky-default.inc index 42dd67c68..0dabeec27 100644 --- a/meta/conf/distro/include/poky-default.inc +++ b/meta/conf/distro/include/poky-default.inc @@ -16,7 +16,6 @@ PREFERRED_PROVIDER_virtual/${SDK_PREFIX}libc-for-gcc-nativesdk ?= "${POKYLIBC}-n GCCVERSION ?= "4.5.0" -GCCVERSION_powerpc ?= "4.3.3" GCCVERSION_mips ?= "4.3.3" SDKGCCVERSION ?= "4.5.0" BINUVERSION ?= "2.20.1" diff --git a/meta/recipes-core/tinylogin/tinylogin-1.4/use_O2_option.patch b/meta/recipes-core/tinylogin/tinylogin-1.4/use_O2_option.patch new file mode 100644 index 000000000..dc5bc3f12 --- /dev/null +++ b/meta/recipes-core/tinylogin/tinylogin-1.4/use_O2_option.patch @@ -0,0 +1,19 @@ +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 + diff --git a/meta/recipes-core/tinylogin/tinylogin_1.4.bb b/meta/recipes-core/tinylogin/tinylogin_1.4.bb index ad254bff6..3daeac004 100644 --- a/meta/recipes-core/tinylogin/tinylogin_1.4.bb +++ b/meta/recipes-core/tinylogin/tinylogin_1.4.bb @@ -5,13 +5,14 @@ changing passwords, and otherwise maintaining users \ 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 = "" diff --git a/meta/recipes-devtools/gcc/gcc-configure-common.inc b/meta/recipes-devtools/gcc/gcc-configure-common.inc index 5a55025ac..d86cb9a0b 100644 --- a/meta/recipes-devtools/gcc/gcc-configure-common.inc +++ b/meta/recipes-devtools/gcc/gcc-configure-common.inc @@ -17,7 +17,8 @@ LANGUAGES ?= "c,c++${FORTRAN}${JAVA}" # 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 ?= "" diff --git a/meta/recipes-devtools/gcc/gcc-cross-canadian_4.3.3.bb b/meta/recipes-devtools/gcc/gcc-cross-canadian_4.3.3.bb index 981452b7a..87cd27a95 100644 --- a/meta/recipes-devtools/gcc/gcc-cross-canadian_4.3.3.bb +++ b/meta/recipes-devtools/gcc/gcc-cross-canadian_4.3.3.bb @@ -5,7 +5,7 @@ require gcc-cross-canadian.inc require gcc-configure-sdk.inc require gcc-package-sdk.inc -PR = "r17" +PR = "r18" DEPENDS += "gmp-nativesdk mpfr-nativesdk" RDEPENDS_${PN} += "mpfr-nativesdk" diff --git a/meta/recipes-devtools/gcc/gcc-cross-canadian_4.5.0.bb b/meta/recipes-devtools/gcc/gcc-cross-canadian_4.5.0.bb index dd1941213..e1a8e970d 100644 --- a/meta/recipes-devtools/gcc/gcc-cross-canadian_4.5.0.bb +++ b/meta/recipes-devtools/gcc/gcc-cross-canadian_4.5.0.bb @@ -5,7 +5,7 @@ require gcc-cross-canadian.inc require gcc-configure-sdk.inc require gcc-package-sdk.inc -PR = "r6" +PR = "r7" DEPENDS += "gmp-nativesdk mpfr-nativesdk libmpc-nativesdk elfutils-nativesdk" RDEPENDS_${PN} += "mpfr-nativesdk libmpc-nativesdk elfutils-nativesdk" diff --git a/meta/recipes-devtools/gcc/gcc-cross-initial_4.3.3.bb b/meta/recipes-devtools/gcc/gcc-cross-initial_4.3.3.bb index b2c257d9d..38e0964fe 100644 --- a/meta/recipes-devtools/gcc/gcc-cross-initial_4.3.3.bb +++ b/meta/recipes-devtools/gcc/gcc-cross-initial_4.3.3.bb @@ -1,5 +1,5 @@ require gcc-cross_${PV}.bb require gcc-cross-initial.inc -PR = "r2" +PR = "r3" diff --git a/meta/recipes-devtools/gcc/gcc-cross-initial_4.5.0.bb b/meta/recipes-devtools/gcc/gcc-cross-initial_4.5.0.bb index 7ed31956c..e05fb346e 100644 --- a/meta/recipes-devtools/gcc/gcc-cross-initial_4.5.0.bb +++ b/meta/recipes-devtools/gcc/gcc-cross-initial_4.5.0.bb @@ -1,5 +1,5 @@ require gcc-cross_${PV}.bb require gcc-cross-initial.inc -PR = "r7" +PR = "r8" diff --git a/meta/recipes-devtools/gcc/gcc-cross-intermediate_4.3.3.bb b/meta/recipes-devtools/gcc/gcc-cross-intermediate_4.3.3.bb index 10681dad4..e65d5df67 100644 --- a/meta/recipes-devtools/gcc/gcc-cross-intermediate_4.3.3.bb +++ b/meta/recipes-devtools/gcc/gcc-cross-intermediate_4.3.3.bb @@ -1,4 +1,4 @@ require gcc-cross_${PV}.bb require gcc-cross-intermediate.inc -PR = "r2" +PR = "r3" diff --git a/meta/recipes-devtools/gcc/gcc-cross-intermediate_4.5.0.bb b/meta/recipes-devtools/gcc/gcc-cross-intermediate_4.5.0.bb index 702229d2f..e0147743e 100644 --- a/meta/recipes-devtools/gcc/gcc-cross-intermediate_4.5.0.bb +++ b/meta/recipes-devtools/gcc/gcc-cross-intermediate_4.5.0.bb @@ -1,4 +1,4 @@ require gcc-cross_${PV}.bb require gcc-cross-intermediate.inc -PR = "r7" +PR = "r8" diff --git a/meta/recipes-devtools/gcc/gcc-cross-kernel-3.4.4_csl-arm-2005q3.bb b/meta/recipes-devtools/gcc/gcc-cross-kernel-3.4.4_csl-arm-2005q3.bb index bee82d045..675d3e44a 100644 --- a/meta/recipes-devtools/gcc/gcc-cross-kernel-3.4.4_csl-arm-2005q3.bb +++ b/meta/recipes-devtools/gcc/gcc-cross-kernel-3.4.4_csl-arm-2005q3.bb @@ -9,7 +9,7 @@ require gcc-cross-kernel.inc DEFAULT_PREFERENCE = "-1" -PR = "r2" +PR = "r3" SRC_URI += "file://gcc-3.4.4-makefile-fix.patch;patch=1" diff --git a/meta/recipes-devtools/gcc/gcc-cross_4.3.3.bb b/meta/recipes-devtools/gcc/gcc-cross_4.3.3.bb index 36f91d022..d22fb9ed2 100644 --- a/meta/recipes-devtools/gcc/gcc-cross_4.3.3.bb +++ b/meta/recipes-devtools/gcc/gcc-cross_4.3.3.bb @@ -1,4 +1,4 @@ -PR = "r15" +PR = "r16" require gcc-${PV}.inc require gcc-cross4.inc diff --git a/meta/recipes-devtools/gcc/gcc-cross_4.5.0.bb b/meta/recipes-devtools/gcc/gcc-cross_4.5.0.bb index 2a0772841..224666359 100644 --- a/meta/recipes-devtools/gcc/gcc-cross_4.5.0.bb +++ b/meta/recipes-devtools/gcc/gcc-cross_4.5.0.bb @@ -1,4 +1,4 @@ -PR = "r7" +PR = "r8" require gcc-${PV}.inc require gcc-cross4.inc diff --git a/meta/recipes-devtools/gcc/gcc-cross_csl-arm-2008q1.bb b/meta/recipes-devtools/gcc/gcc-cross_csl-arm-2008q1.bb index 2fe7704ad..7cef7e7a3 100644 --- a/meta/recipes-devtools/gcc/gcc-cross_csl-arm-2008q1.bb +++ b/meta/recipes-devtools/gcc/gcc-cross_csl-arm-2008q1.bb @@ -1,4 +1,4 @@ -PR = "r3" +PR = "r4" require gcc-csl-arm-2008q1.inc require gcc-cross4.inc diff --git a/meta/recipes-devtools/gcc/gcc-crosssdk-initial_4.3.3.bb b/meta/recipes-devtools/gcc/gcc-crosssdk-initial_4.3.3.bb index e804b4b01..44dd50dcb 100644 --- a/meta/recipes-devtools/gcc/gcc-crosssdk-initial_4.3.3.bb +++ b/meta/recipes-devtools/gcc/gcc-crosssdk-initial_4.3.3.bb @@ -1,3 +1,3 @@ require gcc-cross-initial_${PV}.bb require gcc-crosssdk-initial.inc -PR = "r3" +PR = "r4" diff --git a/meta/recipes-devtools/gcc/gcc-crosssdk-initial_4.5.0.bb b/meta/recipes-devtools/gcc/gcc-crosssdk-initial_4.5.0.bb index 9ee18ecfe..9daa2925b 100644 --- a/meta/recipes-devtools/gcc/gcc-crosssdk-initial_4.5.0.bb +++ b/meta/recipes-devtools/gcc/gcc-crosssdk-initial_4.5.0.bb @@ -1,4 +1,4 @@ require gcc-cross-initial_${PV}.bb require gcc-crosssdk-initial.inc -PR = "r7" +PR = "r8" diff --git a/meta/recipes-devtools/gcc/gcc-crosssdk-intermediate_4.3.3.bb b/meta/recipes-devtools/gcc/gcc-crosssdk-intermediate_4.3.3.bb index 5f01473ad..ae439622a 100644 --- a/meta/recipes-devtools/gcc/gcc-crosssdk-intermediate_4.3.3.bb +++ b/meta/recipes-devtools/gcc/gcc-crosssdk-intermediate_4.3.3.bb @@ -1,3 +1,3 @@ require gcc-cross-intermediate_${PV}.bb require gcc-crosssdk-intermediate.inc -PR = "r6" +PR = "r7" diff --git a/meta/recipes-devtools/gcc/gcc-crosssdk-intermediate_4.5.0.bb b/meta/recipes-devtools/gcc/gcc-crosssdk-intermediate_4.5.0.bb index 28dbbab9f..eeb2d87d5 100644 --- a/meta/recipes-devtools/gcc/gcc-crosssdk-intermediate_4.5.0.bb +++ b/meta/recipes-devtools/gcc/gcc-crosssdk-intermediate_4.5.0.bb @@ -1,4 +1,4 @@ require gcc-cross-intermediate_${PV}.bb require gcc-crosssdk-intermediate.inc -PR = "r7" +PR = "r8" diff --git a/meta/recipes-devtools/gcc/gcc-crosssdk_4.3.3.bb b/meta/recipes-devtools/gcc/gcc-crosssdk_4.3.3.bb index 92a3f1138..ffbd67159 100644 --- a/meta/recipes-devtools/gcc/gcc-crosssdk_4.3.3.bb +++ b/meta/recipes-devtools/gcc/gcc-crosssdk_4.3.3.bb @@ -1,3 +1,3 @@ require gcc-cross_${PV}.bb require gcc-crosssdk.inc -PR="r1" +PR="r2" diff --git a/meta/recipes-devtools/gcc/gcc-crosssdk_4.5.0.bb b/meta/recipes-devtools/gcc/gcc-crosssdk_4.5.0.bb index 31ebe8097..ffb0739c5 100644 --- a/meta/recipes-devtools/gcc/gcc-crosssdk_4.5.0.bb +++ b/meta/recipes-devtools/gcc/gcc-crosssdk_4.5.0.bb @@ -1,4 +1,4 @@ require gcc-cross_${PV}.bb require gcc-crosssdk.inc -PR = "r7" +PR = "r8" diff --git a/meta/recipes-devtools/gcc/gcc-runtime_4.3.3.bb b/meta/recipes-devtools/gcc/gcc-runtime_4.3.3.bb index 543bf24b7..8c7c123f2 100644 --- a/meta/recipes-devtools/gcc/gcc-runtime_4.3.3.bb +++ b/meta/recipes-devtools/gcc/gcc-runtime_4.3.3.bb @@ -1,4 +1,4 @@ -PR = "r15" +PR = "r16" require gcc-${PV}.inc require gcc-configure-runtime.inc diff --git a/meta/recipes-devtools/gcc/gcc-runtime_4.5.0.bb b/meta/recipes-devtools/gcc/gcc-runtime_4.5.0.bb index 28bae5019..2231c4269 100644 --- a/meta/recipes-devtools/gcc/gcc-runtime_4.5.0.bb +++ b/meta/recipes-devtools/gcc/gcc-runtime_4.5.0.bb @@ -1,4 +1,4 @@ -PR = "r6" +PR = "r7" require gcc-${PV}.inc require gcc-configure-runtime.inc diff --git a/meta/recipes-devtools/gcc/gcc_4.3.3.bb b/meta/recipes-devtools/gcc/gcc_4.3.3.bb index a2ae0c0e9..ca22e0f69 100644 --- a/meta/recipes-devtools/gcc/gcc_4.3.3.bb +++ b/meta/recipes-devtools/gcc/gcc_4.3.3.bb @@ -1,4 +1,4 @@ -PR = "r8" +PR = "r9" require gcc-${PV}.inc require gcc-configure-target.inc diff --git a/meta/recipes-devtools/gcc/gcc_4.5.0.bb b/meta/recipes-devtools/gcc/gcc_4.5.0.bb index e133c5bac..45bbb01e4 100644 --- a/meta/recipes-devtools/gcc/gcc_4.5.0.bb +++ b/meta/recipes-devtools/gcc/gcc_4.5.0.bb @@ -1,4 +1,4 @@ -PR = "r6" +PR = "r7" require gcc-${PV}.inc require gcc-configure-target.inc diff --git a/meta/recipes-devtools/gcc/gcc_csl-arm-2008q1.bb b/meta/recipes-devtools/gcc/gcc_csl-arm-2008q1.bb index 832167ca4..4999c6a53 100644 --- a/meta/recipes-devtools/gcc/gcc_csl-arm-2008q1.bb +++ b/meta/recipes-devtools/gcc/gcc_csl-arm-2008q1.bb @@ -1,4 +1,4 @@ -PR = "r1" +PR = "r2" require gcc-${PV}.inc require gcc-configure-target.inc 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 000000000..ecb3a9d32 --- /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 <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)], diff --git a/meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.4.1.bb b/meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.4.1.bb index a769e5a70..4aa6f8cc6 100644 --- a/meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.4.1.bb +++ b/meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.4.1.bb @@ -8,9 +8,10 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ DEPENDS = "virtual/libx11" -PR = "r0" +PR = "r1" -SRC_URI = "http://libmpeg2.sourceforge.net/files/mpeg2dec-${PV}.tar.gz" +SRC_URI = "http://libmpeg2.sourceforge.net/files/mpeg2dec-${PV}.tar.gz \ + file://altivec_h_needed.patch" inherit autotools pkgconfig |