summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-csl-arm
diff options
context:
space:
mode:
authorNitin A Kamble <nitin.a.kamble@intel.com>2011-05-17 08:43:56 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-05-18 14:32:47 +0100
commite080d8e18e62949c046023962ead58109dc7caef (patch)
tree03f226753c14ced2b89ab726ba11912111f6ba93 /meta/recipes-devtools/gcc/gcc-csl-arm
parent725acfad7c093708d3d7cd72f8e72fedce4335a4 (diff)
downloadpoky-e080d8e18e62949c046023962ead58109dc7caef.tar.gz
gcc: remove unused patches and move patches in proper dir
gcc: update upstream-status for patches python: update upstream-status for patches libtool: update upstream-status of patches m4: update upstream status for patches eglibc: remove unused patches eglibc: update upstream status of patches glibc: update upstream-status of patches & remove unused patches (From OE-Core rev: d10df0e5a363fe8b305ffac7e8ac231da8e07552) Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-csl-arm')
-rw-r--r--meta/recipes-devtools/gcc/gcc-csl-arm/15342.patch22
-rw-r--r--meta/recipes-devtools/gcc/gcc-csl-arm/arm-nolibfloat.patch1
-rw-r--r--meta/recipes-devtools/gcc/gcc-csl-arm/arm-softfloat.patch1
-rw-r--r--meta/recipes-devtools/gcc/gcc-csl-arm/cache-amnesia.patch13
-rw-r--r--meta/recipes-devtools/gcc/gcc-csl-arm/fortran-static-linking.patch48
-rw-r--r--meta/recipes-devtools/gcc/gcc-csl-arm/gcc-3.4.0-arm-lib1asm.patch24
-rw-r--r--meta/recipes-devtools/gcc/gcc-csl-arm/gcc-3.4.4-eabi-bigendian.patch1
-rw-r--r--meta/recipes-devtools/gcc/gcc-csl-arm/gcc-3.4.4-makefile-fix.patch1
-rw-r--r--meta/recipes-devtools/gcc/gcc-csl-arm/gcc-configure-no-fortran.patch1
-rw-r--r--meta/recipes-devtools/gcc/gcc-csl-arm/gcc-new-makeinfo.patch1
-rw-r--r--meta/recipes-devtools/gcc/gcc-csl-arm/gcc34-arm-tune.patch9
-rw-r--r--meta/recipes-devtools/gcc/gcc-csl-arm/gcc41-configure.in.patch2
-rw-r--r--meta/recipes-devtools/gcc/gcc-csl-arm/gcc_optab_arm.patch2
-rw-r--r--meta/recipes-devtools/gcc/gcc-csl-arm/gfortran.patch42
-rw-r--r--meta/recipes-devtools/gcc/gcc-csl-arm/no-libfloat.patch11
-rw-r--r--meta/recipes-devtools/gcc/gcc-csl-arm/pic-without-sl.patch303
-rw-r--r--meta/recipes-devtools/gcc/gcc-csl-arm/pr34130.patch16
-rw-r--r--meta/recipes-devtools/gcc/gcc-csl-arm/zecke-no-host-includes.patch2
-rw-r--r--meta/recipes-devtools/gcc/gcc-csl-arm/zecke-xgcc-cpp.patch1
19 files changed, 55 insertions, 446 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-csl-arm/15342.patch b/meta/recipes-devtools/gcc/gcc-csl-arm/15342.patch
deleted file mode 100644
index d0f3e72d47..0000000000
--- a/meta/recipes-devtools/gcc/gcc-csl-arm/15342.patch
+++ /dev/null
@@ -1,22 +0,0 @@
1--- gcc/gcc/regrename.c~ 2004-01-14 17:55:20.000000000 +0000
2+++ gcc/gcc/regrename.c 2005-02-28 07:24:25.893015200 +0000
3@@ -671,7 +671,8 @@
4
5 case SET:
6 scan_rtx (insn, &SET_SRC (x), class, action, OP_IN, 0);
7- scan_rtx (insn, &SET_DEST (x), class, action, OP_OUT, 0);
8+ scan_rtx (insn, &SET_DEST (x), class, action,
9+ GET_CODE (PATTERN (insn)) == COND_EXEC ? OP_INOUT : OP_OUT, 0);
10 return;
11
12 case STRICT_LOW_PART:
13@@ -696,7 +697,8 @@
14 abort ();
15
16 case CLOBBER:
17- scan_rtx (insn, &SET_DEST (x), class, action, OP_OUT, 1);
18+ scan_rtx (insn, &SET_DEST (x), class, action,
19+ GET_CODE (PATTERN (insn)) == COND_EXEC ? OP_INOUT : OP_OUT, 0);
20 return;
21
22 case EXPR_LIST:
diff --git a/meta/recipes-devtools/gcc/gcc-csl-arm/arm-nolibfloat.patch b/meta/recipes-devtools/gcc/gcc-csl-arm/arm-nolibfloat.patch
index c4897c0330..57d4a00774 100644
--- a/meta/recipes-devtools/gcc/gcc-csl-arm/arm-nolibfloat.patch
+++ b/meta/recipes-devtools/gcc/gcc-csl-arm/arm-nolibfloat.patch
@@ -1,3 +1,4 @@
1Upstream-Status: Pending
1# Dimitry Andric <dimitry@andric.com>, 2004-05-01 2# Dimitry Andric <dimitry@andric.com>, 2004-05-01
2# 3#
3# * Removed the extra -lfloat option from LIBGCC_SPEC, since it isn't needed 4# * Removed the extra -lfloat option from LIBGCC_SPEC, since it isn't needed
diff --git a/meta/recipes-devtools/gcc/gcc-csl-arm/arm-softfloat.patch b/meta/recipes-devtools/gcc/gcc-csl-arm/arm-softfloat.patch
index 5e1edd9208..9a0a691760 100644
--- a/meta/recipes-devtools/gcc/gcc-csl-arm/arm-softfloat.patch
+++ b/meta/recipes-devtools/gcc/gcc-csl-arm/arm-softfloat.patch
@@ -1,3 +1,4 @@
1Upstream-Status: Pending
1Index: gcc-4.0.2/gcc/config/arm/t-linux 2Index: gcc-4.0.2/gcc/config/arm/t-linux
2=================================================================== 3===================================================================
3--- gcc-4.0.2.orig/gcc/config/arm/t-linux 2004-05-15 12:41:35.000000000 +0000 4--- gcc-4.0.2.orig/gcc/config/arm/t-linux 2004-05-15 12:41:35.000000000 +0000
diff --git a/meta/recipes-devtools/gcc/gcc-csl-arm/cache-amnesia.patch b/meta/recipes-devtools/gcc/gcc-csl-arm/cache-amnesia.patch
deleted file mode 100644
index ef7cd111c5..0000000000
--- a/meta/recipes-devtools/gcc/gcc-csl-arm/cache-amnesia.patch
+++ /dev/null
@@ -1,13 +0,0 @@
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/recipes-devtools/gcc/gcc-csl-arm/fortran-static-linking.patch b/meta/recipes-devtools/gcc/gcc-csl-arm/fortran-static-linking.patch
deleted file mode 100644
index 3dd6321dc3..0000000000
--- a/meta/recipes-devtools/gcc/gcc-csl-arm/fortran-static-linking.patch
+++ /dev/null
@@ -1,48 +0,0 @@
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/recipes-devtools/gcc/gcc-csl-arm/gcc-3.4.0-arm-lib1asm.patch b/meta/recipes-devtools/gcc/gcc-csl-arm/gcc-3.4.0-arm-lib1asm.patch
deleted file mode 100644
index cf17da6a02..0000000000
--- a/meta/recipes-devtools/gcc/gcc-csl-arm/gcc-3.4.0-arm-lib1asm.patch
+++ /dev/null
@@ -1,24 +0,0 @@
1# Fixes errors like the following when building glibc (or any other executable
2# or shared library) when using gcc 3.4.0 for ARM with softfloat:
3#
4# .../libc_pic.os(.text+0x15834): In function `__modf': undefined reference to `__subdf3'
5# .../libc_pic.os(.text+0x158b8): In function `__modf': undefined reference to `__subdf3'
6# .../libc_pic.os(.text+0x1590c): In function `scalbn': undefined reference to `__muldf3'
7# .../libc_pic.os(.text+0x15e94): In function `__ldexpf': undefined reference to `__eqsf2'
8# .../libc_pic.os(.text+0xcee4c): In function `monstartup': undefined reference to `__fixsfsi'
9
10diff -urNd gcc-3.4.0-orig/gcc/config/arm/t-linux gcc-3.4.0/gcc/config/arm/t-linux
11--- gcc-3.4.0-orig/gcc/config/arm/t-linux 2003-09-20 23:09:07.000000000 +0200
12+++ gcc-3.4.0/gcc/config/arm/t-linux 2004-05-01 20:31:59.102846400 +0200
13@@ -4,7 +4,10 @@
14 LIBGCC2_DEBUG_CFLAGS = -g0
15
16 LIB1ASMSRC = arm/lib1funcs.asm
17-LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx
18+LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \
19+ _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
20+ _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
21+ _fixsfsi _fixunssfsi _floatdidf _floatdisf
22
23 # MULTILIB_OPTIONS = mhard-float/msoft-float
24 # MULTILIB_DIRNAMES = hard-float soft-float
diff --git a/meta/recipes-devtools/gcc/gcc-csl-arm/gcc-3.4.4-eabi-bigendian.patch b/meta/recipes-devtools/gcc/gcc-csl-arm/gcc-3.4.4-eabi-bigendian.patch
index e6cc42bb65..7453acd348 100644
--- a/meta/recipes-devtools/gcc/gcc-csl-arm/gcc-3.4.4-eabi-bigendian.patch
+++ b/meta/recipes-devtools/gcc/gcc-csl-arm/gcc-3.4.4-eabi-bigendian.patch
@@ -1,3 +1,4 @@
1Upstream-Status: Pending
1--- gcc-2005q3/gcc/config/arm/linux-eabi.h~ 2007-07-10 09:19:47.000000000 +0930 2--- gcc-2005q3/gcc/config/arm/linux-eabi.h~ 2007-07-10 09:19:47.000000000 +0930
2+++ gcc-2005q3/gcc/config/arm/linux-eabi.h 2007-07-10 10:42:37.000000000 +0930 3+++ gcc-2005q3/gcc/config/arm/linux-eabi.h 2007-07-10 10:42:37.000000000 +0930
3@@ -48,7 +48,8 @@ 4@@ -48,7 +48,8 @@
diff --git a/meta/recipes-devtools/gcc/gcc-csl-arm/gcc-3.4.4-makefile-fix.patch b/meta/recipes-devtools/gcc/gcc-csl-arm/gcc-3.4.4-makefile-fix.patch
index 74c1f26833..9c53173413 100644
--- a/meta/recipes-devtools/gcc/gcc-csl-arm/gcc-3.4.4-makefile-fix.patch
+++ b/meta/recipes-devtools/gcc/gcc-csl-arm/gcc-3.4.4-makefile-fix.patch
@@ -1,3 +1,4 @@
1Upstream-Status: Pending
1--- gcc-3.4.4/gcc/Makefile.in.orig 2005-07-25 21:00:37 +0200 2--- gcc-3.4.4/gcc/Makefile.in.orig 2005-07-25 21:00:37 +0200
2+++ gcc-3.4.4/gcc/Makefile.in 2005-07-25 21:01:19 +0200 3+++ gcc-3.4.4/gcc/Makefile.in 2005-07-25 21:01:19 +0200
3@@ -304,7 +304,7 @@ 4@@ -304,7 +304,7 @@
diff --git a/meta/recipes-devtools/gcc/gcc-csl-arm/gcc-configure-no-fortran.patch b/meta/recipes-devtools/gcc/gcc-csl-arm/gcc-configure-no-fortran.patch
index c845503303..d9aed34bf3 100644
--- a/meta/recipes-devtools/gcc/gcc-csl-arm/gcc-configure-no-fortran.patch
+++ b/meta/recipes-devtools/gcc/gcc-csl-arm/gcc-configure-no-fortran.patch
@@ -1,3 +1,4 @@
1Upstream-Status: Inappropriate [embedded specific]
1--- tmp/configure.in.orig 2006-09-05 17:50:48.000000000 +0100 2--- tmp/configure.in.orig 2006-09-05 17:50:48.000000000 +0100
2+++ tmp/configure.in 2006-09-05 17:50:48.000000000 +0100 3+++ tmp/configure.in 2006-09-05 17:50:48.000000000 +0100
3@@ -157,7 +157,6 @@ 4@@ -157,7 +157,6 @@
diff --git a/meta/recipes-devtools/gcc/gcc-csl-arm/gcc-new-makeinfo.patch b/meta/recipes-devtools/gcc/gcc-csl-arm/gcc-new-makeinfo.patch
index b984605af7..bd3197dc67 100644
--- a/meta/recipes-devtools/gcc/gcc-csl-arm/gcc-new-makeinfo.patch
+++ b/meta/recipes-devtools/gcc/gcc-csl-arm/gcc-new-makeinfo.patch
@@ -1,3 +1,4 @@
1Upstream-Status: Inappropriate [embedded specific]
1--- 2---
2 configure | 2 +- 3 configure | 2 +-
3 configure.in | 2 +- 4 configure.in | 2 +-
diff --git a/meta/recipes-devtools/gcc/gcc-csl-arm/gcc34-arm-tune.patch b/meta/recipes-devtools/gcc/gcc-csl-arm/gcc34-arm-tune.patch
deleted file mode 100644
index cdb20bef9b..0000000000
--- a/meta/recipes-devtools/gcc/gcc-csl-arm/gcc34-arm-tune.patch
+++ /dev/null
@@ -1,9 +0,0 @@
1--- gcc-3.4.0/gcc/config/arm/linux-elf.h.arm-tune 2004-01-31 01:18:11.000000000 -0500
2+++ gcc-3.4.0/gcc/config/arm/linux-elf.h 2004-04-24 18:19:10.000000000 -0400
3@@ -126,3 +126,6 @@
4
5 #define LINK_GCC_C_SEQUENCE_SPEC \
6 "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
7+
8+/* Tune for XScale. */
9+#define TARGET_TUNE_DEFAULT TARGET_CPU_xscale
diff --git a/meta/recipes-devtools/gcc/gcc-csl-arm/gcc41-configure.in.patch b/meta/recipes-devtools/gcc/gcc-csl-arm/gcc41-configure.in.patch
index 3d33bcb978..88b0611a2f 100644
--- a/meta/recipes-devtools/gcc/gcc-csl-arm/gcc41-configure.in.patch
+++ b/meta/recipes-devtools/gcc/gcc-csl-arm/gcc41-configure.in.patch
@@ -1,3 +1,5 @@
1Upstream-Status: Inappropriate [embedded specific]
2
1--- gcc-3.4.4/configure.in.orig 2005-08-09 19:57:51.504323183 -0700 3--- 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 4+++ gcc-3.4.4/configure.in 2005-08-09 20:00:12.073168623 -0700
3@@ -1907,7 +1907,7 @@ 5@@ -1907,7 +1907,7 @@
diff --git a/meta/recipes-devtools/gcc/gcc-csl-arm/gcc_optab_arm.patch b/meta/recipes-devtools/gcc/gcc-csl-arm/gcc_optab_arm.patch
index fa21b26554..5738a470ff 100644
--- a/meta/recipes-devtools/gcc/gcc-csl-arm/gcc_optab_arm.patch
+++ b/meta/recipes-devtools/gcc/gcc-csl-arm/gcc_optab_arm.patch
@@ -1,3 +1,5 @@
1Upstream-Status: Pending
2
1ARM is the only architecture that has a helper function that returns 3ARM is the only architecture that has a helper function that returns
2an unbiased result. This fix is trivial enough that we can show it 4an unbiased result. This fix is trivial enough that we can show it
3doesn't effect any of the other arches. Can we consider this a 5doesn't effect any of the other arches. Can we consider this a
diff --git a/meta/recipes-devtools/gcc/gcc-csl-arm/gfortran.patch b/meta/recipes-devtools/gcc/gcc-csl-arm/gfortran.patch
new file mode 100644
index 0000000000..c78e8313b6
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-csl-arm/gfortran.patch
@@ -0,0 +1,42 @@
1Upstream-Status: Pending
2
3The patch below fixes a crash building libgfortran on arm-linux-gnueabi.
4
5This target doesn't really have a 128-bit integer type, however it does use
6TImode to represent the return value of certain special ABI defined library
7functions. This results in type_for_size(TImode) being called.
8
9Because TImode deosn't correspond to any gfortran integer kind
10gfc_type_for_size returns NULL and we segfault shortly after.
11
12The patch below fixes this by making gfc_type_for_size handle TImode in the
13same way as the C frontend.
14
15Tested on x86_64-linux and arm-linux-gnueabi.
16Applied to trunk.
17
18Paul
19
202007-05-15 Paul Brook <paul@codesourcery.com>
21
22 gcc/fortran/
23 * trans-types.c (gfc_type_for_size): Handle signed TImode.
24
25Index: gcc-4.2.1/gcc/fortran/trans-types.c
26===================================================================
27--- gcc-4.2.1/gcc/fortran/trans-types.c (revision 170435)
28+++ gcc-4.2.1/gcc/fortran/trans-types.c (working copy)
29@@ -1800,6 +1800,13 @@ gfc_type_for_size (unsigned bits, int un
30 if (type && bits == TYPE_PRECISION (type))
31 return type;
32 }
33+
34+ /* Handle TImode as a special case because it is used by some backends
35+ (eg. ARM) even though it is not available for normal use. */
36+#if HOST_BITS_PER_WIDE_INT >= 64
37+ if (bits == TYPE_PRECISION (intTI_type_node))
38+ return intTI_type_node;
39+#endif
40 }
41 else
42 {
diff --git a/meta/recipes-devtools/gcc/gcc-csl-arm/no-libfloat.patch b/meta/recipes-devtools/gcc/gcc-csl-arm/no-libfloat.patch
deleted file mode 100644
index e5d12cfb4f..0000000000
--- a/meta/recipes-devtools/gcc/gcc-csl-arm/no-libfloat.patch
+++ /dev/null
@@ -1,11 +0,0 @@
1--- gcc/gcc/config/arm/linux-elf.h.old 2005-04-20 00:46:28.923375320 +0100
2+++ gcc/gcc/config/arm/linux-elf.h 2005-04-20 00:46:34.181575952 +0100
3@@ -56,7 +56,7 @@
4 %{shared:-lc} \
5 %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
6
7-#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc"
8+#define LIBGCC_SPEC "-lgcc"
9
10 /* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add
11 the GNU/Linux magical crtbegin.o file (see crtstuff.c) which
diff --git a/meta/recipes-devtools/gcc/gcc-csl-arm/pic-without-sl.patch b/meta/recipes-devtools/gcc/gcc-csl-arm/pic-without-sl.patch
deleted file mode 100644
index 9a49794da4..0000000000
--- a/meta/recipes-devtools/gcc/gcc-csl-arm/pic-without-sl.patch
+++ /dev/null
@@ -1,303 +0,0 @@
1Index: gcc/config/arm/arm-protos.h
2===================================================================
3RCS file: /cvsroot/gcc/gcc/gcc/config/arm/arm-protos.h,v
4retrieving revision 1.60.4.20
5diff -u -r1.60.4.20 arm-protos.h
6--- gcc/config/arm/arm-protos.h 29 Mar 2005 03:00:11 -0000 1.60.4.20
7+++ gcc/config/arm/arm-protos.h 23 Apr 2005 04:41:06 -0000
8@@ -64,6 +64,7 @@
9 extern enum reg_class vfp_secondary_reload_class (enum machine_mode, rtx);
10 extern int tls_symbolic_operand (rtx, enum machine_mode);
11 extern bool arm_tls_operand_p (rtx x);
12+extern bool arm_pc_pic_operand_p (rtx x);
13
14 /* Predicates. */
15 extern int s_register_operand (rtx, enum machine_mode);
16Index: gcc/config/arm/arm.c
17===================================================================
18RCS file: /cvsroot/gcc/gcc/gcc/config/arm/arm.c,v
19retrieving revision 1.303.2.79
20diff -u -r1.303.2.79 arm.c
21--- gcc/config/arm/arm.c 12 Apr 2005 06:17:07 -0000 1.303.2.79
22+++ gcc/config/arm/arm.c 23 Apr 2005 04:41:09 -0000
23@@ -1003,7 +1003,7 @@
24
25 /* If stack checking is disabled, we can use r10 as the PIC register,
26 which keeps r9 available. */
27- if (flag_pic)
28+ if (0 && flag_pic)
29 arm_pic_register = TARGET_APCS_STACK ? 9 : 10;
30
31 if (TARGET_APCS_FLOAT)
32@@ -3120,6 +3120,10 @@
33 rtx
34 legitimize_pic_address (rtx orig, enum machine_mode mode, rtx reg)
35 {
36+ if (GET_CODE (orig) == UNSPEC
37+ && XINT (orig, 1) == UNSPEC_GOTSLOTPC)
38+ abort ();
39+
40 if (GET_CODE (orig) == SYMBOL_REF
41 || GET_CODE (orig) == LABEL_REF)
42 {
43@@ -3149,27 +3153,80 @@
44 else
45 address = reg;
46
47- if (TARGET_ARM)
48- emit_insn (gen_pic_load_addr_arm (address, orig));
49- else
50- emit_insn (gen_pic_load_addr_thumb (address, orig));
51+ if (arm_pic_register != INVALID_REGNUM)
52+ {
53+ /* Using GP-based PIC addressing. */
54+ if (TARGET_ARM)
55+ emit_insn (gen_pic_load_addr_arm (address, orig));
56+ else
57+ emit_insn (gen_pic_load_addr_thumb (address, orig));
58+
59+ if ((GET_CODE (orig) == LABEL_REF
60+ || (GET_CODE (orig) == SYMBOL_REF &&
61+ SYMBOL_REF_LOCAL_P (orig)))
62+ && NEED_GOT_RELOC)
63+ pic_ref = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, address);
64+ else
65+ {
66+ pic_ref = gen_rtx_MEM (Pmode,
67+ gen_rtx_PLUS (Pmode, pic_offset_table_rtx,
68+ address));
69+ RTX_UNCHANGING_P (pic_ref) = 1;
70+ }
71
72- if ((GET_CODE (orig) == LABEL_REF
73- || (GET_CODE (orig) == SYMBOL_REF &&
74- SYMBOL_REF_LOCAL_P (orig)))
75- && NEED_GOT_RELOC)
76- pic_ref = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, address);
77+ current_function_uses_pic_offset_table = 1;
78+ }
79 else
80 {
81- pic_ref = gen_rtx_MEM (Pmode,
82- gen_rtx_PLUS (Pmode, pic_offset_table_rtx,
83- address));
84- RTX_UNCHANGING_P (pic_ref) = 1;
85+ /* Using PC-based PIC addressing. */
86+ rtx label, tmp;
87+ int offset;
88+
89+ label = gen_label_rtx ();
90+ offset = TARGET_ARM ? 8 : 4;
91+
92+ if (GET_CODE (orig) == LABEL_REF
93+ || (GET_CODE (orig) == SYMBOL_REF && SYMBOL_REF_LOCAL_P (orig)))
94+ {
95+ /* This symbol is defined locally. We don't need a GOT entry. */
96+ tmp = gen_rtx_MINUS (Pmode, gen_rtx_UNSPEC (Pmode, gen_rtvec (1, orig), UNSPEC_PIC_SYM), gen_rtx_PLUS (Pmode,
97+ gen_rtx_LABEL_REF (Pmode, label),
98+ GEN_INT (offset)));
99+
100+ load_tls_operand (tmp, address);
101+
102+ if (TARGET_ARM)
103+ emit_insn (gen_pic_add_dot_plus_eight (address, label));
104+ else
105+ emit_insn (gen_pic_add_dot_plus_four (address, label));
106+ }
107+ else
108+ {
109+ rtx x = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, orig), UNSPEC_GOTSLOTPC);
110+ rtx dummy_label;
111+
112+ dummy_label = gen_label_rtx ();
113+ LABEL_PRESERVE_P (dummy_label) = 1;
114+ LABEL_NUSES (dummy_label) = 1;
115+
116+ tmp = gen_rtx_MINUS (Pmode, x, gen_rtx_PLUS (Pmode,
117+ gen_rtx_LABEL_REF (Pmode, label),
118+ GEN_INT (offset)));
119+
120+ load_tls_operand (tmp, address);
121+
122+ if (TARGET_ARM)
123+ emit_insn (gen_tls_load_dot_plus_eight (address, address, label, dummy_label));
124+ else
125+ emit_insn (gen_tls_load_dot_plus_four (address, address, label, dummy_label));
126+ }
127+
128+ pic_ref = address;
129 }
130
131 insn = emit_move_insn (reg, pic_ref);
132 #endif
133- current_function_uses_pic_offset_table = 1;
134+
135 /* Put a REG_EQUAL note on this insn, so that it can be optimized
136 by loop. */
137 REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_EQUAL, orig,
138@@ -3179,11 +3236,17 @@
139 else if (GET_CODE (orig) == CONST)
140 {
141 rtx base, offset;
142+ bool minus = FALSE;
143
144 if (GET_CODE (XEXP (orig, 0)) == PLUS
145 && XEXP (XEXP (orig, 0), 0) == pic_offset_table_rtx)
146 return orig;
147
148+ if (GET_CODE (XEXP (orig, 0)) == MINUS
149+ && GET_CODE (XEXP (XEXP (orig, 0), 0)) == UNSPEC
150+ && XINT (XEXP (XEXP (orig, 0), 0), 1) == UNSPEC_GOTSLOTPC)
151+ return orig;
152+
153 if (GET_CODE (XEXP (orig, 0)) == UNSPEC)
154 return orig;
155
156@@ -3201,6 +3264,13 @@
157 offset = legitimize_pic_address (XEXP (XEXP (orig, 0), 1), Pmode,
158 base == reg ? 0 : reg);
159 }
160+ else if (GET_CODE (XEXP (orig, 0)) == MINUS)
161+ {
162+ minus = TRUE;
163+ base = legitimize_pic_address (XEXP (XEXP (orig, 0), 0), Pmode, reg);
164+ offset = legitimize_pic_address (XEXP (XEXP (orig, 0), 1), Pmode,
165+ base == reg ? 0 : reg);
166+ }
167 else
168 abort ();
169
170@@ -3228,7 +3298,7 @@
171 return reg;
172 }
173
174- return gen_rtx_PLUS (Pmode, base, offset);
175+ return minus ? gen_rtx_MINUS (Pmode, base, offset) : gen_rtx_PLUS (Pmode, base, offset);
176 }
177
178 return orig;
179@@ -3267,7 +3337,7 @@
180 rtx l1, pic_tmp, pic_tmp2, pic_rtx;
181 rtx global_offset_table;
182
183- if (current_function_uses_pic_offset_table == 0 || TARGET_SINGLE_PIC_BASE)
184+ if (current_function_uses_pic_offset_table == 0 || TARGET_SINGLE_PIC_BASE || arm_pic_register == INVALID_REGNUM)
185 return;
186
187 if (!flag_pic)
188@@ -3341,8 +3411,11 @@
189 static int
190 pcrel_constant_p (rtx x)
191 {
192+ if (GET_CODE (x) == CONST)
193+ return pcrel_constant_p (XEXP (x, 0));
194+
195 if (GET_CODE (x) == MINUS)
196- return symbol_mentioned_p (XEXP (x, 0)) && label_mentioned_p (XEXP (x, 1));
197+ return (((GET_CODE (XEXP (x, 0)) == UNSPEC && XINT (XEXP (x, 0), 1) == UNSPEC_PIC_SYM)) || symbol_mentioned_p (XEXP (x, 0))) && label_mentioned_p (XEXP (x, 1));
198
199 if (GET_CODE (x) == UNSPEC
200 && XINT (x, 1) == UNSPEC_TLS
201@@ -3946,12 +4019,32 @@
202 return SYMBOL_REF_TLS_MODEL (op);
203 }
204
205+bool
206+arm_pc_pic_operand_p (rtx op)
207+{
208+ if (GET_CODE (op) == CONST
209+ && GET_CODE (XEXP (op, 0)) == MINUS
210+ && GET_CODE (XEXP (XEXP (op, 0), 0)) == UNSPEC
211+ && XINT (XEXP (XEXP (op, 0), 0), 1) == UNSPEC_GOTSLOTPC)
212+ return 1;
213+
214+ if (GET_CODE (op) == CONST
215+ && GET_CODE (XEXP (op, 0)) == MINUS
216+ && GET_CODE (XEXP (XEXP (op, 0), 0)) == UNSPEC
217+ && XINT (XEXP (XEXP (op, 0), 0), 1) == UNSPEC_PIC_SYM)
218+ return 1;
219+
220+ return 0;
221+}
222+
223 /* Valid input to a move instruction. */
224 int
225 move_input_operand (rtx op, enum machine_mode mode)
226 {
227 if (tls_symbolic_operand (op, mode))
228 return 0;
229+ if (pcrel_constant_p (op))
230+ return 1;
231 return general_operand (op, mode);
232 }
233
234@@ -15634,11 +15727,34 @@
235 return TRUE;
236 }
237
238+static bool
239+arm_emit_got_decoration (FILE *fp, rtx x)
240+{
241+ rtx val;
242+
243+ val = XVECEXP (x, 0, 0);
244+
245+ fputs ("_gotslotpc_(", fp);
246+
247+ output_addr_const (fp, val);
248+
249+ fputc (')', fp);
250+
251+ return TRUE;
252+}
253+
254 bool
255 arm_output_addr_const_extra (FILE *fp, rtx x)
256 {
257 if (GET_CODE (x) == UNSPEC && XINT (x, 1) == UNSPEC_TLS)
258 return arm_emit_tls_decoration (fp, x);
259+ else if (GET_CODE (x) == UNSPEC && XINT (x, 1) == UNSPEC_GOTSLOTPC)
260+ return arm_emit_got_decoration (fp, x);
261+ else if (GET_CODE (x) == UNSPEC && XINT (x, 1) == UNSPEC_PIC_SYM)
262+ {
263+ output_addr_const (fp, XVECEXP (x, 0, 0));
264+ return TRUE;
265+ }
266 else if (GET_CODE (x) == CONST_VECTOR)
267 return arm_emit_vector_const (fp, x);
268
269Index: gcc/config/arm/arm.md
270===================================================================
271RCS file: /cvsroot/gcc/gcc/gcc/config/arm/arm.md,v
272retrieving revision 1.145.2.31
273diff -u -r1.145.2.31 arm.md
274--- gcc/config/arm/arm.md 28 Mar 2005 19:04:37 -0000 1.145.2.31
275+++ gcc/config/arm/arm.md 23 Apr 2005 04:41:11 -0000
276@@ -88,6 +88,7 @@
277 (UNSPEC_WMADDS 18) ; Used by the intrinsic form of the iWMMXt WMADDS instruction.
278 (UNSPEC_WMADDU 19) ; Used by the intrinsic form of the iWMMXt WMADDU instruction.
279 (UNSPEC_TLS 20) ; A symbol that has been treated properly for TLS usage.
280+ (UNSPEC_GOTSLOTPC 21)
281 ]
282 )
283
284@@ -4179,7 +4180,8 @@
285 && (CONSTANT_P (operands[1])
286 || symbol_mentioned_p (operands[1])
287 || label_mentioned_p (operands[1]))
288- && ! tls_mentioned_p (operands[1]))
289+ && ! tls_mentioned_p (operands[1])
290+ && ! arm_pc_pic_operand_p (operands[1]))
291 operands[1] = legitimize_pic_address (operands[1], SImode,
292 (no_new_pseudos ? operands[0] : 0));
293 }
294@@ -4412,7 +4414,8 @@
295 (mem:SI (unspec:SI [(plus:SI (match_dup 0)
296 (const (plus:SI (pc) (const_int 8))))]
297 UNSPEC_PIC_BASE)))
298- (use (label_ref (match_operand 1 "" "")))])]
299+ (use (label_ref (match_operand 1 "" "")))
300+ (use (label_ref (match_operand 1 "" "")))])]
301 ""
302 )
303
diff --git a/meta/recipes-devtools/gcc/gcc-csl-arm/pr34130.patch b/meta/recipes-devtools/gcc/gcc-csl-arm/pr34130.patch
deleted file mode 100644
index 415335f4b4..0000000000
--- a/meta/recipes-devtools/gcc/gcc-csl-arm/pr34130.patch
+++ /dev/null
@@ -1,16 +0,0 @@
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/recipes-devtools/gcc/gcc-csl-arm/zecke-no-host-includes.patch b/meta/recipes-devtools/gcc/gcc-csl-arm/zecke-no-host-includes.patch
index 8b05cb73a9..1695582954 100644
--- a/meta/recipes-devtools/gcc/gcc-csl-arm/zecke-no-host-includes.patch
+++ b/meta/recipes-devtools/gcc/gcc-csl-arm/zecke-no-host-includes.patch
@@ -1,3 +1,5 @@
1Upstream-Status: Pending
2
1Index: gcc-4.0.2/gcc/c-incpath.c 3Index: gcc-4.0.2/gcc/c-incpath.c
2=================================================================== 4===================================================================
3--- gcc-4.0.2.orig/gcc/c-incpath.c 2005-01-23 16:05:27.000000000 +0100 5--- gcc-4.0.2.orig/gcc/c-incpath.c 2005-01-23 16:05:27.000000000 +0100
diff --git a/meta/recipes-devtools/gcc/gcc-csl-arm/zecke-xgcc-cpp.patch b/meta/recipes-devtools/gcc/gcc-csl-arm/zecke-xgcc-cpp.patch
index 921cab6e18..b06de5458b 100644
--- a/meta/recipes-devtools/gcc/gcc-csl-arm/zecke-xgcc-cpp.patch
+++ b/meta/recipes-devtools/gcc/gcc-csl-arm/zecke-xgcc-cpp.patch
@@ -1,3 +1,4 @@
1Upstream-Status: Inappropriate [embedded specific]
1upstream: n/a 2upstream: n/a
2comment: Use the preprocessor we have just compiled instead the one of 3comment: Use the preprocessor we have just compiled instead the one of
3the system. There might be incompabilities between us and them. 4the system. There might be incompabilities between us and them.