summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2006-12-20 13:38:24 +0000
committerRichard Purdie <richard@openedhand.com>2006-12-20 13:38:24 +0000
commit1a4a231d88294f895ab6488508c93bed595edd3c (patch)
tree7638f481b1d95f03d313831727e0df880623386e
parent1292db8782c761fef640b09eef22bcef505985cb (diff)
downloadpoky-1a4a231d88294f895ab6488508c93bed595edd3c.tar.gz
gcc4: Sync with OE.dev
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1063 311d38ba-8fff-0310-9ca6-ca027cbcb966
-rw-r--r--meta/packages/gcc/gcc-4.1.1/fix-ICE-in-arm_unwind_emit_set.diff18
-rw-r--r--meta/packages/gcc/gcc-4.1.1/gcc-4.1.1-pr13685-1.patch26
-rw-r--r--meta/packages/gcc/gcc-4.1.1/unbreak-armv4t.patch12
-rw-r--r--meta/packages/gcc/gcc-cross_4.1.1.bb2
-rw-r--r--meta/packages/gcc/gcc4-build.inc97
-rw-r--r--meta/packages/gcc/gcc_4.1.1.bb12
6 files changed, 69 insertions, 98 deletions
diff --git a/meta/packages/gcc/gcc-4.1.1/fix-ICE-in-arm_unwind_emit_set.diff b/meta/packages/gcc/gcc-4.1.1/fix-ICE-in-arm_unwind_emit_set.diff
new file mode 100644
index 0000000000..568e15abff
--- /dev/null
+++ b/meta/packages/gcc/gcc-4.1.1/fix-ICE-in-arm_unwind_emit_set.diff
@@ -0,0 +1,18 @@
1--- trunk/gcc/config/arm/arm.c 2006/09/19 13:18:27 117055
2+++ trunk/gcc/config/arm/arm.c 2006/09/19 13:19:24 117056
3@@ -15415,6 +15415,15 @@
4 /* Move from sp to reg. */
5 asm_fprintf (asm_out_file, "\t.movsp %r\n", REGNO (e0));
6 }
7+ else if (GET_CODE (e1) == PLUS
8+ && GET_CODE (XEXP (e1, 0)) == REG
9+ && REGNO (XEXP (e1, 0)) == SP_REGNUM
10+ && GET_CODE (XEXP (e1, 1)) == CONST_INT)
11+ {
12+ /* Set reg to offset from sp. */
13+ asm_fprintf (asm_out_file, "\t.movsp %r, #%d\n",
14+ REGNO (e0), (int)INTVAL(XEXP (e1, 1)));
15+ }
16 else
17 abort ();
18 break;
diff --git a/meta/packages/gcc/gcc-4.1.1/gcc-4.1.1-pr13685-1.patch b/meta/packages/gcc/gcc-4.1.1/gcc-4.1.1-pr13685-1.patch
new file mode 100644
index 0000000000..a56b1307df
--- /dev/null
+++ b/meta/packages/gcc/gcc-4.1.1/gcc-4.1.1-pr13685-1.patch
@@ -0,0 +1,26 @@
1Submitted By: Alexander E. Patrakov
2Date: 2006-12-11
3Initial Package Version: 4.1.1
4Upstream Status: backport
5Origin: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28621
6Description: Fix crash of programs compiled with -Os -ffast-math
7(affects procps on the LiveCD)
8--- gcc-4.1.1/gcc/config/i386/i386.c
9+++ gcc-4.1.1/gcc/config/i386/i386.c
10@@ -1502,12 +1502,10 @@
11 }
12
13 /* Validate -mpreferred-stack-boundary= value, or provide default.
14- The default of 128 bits is for Pentium III's SSE __m128, but we
15- don't want additional code to keep the stack aligned when
16- optimizing for code size. */
17- ix86_preferred_stack_boundary = (optimize_size
18- ? TARGET_64BIT ? 128 : 32
19- : 128);
20+ The default of 128 bits is for Pentium III's SSE __m128, We can't
21+ change it because of optimize_size. Otherwise, we can't mix object
22+ files compiled with -Os and -On. */
23+ ix86_preferred_stack_boundary = 128;
24 if (ix86_preferred_stack_boundary_string)
25 {
26 i = atoi (ix86_preferred_stack_boundary_string);
diff --git a/meta/packages/gcc/gcc-4.1.1/unbreak-armv4t.patch b/meta/packages/gcc/gcc-4.1.1/unbreak-armv4t.patch
new file mode 100644
index 0000000000..b3399abfdb
--- /dev/null
+++ b/meta/packages/gcc/gcc-4.1.1/unbreak-armv4t.patch
@@ -0,0 +1,12 @@
1diff -urN gcc-4.1.1/gcc/config/arm/linux-eabi.h gcc-4.1.1-arm9tdmi/gcc/config/arm/linux-eabi.h
2--- gcc-4.1.1/gcc/config/arm/linux-eabi.h 2006-10-22 11:11:49.000000000 -0700
3+++ gcc-4.1.1-arm9tdmi/gcc/config/arm/linux-eabi.h 2006-10-24 21:34:01.000000000 -0700
4@@ -45,7 +45,7 @@
5 The ARM10TDMI core is the default for armv5t, so set
6 SUBTARGET_CPU_DEFAULT to achieve this. */
7 #undef SUBTARGET_CPU_DEFAULT
8-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
9+#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi
10
11 #undef SUBTARGET_EXTRA_LINK_SPEC
12 #define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux_eabi"
diff --git a/meta/packages/gcc/gcc-cross_4.1.1.bb b/meta/packages/gcc/gcc-cross_4.1.1.bb
index 4c530175f3..5721dee50b 100644
--- a/meta/packages/gcc/gcc-cross_4.1.1.bb
+++ b/meta/packages/gcc/gcc-cross_4.1.1.bb
@@ -5,7 +5,7 @@ inherit cross
5FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}" 5FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
6# NOTE: split PR. If the main .oe changes something that affects its *build* 6# NOTE: split PR. If the main .oe changes something that affects its *build*
7# remember to increment this one too. 7# remember to increment this one too.
8PR = "r6" 8PR = "r9"
9 9
10DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc gmp-native mpfr-native" 10DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc gmp-native mpfr-native"
11PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++" 11PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
diff --git a/meta/packages/gcc/gcc4-build.inc b/meta/packages/gcc/gcc4-build.inc
index 817d8b5e73..b8a214a590 100644
--- a/meta/packages/gcc/gcc4-build.inc
+++ b/meta/packages/gcc/gcc4-build.inc
@@ -1,97 +1,6 @@
1HAS_GFORTRAN = "no" 1FORTRAN = ",f95"
2HAS_GFORTRAN ?= "yes"
2HAS_G2C = "no" 3HAS_G2C = "no"
3 4
4MIRRORS_prepend () { 5include gcc3-build.inc
5${GNU_MIRROR}/gcc/releases/ ftp://gcc.gnu.org/pub/gcc/releases/
6${GNU_MIRROR}/gcc/ http://mirrors.rcn.net/pub/sourceware/gcc/releases/
7${GNU_MIRROR}/gcc/releases/ http://gcc.get-software.com/releases/
8${GNU_MIRROR}/gcc/ http://gcc.get-software.com/releases/
9}
10
11gcclibdir ?= "${libdir}/gcc"
12S = "${WORKDIR}/gcc-${PV}"
13B = "${S}/build.${HOST_SYS}.${TARGET_SYS}"
14BINV ?= "${PV}"
15
16# gcj doesn't work on some architectures
17JAVA = ",java"
18JAVA_arm = ""
19JAVA_armeb = ""
20JAVA_mipsel = ""
21JAVA_sh3 = ""
22# gcc4-build sets this to f95
23#FORTRAN ?= "f77"
24#LANGUAGES ?= "c,c++,${JAVA}"
25LANGUAGES ?= "c,c++,${JAVA}"
26
27EXTRA_OECONF = "${@['--enable-clocale=generic', ''][bb.data.getVar('USE_NLS', d, 1) != 'no']} \
28 --with-gnu-ld \
29 --enable-shared \
30 --enable-target-optspace \
31 --enable-languages=${LANGUAGES} \
32 --enable-threads=posix \
33 --enable-multilib \
34 --enable-c99 \
35 --enable-long-long \
36 --enable-symvers=gnu \
37 --enable-libstdcxx-pch \
38 --program-prefix=${TARGET_PREFIX} \
39 ${EXTRA_OECONF_PATHS} \
40 ${EXTRA_OECONF_DEP}"
41
42EXTRA_OECONF_PATHS = " \
43 --with-local-prefix=${prefix}/local \
44 --with-gxx-include-dir=${includedir}/c++/${BINV}"
45
46EXTRA_OECONF_DEP = ""
47EXTRA_OECONF_uclibc = "--disable-__cxa_atexit"
48EXTRA_OECONF_glibc = "--enable-__cxa_atexit"
49EXTRA_OECONF += "${@get_gcc_fpu_setting(bb, d)}"
50CPPFLAGS = ""
51
52# Used by configure to define additional values for FLAGS_FOR_TARGET -
53# passed to all the compilers.
54ARCH_FLAGS_FOR_TARGET = ""
55#NOTE: not tested on other platforms, the following is probably correct
56# everywhere!
57ARCH_FLAGS_FOR_TARGET_slugos = "${TARGET_CC_ARCH}"
58ARCH_FLAGS_FOR_TARGET_unslung = "${TARGET_CC_ARCH}"
59EXTRA_OEMAKE += "ARCH_FLAGS_FOR_TARGET='${ARCH_FLAGS_FOR_TARGET}'"
60
61require gcc-fpu.inc
62
63python __anonymous () {
64 import bb, re
65 if (re.match('linux-uclibc$', bb.data.getVar('TARGET_OS', d, 1)) != None):
66 bb.data.setVar('EXTRA_OECONF_DEP', '${EXTRA_OECONF_uclibc}', d)
67 elif (re.match('linux$', bb.data.getVar('TARGET_OS', d, 1)) != None):
68 bb.data.setVar('EXTRA_OECONF_DEP', '${EXTRA_OECONF_glibc}', d)
69}
70
71do_configure () {
72 # Setup these vars for cross building only
73 # ... because foo_FOR_TARGET apparently gets misinterpreted inside the
74 # gcc build stuff when the build is producing a cross compiler - i.e.
75 # when the 'current' target is the 'host' system, and the host is not
76 # the target (because the build is actually making a cross compiler!)
77 if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then
78 export CC_FOR_TARGET="${CC}"
79 export GCC_FOR_TARGET="${CC}"
80 export CXX_FOR_TARGET="${CXX}"
81 export AS_FOR_TARGET="${HOST_PREFIX}as"
82 export LD_FOR_TARGET="${HOST_PREFIX}ld"
83 export NM_FOR_TARGET="${HOST_PREFIX}nm"
84 export AR_FOR_TARGET="${HOST_PREFIX}ar"
85 export RANLIB_FOR_TARGET="${HOST_PREFIX}ranlib"
86 fi
87 export CC_FOR_BUILD="${BUILD_CC}"
88 export CXX_FOR_BUILD="${BUILD_CXX}"
89 export CFLAGS_FOR_BUILD="${BUILD_CFLAGS}"
90 export CPPFLAGS_FOR_BUILD="${BUILD_CPPFLAGS}"
91 export CXXFLAGS_FOR_BUILD="${BUILD_CXXFLAGS}"
92 export LDFLAGS_FOR_BUILD="${BUILD_LDFLAGS}"
93 export ARCH_FLAGS_FOR_TARGET="${ARCH_FLAGS_FOR_TARGET}"
94 (cd ${S} && gnu-configize) || die "failure running gnu-configize"
95 oe_runconf
96}
97 6
diff --git a/meta/packages/gcc/gcc_4.1.1.bb b/meta/packages/gcc/gcc_4.1.1.bb
index e2d3d25ea8..e32353325a 100644
--- a/meta/packages/gcc/gcc_4.1.1.bb
+++ b/meta/packages/gcc/gcc_4.1.1.bb
@@ -1,4 +1,4 @@
1PR = "r6" 1PR = "r9"
2DESCRIPTION = "The GNU cc and gcc C compilers." 2DESCRIPTION = "The GNU cc and gcc C compilers."
3HOMEPAGE = "http://www.gnu.org/software/gcc/" 3HOMEPAGE = "http://www.gnu.org/software/gcc/"
4SECTION = "devel" 4SECTION = "devel"
@@ -27,19 +27,25 @@ SRC_URI = "http://ftp.gnu.org/pub/gnu/gcc/gcc-4.1.1/gcc-4.1.1.tar.bz2 \
27 file://arm-thumb-cache.patch;patch=1 \ 27 file://arm-thumb-cache.patch;patch=1 \
28 file://ldflags.patch;patch=1 \ 28 file://ldflags.patch;patch=1 \
29 file://cse.patch;patch=1 \ 29 file://cse.patch;patch=1 \
30 file://zecke-xgcc-cpp.patch;patch=1 " 30 file://zecke-xgcc-cpp.patch;patch=1 \
31 file://unbreak-armv4t.patch;patch=1 \
32 file://fix-ICE-in-arm_unwind_emit_set.diff;patch=1 \
33 file://gcc-4.1.1-pr13685-1.patch;patch=1 \
34 "
31 35
32SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 " 36SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 "
33 37
34#Set the fortran bits 38#Set the fortran bits
39# 'fortran' or '', not 'f77' like gcc3 had
35FORTRAN = "" 40FORTRAN = ""
36HAS_GFORTRAN = "no" 41HAS_GFORTRAN = "no"
37HAS_G2C = "no" 42HAS_G2C = "no"
38 43
39#Set the java bits 44#Set the java bits
40JAVA_arm = "" 45JAVA_arm = ""
46JAVA = ""
41 47
42LANGUAGES = "c,c++" 48LANGUAGES = "c,c++${FORTRAN}${JAVA}"
43require gcc3-build.inc 49require gcc3-build.inc
44 50
45 51