summaryrefslogtreecommitdiffstats
path: root/meta/packages/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/gcc')
-rw-r--r--meta/packages/gcc/gcc-cross-initial_csl-arm-2007q3.bb12
-rw-r--r--meta/packages/gcc/gcc-cross_csl-arm-2007q3.bb26
-rw-r--r--meta/packages/gcc/gcc-csl-arm-2007q3.inc51
-rw-r--r--meta/packages/gcc/gcc-csl-arm-2007q3/gcc-new-makeinfo.patch22
-rw-r--r--meta/packages/gcc/gcc-csl-arm/arm-nolibfloat.patch24
-rw-r--r--meta/packages/gcc/gcc-csl-arm/arm-softfloat.patch16
-rw-r--r--meta/packages/gcc/gcc-csl-arm/cache-amnesia.patch13
-rw-r--r--meta/packages/gcc/gcc-csl-arm/fortran-static-linking.patch48
-rw-r--r--meta/packages/gcc/gcc-csl-arm/gcc41-configure.in.patch22
-rw-r--r--meta/packages/gcc/gcc-csl-arm/pr34130.patch16
-rw-r--r--meta/packages/gcc/gcc-csl-arm/zecke-no-host-includes.patch31
-rw-r--r--meta/packages/gcc/gcc-csl-arm/zecke-xgcc-cpp.patch16
-rw-r--r--meta/packages/gcc/gcc_csl-arm-2007q3.bb5
13 files changed, 302 insertions, 0 deletions
diff --git a/meta/packages/gcc/gcc-cross-initial_csl-arm-2007q3.bb b/meta/packages/gcc/gcc-cross-initial_csl-arm-2007q3.bb
new file mode 100644
index 0000000000..99656dbe83
--- /dev/null
+++ b/meta/packages/gcc/gcc-cross-initial_csl-arm-2007q3.bb
@@ -0,0 +1,12 @@
1require gcc-cross_${PV}.bb
2require gcc-cross-initial.inc
3
4S = "${WORKDIR}/gcc-4.2"
5
6EXTRA_OECONF += "--disable-libssp --disable-bootstrap --disable-libgomp --disable-libmudflap "
7
8# Hack till we fix *libc properly
9do_stage_append() {
10 ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/
11}
12
diff --git a/meta/packages/gcc/gcc-cross_csl-arm-2007q3.bb b/meta/packages/gcc/gcc-cross_csl-arm-2007q3.bb
new file mode 100644
index 0000000000..4fde67b006
--- /dev/null
+++ b/meta/packages/gcc/gcc-cross_csl-arm-2007q3.bb
@@ -0,0 +1,26 @@
1PR = "r0"
2
3require gcc-csl-arm-2007q3.inc
4require gcc-cross4.inc
5require gcc-configure-cross.inc
6require gcc-package-cross.inc
7
8SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 "
9
10EXTRA_OECONF += "--disable-multilib --disable-libunwind-exceptions --with-mpfr=${STAGING_DIR_NATIVE}${layout_exec_prefix}"
11
12#We don't want i686 linux ending up in the CFLAGS_FOR_TARGET like this: -isystem/OE/angstrom-tmp/staging/i686-linux/usr/include
13CFLAGS = ""
14CXXFLAGS = ""
15LDFLAGS = ""
16
17# staging-linkage and cross-linkage recipes don't work anymore, so do it by hand for this backwards CSL toolchain
18do_compile_prepend() {
19 ln -sf ${STAGING_DIR_TARGET}${layout_libdir}/crt*.o ${CROSS_DIR}/${TARGET_SYS}/lib/
20 ln -sf ${STAGING_DIR_TARGET}${layout_libdir}/ld-* ${CROSS_DIR}/${TARGET_SYS}/lib/
21 ln -sf ${STAGING_DIR_TARGET}/lib/libc* ${CROSS_DIR}/${TARGET_SYS}/lib/
22 sed -i -e 's:gcc_no_link=yes:gcc_no_link=no:' ${S}/libstdc++-v3/configure
23
24}
25
26ARCH_FLAGS_FOR_TARGET += " -L${STAGING_DIR_TARGET}${layout_libdir} -isystem${STAGING_DIR_TARGET}${layout_includedir}"
diff --git a/meta/packages/gcc/gcc-csl-arm-2007q3.inc b/meta/packages/gcc/gcc-csl-arm-2007q3.inc
new file mode 100644
index 0000000000..601b4f0110
--- /dev/null
+++ b/meta/packages/gcc/gcc-csl-arm-2007q3.inc
@@ -0,0 +1,51 @@
1require gcc-common.inc
2
3BINV = "4.2.1"
4PV = "4.2.1+csl-arm-2007q3-53"
5
6FILESPATH = "${FILE_DIRNAME}/gcc-csl-arm-2007q3:${FILE_DIRNAME}/gcc-csl-arm"
7
8SRC_URI = "http://www.codesourcery.com/public/gnu_toolchain/arm-none-eabi/arm-2007q3-53-arm-none-eabi.src.tar.bz2 \
9 file://gcc-new-makeinfo.patch;patch=1 \
10# file://100-uclibc-conf.patch;patch=1 \
11# file://103-uclibc-conf-noupstream.patch;patch=1 \
12# file://200-uclibc-locale.patch;patch=1 \
13# file://203-uclibc-locale-no__x.patch;patch=1 \
14# file://204-uclibc-locale-wchar_fix.patch;patch=1 \
15# file://205-uclibc-locale-update.patch;patch=1 \
16# file://300-libstdc++-pic.patch;patch=1 \
17# file://302-c99-snprintf.patch;patch=1 \
18# file://303-c99-complex-ugly-hack.patch;patch=1 \
19# file://304-index_macro.patch;patch=1 \
20# file://305-libmudflap-susv3-legacy.patch;patch=1 \
21# file://306-libstdc++-namespace.patch;patch=1 \
22# file://307-locale_facets.patch;patch=1 \
23# file://402-libbackend_dep_gcov-iov.h.patch;patch=1 \
24# file://602-sdk-libstdc++-includes.patch;patch=1 \
25 file://gcc41-configure.in.patch;patch=1 \
26 file://arm-nolibfloat.patch;patch=1 \
27 file://arm-softfloat.patch;patch=1 \
28 file://zecke-xgcc-cpp.patch;patch=1 \
29# file://gfortran.patch;patch=1 \
30# file://fortran-static-linking.patch;patch=1 \
31# file://gcc-configure-no-fortran.patch;patch=1;pnum=1 \
32# file://gcc-new-makeinfo.patch;patch=1 \
33"
34
35
36S = "${WORKDIR}/gcc-4.2"
37
38do_unpack2() {
39 cd ${WORKDIR}
40 tar -xvjf ./arm-2007q3-53-arm-none-eabi/gcc-2007q3-53.tar.bz2
41}
42
43# Language Overrides
44FORTRAN = ""
45#FORTRAN_linux-gnueabi = ",fortran"
46#JAVA = ",java"
47
48EXTRA_OECONF_BASE = "--enable-libssp --disable-bootstrap --disable-libgomp --disable-libmudflap"
49ARM_INSTRUCTION_SET = "arm"
50
51addtask unpack2 after do_unpack before do_patch
diff --git a/meta/packages/gcc/gcc-csl-arm-2007q3/gcc-new-makeinfo.patch b/meta/packages/gcc/gcc-csl-arm-2007q3/gcc-new-makeinfo.patch
new file mode 100644
index 0000000000..b59bd76c85
--- /dev/null
+++ b/meta/packages/gcc/gcc-csl-arm-2007q3/gcc-new-makeinfo.patch
@@ -0,0 +1,22 @@
1--- /tmp/configure 2008-05-18 12:57:11.378648834 +0200
2+++ gcc-4.2/configure 2008-05-18 12:58:38.309478684 +0200
3@@ -3776,7 +3776,7 @@
4 # For an installed makeinfo, we require it to be from texinfo 4.4 or
5 # higher, else we use the "missing" dummy.
6 if ${MAKEINFO} --version \
7- | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[4-9]|[5-9])' >/dev/null 2>&1; then
8+ | egrep 'texinfo[^0-9]*(4\.([6-9]|[1-9][0-9])|[5-9]|[1-9][0-9])' >/dev/null 2>&1; then
9 :
10 else
11 MAKEINFO="$MISSING makeinfo"
12--- /tmp/configure.in 2008-05-18 12:57:32.665314708 +0200
13+++ gcc-4.2/configure.in 2008-05-18 12:59:03.000000000 +0200
14@@ -2271,7 +2271,7 @@
15 # For an installed makeinfo, we require it to be from texinfo 4.4 or
16 # higher, else we use the "missing" dummy.
17 if ${MAKEINFO} --version \
18- | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[4-9]|[5-9])' >/dev/null 2>&1; then
19+ | egrep 'texinfo[^0-9]*(4\.([6-9]|[1-9][0-9])|[5-9]|[1-9][0-9])' >/dev/null 2>&1; then
20 :
21 else
22 MAKEINFO="$MISSING makeinfo"
diff --git a/meta/packages/gcc/gcc-csl-arm/arm-nolibfloat.patch b/meta/packages/gcc/gcc-csl-arm/arm-nolibfloat.patch
new file mode 100644
index 0000000000..c4897c0330
--- /dev/null
+++ b/meta/packages/gcc/gcc-csl-arm/arm-nolibfloat.patch
@@ -0,0 +1,24 @@
1# Dimitry Andric <dimitry@andric.com>, 2004-05-01
2#
3# * Removed the extra -lfloat option from LIBGCC_SPEC, since it isn't needed
4# anymore. (The required functions are now in libgcc.)
5#
6# Fixes errors like
7# arm-softfloat-linux-gnu/3.4.0/../../../../arm-softfloat-linux-gnu/bin/ld: cannot find -lfloat
8# collect2: ld returned 1 exit status
9# make[2]: *** [arm-softfloat-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/iconvdata/ISO8859-1.so] Error 1
10# when building glibc-2.3.3 with gcc-3.4.0 for arm-softfloat
11
12Index: gcc-4.0.2/gcc/config/arm/linux-elf.h
13===================================================================
14--- gcc-4.0.2.orig/gcc/config/arm/linux-elf.h 2005-03-04 16:14:01.000000000 +0000
15+++ gcc-4.0.2/gcc/config/arm/linux-elf.h 2005-11-11 18:02:54.000000000 +0000
16@@ -56,7 +56,7 @@
17 %{shared:-lc} \
18 %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
19
20-#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc"
21+#define LIBGCC_SPEC "-lgcc"
22
23 /* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add
24 the GNU/Linux magical crtbegin.o file (see crtstuff.c) which
diff --git a/meta/packages/gcc/gcc-csl-arm/arm-softfloat.patch b/meta/packages/gcc/gcc-csl-arm/arm-softfloat.patch
new file mode 100644
index 0000000000..5e1edd9208
--- /dev/null
+++ b/meta/packages/gcc/gcc-csl-arm/arm-softfloat.patch
@@ -0,0 +1,16 @@
1Index: gcc-4.0.2/gcc/config/arm/t-linux
2===================================================================
3--- gcc-4.0.2.orig/gcc/config/arm/t-linux 2004-05-15 12:41:35.000000000 +0000
4+++ gcc-4.0.2/gcc/config/arm/t-linux 2005-11-11 16:07:53.000000000 +0000
5@@ -4,7 +4,10 @@
6 LIBGCC2_DEBUG_CFLAGS = -g0
7
8 LIB1ASMSRC = arm/lib1funcs.asm
9-LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx
10+LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \
11+ _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
12+ _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
13+ _fixsfsi _fixunssfsi _floatdidf _floatdisf _floatundisf _floatundidf
14
15 # MULTILIB_OPTIONS = mhard-float/msoft-float
16 # MULTILIB_DIRNAMES = hard-float soft-float
diff --git a/meta/packages/gcc/gcc-csl-arm/cache-amnesia.patch b/meta/packages/gcc/gcc-csl-arm/cache-amnesia.patch
new file mode 100644
index 0000000000..ef7cd111c5
--- /dev/null
+++ b/meta/packages/gcc/gcc-csl-arm/cache-amnesia.patch
@@ -0,0 +1,13 @@
1diff --git a/gcc/configure b/gcc/configure
2index 44620ab..6e1830c 100755
3--- a/gcc/configure
4+++ b/gcc/configure
5@@ -12272,7 +12272,7 @@ else
6 esac
7 saved_CFLAGS="${CFLAGS}"
8 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
9- ${realsrcdir}/configure \
10+ CONFIG_SITE= ${realsrcdir}/configure --cache-file=./other.cache \
11 --enable-languages=${enable_languages-all} \
12 --target=$target_alias --host=$build_alias --build=$build_alias
13 CFLAGS="${saved_CFLAGS}"
diff --git a/meta/packages/gcc/gcc-csl-arm/fortran-static-linking.patch b/meta/packages/gcc/gcc-csl-arm/fortran-static-linking.patch
new file mode 100644
index 0000000000..3dd6321dc3
--- /dev/null
+++ b/meta/packages/gcc/gcc-csl-arm/fortran-static-linking.patch
@@ -0,0 +1,48 @@
1f951 (fortran) links to MPFR and GMP of our staging area but when executing
2the command the libs can not be found. Use rpath like all the other apps in
3our staging bin/ directory.
4
5Patch the configure to avoid the regeneration...
6
7Index: gcc-4.2.2/configure
8===================================================================
9--- gcc-4.2.2.orig/configure 2008-01-15 23:23:41.000000000 +0100
10+++ gcc-4.2.2/configure 2008-01-15 23:25:20.000000000 +0100
11@@ -2278,14 +2278,14 @@
12
13
14 if test "x$with_mpfr" != x; then
15- gmplibs="-L$with_mpfr/lib $gmplibs"
16+ gmplibs="-static -L$with_mpfr/lib $gmplibs"
17 gmpinc="-I$with_mpfr/include"
18 fi
19 if test "x$with_mpfr_include" != x; then
20 gmpinc="-I$with_mpfr_include"
21 fi
22 if test "x$with_mpfr_lib" != x; then
23- gmplibs="-L$with_mpfr_lib $gmplibs"
24+ gmplibs="-static -L$with_mpfr_lib $gmplibs"
25 fi
26
27 # Specify a location for gmp
28Index: gcc-4.2.2/configure.in
29===================================================================
30--- gcc-4.2.2.orig/configure.in 2008-01-15 23:23:41.000000000 +0100
31+++ gcc-4.2.2/configure.in 2008-01-15 23:24:36.000000000 +0100
32@@ -1066,14 +1066,14 @@
33 AC_ARG_WITH(mpfr_lib, [ --with-mpfr-lib=PATH Specify the directory for the installed MPFR library])
34
35 if test "x$with_mpfr" != x; then
36- gmplibs="-L$with_mpfr/lib $gmplibs"
37+ gmplibs="-static -L$with_mpfr/lib $gmplibs"
38 gmpinc="-I$with_mpfr/include"
39 fi
40 if test "x$with_mpfr_include" != x; then
41 gmpinc="-I$with_mpfr_include"
42 fi
43 if test "x$with_mpfr_lib" != x; then
44- gmplibs="-L$with_mpfr_lib $gmplibs"
45+ gmplibs="-static -L$with_mpfr_lib $gmplibs"
46 fi
47
48 # Specify a location for gmp
diff --git a/meta/packages/gcc/gcc-csl-arm/gcc41-configure.in.patch b/meta/packages/gcc/gcc-csl-arm/gcc41-configure.in.patch
new file mode 100644
index 0000000000..3d33bcb978
--- /dev/null
+++ b/meta/packages/gcc/gcc-csl-arm/gcc41-configure.in.patch
@@ -0,0 +1,22 @@
1--- gcc-3.4.4/configure.in.orig 2005-08-09 19:57:51.504323183 -0700
2+++ gcc-3.4.4/configure.in 2005-08-09 20:00:12.073168623 -0700
3@@ -1907,7 +1907,7 @@
4 *) gxx_include_dir=${with_gxx_include_dir} ;;
5 esac
6
7-FLAGS_FOR_TARGET=
8+FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET"
9 case " $target_configdirs " in
10 *" newlib "*)
11 case " $target_configargs " in
12--- gcc-3.4.4/configure.orig 2005-08-09 21:02:29.668360660 -0700
13+++ gcc-3.4.4/configure 2005-08-09 21:02:50.157649970 -0700
14@@ -2669,7 +2669,7 @@
15 *) gxx_include_dir=${with_gxx_include_dir} ;;
16 esac
17
18-FLAGS_FOR_TARGET=
19+FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET"
20 case " $target_configdirs " in
21 *" newlib "*)
22 case " $target_configargs " in
diff --git a/meta/packages/gcc/gcc-csl-arm/pr34130.patch b/meta/packages/gcc/gcc-csl-arm/pr34130.patch
new file mode 100644
index 0000000000..415335f4b4
--- /dev/null
+++ b/meta/packages/gcc/gcc-csl-arm/pr34130.patch
@@ -0,0 +1,16 @@
1Index: gcc-4.1.2/gcc/fold-const.c
2===================================================================
3--- gcc-4.1.2.orig/gcc/fold-const.c 2007-11-21 18:53:42.000000000 +0100
4+++ gcc-4.1.2/gcc/fold-const.c 2007-11-21 18:56:26.000000000 +0100
5@@ -5339,7 +5339,10 @@
6 }
7 break;
8 }
9- /* FALLTHROUGH */
10+ /* If the constant is negative, we cannot simplify this. */
11+ if (tree_int_cst_sgn (c) == -1)
12+ break;
13+ /* FALLTHROUGH */
14 case NEGATE_EXPR:
15 if ((t1 = extract_muldiv (op0, c, code, wide_type)) != 0)
16 return fold_build1 (tcode, ctype, fold_convert (ctype, t1));
diff --git a/meta/packages/gcc/gcc-csl-arm/zecke-no-host-includes.patch b/meta/packages/gcc/gcc-csl-arm/zecke-no-host-includes.patch
new file mode 100644
index 0000000000..6afb10d6ef
--- /dev/null
+++ b/meta/packages/gcc/gcc-csl-arm/zecke-no-host-includes.patch
@@ -0,0 +1,31 @@
1Index: gcc-4.0.2/gcc/c-incpath.c
2===================================================================
3--- gcc-4.0.2.orig/gcc/c-incpath.c 2005-01-23 16:05:27.000000000 +0100
4+++ gcc-4.0.2/gcc/c-incpath.c 2006-05-15 21:23:02.000000000 +0200
5@@ -350,6 +350,26 @@
6 p->construct = 0;
7 p->user_supplied_p = user_supplied_p;
8
9+#ifdef CROSS_COMPILE
10+ /* A common error when cross compiling is including
11+ host headers. This code below will try to fail fast
12+ for cross compiling. Currently we consider /usr/include,
13+ /opt/include and /sw/include as harmful. */
14+ {
15+ /* printf("Adding Path: %s\n", p->name ); */
16+ if( strstr(p->name, "/usr/include" ) == p->name ) {
17+ fprintf(stderr, _("CROSS COMPILE Badness: /usr/include in INCLUDEPATH: %s\n"), p->name);
18+ abort();
19+ } else if( strstr(p->name, "/sw/include") == p->name ) {
20+ fprintf(stderr, _("CROSS COMPILE Badness: /sw/include in INCLUDEPATH: %s\n"), p->name);
21+ abort();
22+ } else if( strstr(p->name, "/opt/include") == p->name ) {
23+ fprintf(stderr, _("CROSS COMPILE Badness: /opt/include in INCLUDEPATH: %s\n"), p->name);
24+ abort();
25+ }
26+ }
27+#endif
28+
29 add_cpp_dir_path (p, chain);
30 }
31
diff --git a/meta/packages/gcc/gcc-csl-arm/zecke-xgcc-cpp.patch b/meta/packages/gcc/gcc-csl-arm/zecke-xgcc-cpp.patch
new file mode 100644
index 0000000000..921cab6e18
--- /dev/null
+++ b/meta/packages/gcc/gcc-csl-arm/zecke-xgcc-cpp.patch
@@ -0,0 +1,16 @@
1upstream: n/a
2comment: Use the preprocessor we have just compiled instead the one of
3the system. There might be incompabilities between us and them.
4
5Index: gcc-4.1.1/Makefile.in
6===================================================================
7--- gcc-4.1.1.orig/Makefile.in 2006-08-06 13:32:44.000000000 +0200
8+++ gcc-4.1.1/Makefile.in 2006-08-06 13:32:46.000000000 +0200
9@@ -194,6 +194,7 @@
10 AS="$(COMPILER_AS_FOR_TARGET)"; export AS; \
11 CC="$(CC_FOR_TARGET)"; export CC; \
12 CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
13+ CPP="$(CC_FOR_TARGET) -E"; export CCP; \
14 CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
15 CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \
16 CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
diff --git a/meta/packages/gcc/gcc_csl-arm-2007q3.bb b/meta/packages/gcc/gcc_csl-arm-2007q3.bb
new file mode 100644
index 0000000000..d610713177
--- /dev/null
+++ b/meta/packages/gcc/gcc_csl-arm-2007q3.bb
@@ -0,0 +1,5 @@
1PR = "r0"
2
3require gcc-${PV}.inc
4require gcc-configure-target.inc
5require gcc-package-target.inc