summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNitin A Kamble <nitin.a.kamble@intel.com>2011-05-12 15:16:35 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-05-13 11:02:15 +0100
commit9233fdcee28366502565300b777862223b6974de (patch)
treeb882c00bfc1fed080462d11b49f1761c2c00c594
parent9deb37367135b6f45c7fe5d836a08188fa882c1d (diff)
downloadpoky-9233fdcee28366502565300b777862223b6974de.tar.gz
gcc 4.5.1 4.6.0: remove unused patches
(From OE-Core rev: 2b4975c536dace131d160798cf8fe45b86c03734) Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.1/307-locale_facets.patch21
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.1/602-sdk-libstdc++-includes.patch22
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.1/arm-unbreak-eabi-armv4t.dpatch36
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.1/gcc-4.0.2-e300c2c3.patch319
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.1/gcc-arm-frename-registers.patch25
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.1/gcc-ice-hack.dpatch331
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.1/libstdc++-pic.dpatch71
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.1/pr30961.dpatch179
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.1/pr35942.patch38
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.6.0/307-locale_facets.patch19
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.6.0/602-sdk-libstdc++-includes.patch20
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.6.0/arm-bswapsi2.patch13
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.6.0/arm-unbreak-eabi-armv4t.dpatch36
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4.0.2-e300c2c3.patch319
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.6.0/gcc-arm-frename-registers.patch25
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.6.0/gcc-ice-hack.dpatch331
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.6.0/libstdc++-pic.dpatch71
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.6.0/pr30961.dpatch179
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.6.0/pr35942.patch38
19 files changed, 0 insertions, 2093 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.1/307-locale_facets.patch b/meta/recipes-devtools/gcc/gcc-4.5.1/307-locale_facets.patch
deleted file mode 100644
index c1636bac35..0000000000
--- a/meta/recipes-devtools/gcc/gcc-4.5.1/307-locale_facets.patch
+++ /dev/null
@@ -1,21 +0,0 @@
1Upstream-Status: Pending
2
3This patch fixes a bug into ostream::operator<<(double) due to the wrong size
4passed into the __convert_from_v method. The wrong size is then passed to
5std::snprintf function, that, on uClibc, doens't handle sized 0 buffer.
6
7Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
8
9Index: gcc-4.3.1/libstdc++-v3/include/bits/locale_facets.tcc
10===================================================================
11--- gcc-4.3.1.orig/libstdc++-v3/include/bits/locale_facets.tcc 2007-11-26 17:59:41.000000000 -0800
12+++ gcc-4.3.1/libstdc++-v3/include/bits/locale_facets.tcc 2008-08-16 02:14:48.000000000 -0700
13@@ -1004,7 +1004,7 @@
14 const int __cs_size = __fixed ? __max_exp + __prec + 4
15 : __max_digits * 2 + __prec;
16 char* __cs = static_cast<char*>(__builtin_alloca(__cs_size));
17- __len = std::__convert_from_v(_S_get_c_locale(), __cs, 0, __fbuf,
18+ __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, __fbuf,
19 __prec, __v);
20 #endif
21
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.1/602-sdk-libstdc++-includes.patch b/meta/recipes-devtools/gcc/gcc-4.5.1/602-sdk-libstdc++-includes.patch
deleted file mode 100644
index 44b8502649..0000000000
--- a/meta/recipes-devtools/gcc/gcc-4.5.1/602-sdk-libstdc++-includes.patch
+++ /dev/null
@@ -1,22 +0,0 @@
1Upstream-Status: Inappropriate [embedded specific]
2
3--- gcc-4.1.0/libstdc++-v3/fragment.am 2005-03-21 11:40:14.000000000 -0600
4+++ gcc-4.1.0-patched/libstdc++-v3/fragment.am 2005-04-25 20:14:39.856251785 -0500
5@@ -21,5 +21,5 @@
6 $(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once
7
8 # -I/-D flags to pass when compiling.
9-AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
10+AM_CPPFLAGS = $(GLIBCXX_INCLUDES) -I$(toplevel_srcdir)/include
11
12--- gcc-4.1.0/libstdc++-v3/libmath/Makefile.am 2005-03-21 11:40:18.000000000 -0600
13+++ gcc-4.1.0-patched/libstdc++-v3/libmath/Makefile.am 2005-04-25 20:14:39.682280735 -0500
14@@ -35,7 +35,7 @@
15
16 libmath_la_SOURCES = stubs.c
17
18-AM_CPPFLAGS = $(CANADIAN_INCLUDES)
19+AM_CPPFLAGS = $(CANADIAN_INCLUDES) -I$(toplevel_srcdir)/include
20
21 # Only compiling "C" sources in this directory.
22 LIBTOOL = @LIBTOOL@ --tag CC
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.1/arm-unbreak-eabi-armv4t.dpatch b/meta/recipes-devtools/gcc/gcc-4.5.1/arm-unbreak-eabi-armv4t.dpatch
deleted file mode 100644
index 7bb8887068..0000000000
--- a/meta/recipes-devtools/gcc/gcc-4.5.1/arm-unbreak-eabi-armv4t.dpatch
+++ /dev/null
@@ -1,36 +0,0 @@
1#! /bin/sh -e
2
3# DP: Fix armv4t build on ARM
4
5dir=
6if [ $# -eq 3 -a "$2" = '-d' ]; then
7 pdir="-d $3"
8 dir="$3/"
9elif [ $# -ne 1 ]; then
10 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
11 exit 1
12fi
13case "$1" in
14 -patch)
15 patch $pdir -f --no-backup-if-mismatch -p1 < $0
16 ;;
17 -unpatch)
18 patch $pdir -f --no-backup-if-mismatch -R -p1 < $0
19 ;;
20 *)
21 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
22 exit 1
23esac
24exit 0
25
26--- src/gcc/config/arm/linux-eabi.h.orig 2007-11-24 12:37:38.000000000 +0000
27+++ src/gcc/config/arm/linux-eabi.h 2007-11-24 12:39:41.000000000 +0000
28@@ -44,7 +44,7 @@
29 The ARM10TDMI core is the default for armv5t, so set
30 SUBTARGET_CPU_DEFAULT to achieve this. */
31 #undef SUBTARGET_CPU_DEFAULT
32-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
33+#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi
34
35 /* TARGET_BIG_ENDIAN_DEFAULT is set in
36 config.gcc for big endian configurations. */
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.1/gcc-4.0.2-e300c2c3.patch b/meta/recipes-devtools/gcc/gcc-4.5.1/gcc-4.0.2-e300c2c3.patch
deleted file mode 100644
index d1df8b2716..0000000000
--- a/meta/recipes-devtools/gcc/gcc-4.5.1/gcc-4.0.2-e300c2c3.patch
+++ /dev/null
@@ -1,319 +0,0 @@
1Adds support for Freescale Power architecture e300c2 and e300c3 cores.
2http://www.bitshrine.org/gpp/tc-fsl-x86lnx-e300c3-nptl-4.0.2-2.src.rpm
3
4Leon Woestenberg <leonw@mailcan.com>
5
6---
7 gcc/config.gcc | 2
8 gcc/config/rs6000/e300c2c3.md | 189 ++++++++++++++++++++++++++++++++++++++++++
9 gcc/config/rs6000/rs6000.c | 24 +++++
10 gcc/config/rs6000/rs6000.h | 4
11 gcc/config/rs6000/rs6000.md | 3
12 5 files changed, 220 insertions(+), 2 deletions(-)
13
14Index: gcc-4.3.1/gcc/config/rs6000/e300c2c3.md
15===================================================================
16--- /dev/null 1970-01-01 00:00:00.000000000 +0000
17+++ gcc-4.3.1/gcc/config/rs6000/e300c2c3.md 2008-08-23 16:51:33.000000000 -0700
18@@ -0,0 +1,189 @@
19+;; Pipeline description for Motorola PowerPC e300c3 core.
20+;; Copyright (C) 2003 Free Software Foundation, Inc.
21+;;
22+;; This file is part of GCC.
23+
24+;; GCC is free software; you can redistribute it and/or modify it
25+;; under the terms of the GNU General Public License as published
26+;; by the Free Software Foundation; either version 2, or (at your
27+;; option) any later version.
28+
29+;; GCC is distributed in the hope that it will be useful, but WITHOUT
30+;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
31+;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
32+;; License for more details.
33+
34+;; You should have received a copy of the GNU General Public License
35+;; along with GCC; see the file COPYING. If not, write to the
36+;; Free Software Foundation, 59 Temple Place - Suite 330, Boston,
37+;; MA 02111-1307, USA.
38+
39+(define_automaton "ppce300c3_most,ppce300c3_long,ppce300c3_retire")
40+(define_cpu_unit "ppce300c3_decode_0,ppce300c3_decode_1" "ppce300c3_most")
41+
42+;; We don't simulate general issue queue (GIC). If we have SU insn
43+;; and then SU1 insn, they can not be issued on the same cycle
44+;; (although SU1 insn and then SU insn can be issued) because the SU
45+;; insn will go to SU1 from GIC0 entry. Fortunately, the first cycle
46+;; multipass insn scheduling will find the situation and issue the SU1
47+;; insn and then the SU insn.
48+(define_cpu_unit "ppce300c3_issue_0,ppce300c3_issue_1" "ppce300c3_most")
49+
50+;; We could describe completion buffers slots in combination with the
51+;; retirement units and the order of completion but the result
52+;; automaton would behave in the same way because we can not describe
53+;; real latency time with taking in order completion into account.
54+;; Actually we could define the real latency time by querying reserved
55+;; automaton units but the current scheduler uses latency time before
56+;; issuing insns and making any reservations.
57+;;
58+;; So our description is aimed to achieve a insn schedule in which the
59+;; insns would not wait in the completion buffer.
60+(define_cpu_unit "ppce300c3_retire_0,ppce300c3_retire_1" "ppce300c3_retire")
61+
62+;; Branch unit:
63+(define_cpu_unit "ppce300c3_bu" "ppce300c3_most")
64+
65+;; IU:
66+(define_cpu_unit "ppce300c3_iu0_stage0,ppce300c3_iu1_stage0" "ppce300c3_most")
67+
68+;; IU: This used to describe non-pipelined division.
69+(define_cpu_unit "ppce300c3_mu_div" "ppce300c3_long")
70+
71+;; SRU:
72+(define_cpu_unit "ppce300c3_sru_stage0" "ppce300c3_most")
73+
74+;; Here we simplified LSU unit description not describing the stages.
75+(define_cpu_unit "ppce300c3_lsu" "ppce300c3_most")
76+
77+;; FPU:
78+(define_cpu_unit "ppce300c3_fpu" "ppce300c3_most")
79+
80+;; The following units are used to make automata deterministic
81+(define_cpu_unit "present_ppce300c3_decode_0" "ppce300c3_most")
82+(define_cpu_unit "present_ppce300c3_issue_0" "ppce300c3_most")
83+(define_cpu_unit "present_ppce300c3_retire_0" "ppce300c3_retire")
84+(define_cpu_unit "present_ppce300c3_iu0_stage0" "ppce300c3_most")
85+
86+;; The following sets to make automata deterministic when option ndfa is used.
87+(presence_set "present_ppce300c3_decode_0" "ppce300c3_decode_0")
88+(presence_set "present_ppce300c3_issue_0" "ppce300c3_issue_0")
89+(presence_set "present_ppce300c3_retire_0" "ppce300c3_retire_0")
90+(presence_set "present_ppce300c3_iu0_stage0" "ppce300c3_iu0_stage0")
91+
92+;; Some useful abbreviations.
93+(define_reservation "ppce300c3_decode"
94+ "ppce300c3_decode_0|ppce300c3_decode_1+present_ppce300c3_decode_0")
95+(define_reservation "ppce300c3_issue"
96+ "ppce300c3_issue_0|ppce300c3_issue_1+present_ppce300c3_issue_0")
97+(define_reservation "ppce300c3_retire"
98+ "ppce300c3_retire_0|ppce300c3_retire_1+present_ppce300c3_retire_0")
99+(define_reservation "ppce300c3_iu_stage0"
100+ "ppce300c3_iu0_stage0|ppce300c3_iu1_stage0+present_ppce300c3_iu0_stage0")
101+
102+;; Compares can be executed either one of the IU or SRU
103+(define_insn_reservation "ppce300c3_cmp" 1
104+ (and (eq_attr "type" "cmp,compare,delayed_compare,fast_compare")
105+ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
106+ "ppce300c3_decode,ppce300c3_issue+(ppce300c3_iu_stage0|ppce300c3_sru_stage0) \
107+ +ppce300c3_retire")
108+
109+;; Other one cycle IU insns
110+(define_insn_reservation "ppce300c3_iu" 1
111+ (and (eq_attr "type" "integer,insert_word")
112+ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
113+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_iu_stage0+ppce300c3_retire")
114+
115+;; Branch. Actually this latency time is not used by the scheduler.
116+(define_insn_reservation "ppce300c3_branch" 1
117+ (and (eq_attr "type" "jmpreg,branch")
118+ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
119+ "ppce300c3_decode,ppce300c3_bu,ppce300c3_retire")
120+
121+;; Multiply is non-pipelined but can be executed in any IU
122+(define_insn_reservation "ppce300c3_multiply" 2
123+ (and (eq_attr "type" "imul,imul2,imul3,imul_compare")
124+ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
125+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_iu_stage0, \
126+ ppce300c3_iu_stage0+ppce300c3_retire")
127+
128+;; Divide. We use the average latency time here. We omit reserving a
129+;; retire unit because of the result automata will be huge.
130+(define_insn_reservation "ppce300c3_divide" 20
131+ (and (eq_attr "type" "idiv")
132+ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
133+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_iu_stage0+ppce300c3_mu_div,\
134+ ppce300c3_mu_div*19")
135+
136+;; CR logical
137+(define_insn_reservation "ppce300c3_cr_logical" 1
138+ (and (eq_attr "type" "cr_logical,delayed_cr")
139+ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
140+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_sru_stage0+ppce300c3_retire")
141+
142+;; Mfcr
143+(define_insn_reservation "ppce300c3_mfcr" 1
144+ (and (eq_attr "type" "mfcr")
145+ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
146+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_sru_stage0+ppce300c3_retire")
147+
148+;; Mtcrf
149+(define_insn_reservation "ppce300c3_mtcrf" 1
150+ (and (eq_attr "type" "mtcr")
151+ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
152+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_sru_stage0+ppce300c3_retire")
153+
154+;; Mtjmpr
155+(define_insn_reservation "ppce300c3_mtjmpr" 1
156+ (and (eq_attr "type" "mtjmpr,mfjmpr")
157+ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
158+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_sru_stage0+ppce300c3_retire")
159+
160+;; Float point instructions
161+(define_insn_reservation "ppce300c3_fpcompare" 3
162+ (and (eq_attr "type" "fpcompare")
163+ (eq_attr "cpu" "ppce300c3"))
164+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_fpu,nothing,ppce300c3_retire")
165+
166+(define_insn_reservation "ppce300c3_fp" 3
167+ (and (eq_attr "type" "fp")
168+ (eq_attr "cpu" "ppce300c3"))
169+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_fpu,nothing,ppce300c3_retire")
170+
171+(define_insn_reservation "ppce300c3_dmul" 4
172+ (and (eq_attr "type" "dmul")
173+ (eq_attr "cpu" "ppce300c3"))
174+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_fpu,ppce300c3_fpu,nothing,ppce300c3_retire")
175+
176+; Divides are not pipelined
177+(define_insn_reservation "ppce300c3_sdiv" 18
178+ (and (eq_attr "type" "sdiv")
179+ (eq_attr "cpu" "ppce300c3"))
180+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_fpu,ppce300c3_fpu*17")
181+
182+(define_insn_reservation "ppce300c3_ddiv" 33
183+ (and (eq_attr "type" "ddiv")
184+ (eq_attr "cpu" "ppce300c3"))
185+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_fpu,ppce300c3_fpu*32")
186+
187+;; Loads
188+(define_insn_reservation "ppce300c3_load" 2
189+ (and (eq_attr "type" "load,load_ext,load_ext_u,load_ext_ux,load_ux,load_u")
190+ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
191+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_lsu,ppce300c3_retire")
192+
193+(define_insn_reservation "ppce300c3_fpload" 2
194+ (and (eq_attr "type" "fpload,fpload_ux,fpload_u")
195+ (eq_attr "cpu" "ppce300c3"))
196+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_lsu,ppce300c3_retire")
197+
198+;; Stores.
199+(define_insn_reservation "ppce300c3_store" 2
200+ (and (eq_attr "type" "store,store_ux,store_u")
201+ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
202+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_lsu,ppce300c3_retire")
203+
204+(define_insn_reservation "ppce300c3_fpstore" 2
205+ (and (eq_attr "type" "fpstore,fpstore_ux,fpstore_u")
206+ (eq_attr "cpu" "ppce300c3"))
207+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_lsu,ppce300c3_retire")
208Index: gcc-4.3.1/gcc/config/rs6000/rs6000.c
209===================================================================
210--- gcc-4.3.1.orig/gcc/config/rs6000/rs6000.c 2008-08-23 16:49:39.000000000 -0700
211+++ gcc-4.3.1/gcc/config/rs6000/rs6000.c 2008-08-23 16:54:25.000000000 -0700
212@@ -669,6 +669,21 @@ struct processor_costs ppc8540_cost = {
213 1, /* prefetch streams /*/
214 };
215
216+/* Instruction costs on E300C2 and E300C3 cores. */
217+static const
218+struct processor_costs ppce300c2c3_cost = {
219+ COSTS_N_INSNS (4), /* mulsi */
220+ COSTS_N_INSNS (4), /* mulsi_const */
221+ COSTS_N_INSNS (4), /* mulsi_const9 */
222+ COSTS_N_INSNS (4), /* muldi */
223+ COSTS_N_INSNS (19), /* divsi */
224+ COSTS_N_INSNS (19), /* divdi */
225+ COSTS_N_INSNS (3), /* fp */
226+ COSTS_N_INSNS (4), /* dmul */
227+ COSTS_N_INSNS (18), /* sdiv */
228+ COSTS_N_INSNS (33), /* ddiv */
229+};
230+
231 /* Instruction costs on POWER4 and POWER5 processors. */
232 static const
233 struct processor_costs power4_cost = {
234@@ -1420,6 +1435,8 @@ rs6000_override_options (const char *def
235 {"8540", PROCESSOR_PPC8540, POWERPC_BASE_MASK | MASK_STRICT_ALIGN},
236 /* 8548 has a dummy entry for now. */
237 {"8548", PROCESSOR_PPC8540, POWERPC_BASE_MASK | MASK_STRICT_ALIGN},
238+ {"e300c2", PROCESSOR_PPCE300C2, POWERPC_BASE_MASK | MASK_SOFT_FLOAT},
239+ {"e300c3", PROCESSOR_PPCE300C3, POWERPC_BASE_MASK},
240 {"860", PROCESSOR_MPCCORE, POWERPC_BASE_MASK | MASK_SOFT_FLOAT},
241 {"970", PROCESSOR_POWER4,
242 POWERPC_7400_MASK | MASK_PPC_GPOPT | MASK_MFCRF | MASK_POWERPC64},
243@@ -1845,6 +1862,11 @@ rs6000_override_options (const char *def
244 rs6000_cost = &ppc8540_cost;
245 break;
246
247+ case PROCESSOR_PPCE300C2:
248+ case PROCESSOR_PPCE300C3:
249+ rs6000_cost = &ppce300c2c3_cost;
250+ break;
251+
252 case PROCESSOR_POWER4:
253 case PROCESSOR_POWER5:
254 rs6000_cost = &power4_cost;
255@@ -18606,6 +18628,8 @@ rs6000_issue_rate (void)
256 case CPU_PPC7400:
257 case CPU_PPC8540:
258 case CPU_CELL:
259+ case CPU_PPCE300C2:
260+ case CPU_PPCE300C3:
261 return 2;
262 case CPU_RIOS2:
263 case CPU_PPC604:
264Index: gcc-4.3.1/gcc/config/rs6000/rs6000.h
265===================================================================
266--- gcc-4.3.1.orig/gcc/config/rs6000/rs6000.h 2008-01-26 09:18:35.000000000 -0800
267+++ gcc-4.3.1/gcc/config/rs6000/rs6000.h 2008-08-23 16:55:30.000000000 -0700
268@@ -117,6 +117,8 @@
269 %{mcpu=G5: -mpower4 -maltivec} \
270 %{mcpu=8540: -me500} \
271 %{mcpu=8548: -me500} \
272+%{mcpu=e300c2: -mppc} \
273+%{mcpu=e300c3: -mppc -mpmr} \
274 %{maltivec: -maltivec} \
275 -many"
276
277@@ -262,6 +264,8 @@ enum processor_type
278 PROCESSOR_PPC7400,
279 PROCESSOR_PPC7450,
280 PROCESSOR_PPC8540,
281+ PROCESSOR_PPCE300C2,
282+ PROCESSOR_PPCE300C3,
283 PROCESSOR_POWER4,
284 PROCESSOR_POWER5,
285 PROCESSOR_POWER6,
286Index: gcc-4.3.1/gcc/config/rs6000/rs6000.md
287===================================================================
288--- gcc-4.3.1.orig/gcc/config/rs6000/rs6000.md 2008-02-13 16:14:45.000000000 -0800
289+++ gcc-4.3.1/gcc/config/rs6000/rs6000.md 2008-08-23 16:57:29.000000000 -0700
290@@ -133,7 +133,7 @@
291 ;; Processor type -- this attribute must exactly match the processor_type
292 ;; enumeration in rs6000.h.
293
294-(define_attr "cpu" "rios1,rios2,rs64a,mpccore,ppc403,ppc405,ppc440,ppc601,ppc603,ppc604,ppc604e,ppc620,ppc630,ppc750,ppc7400,ppc7450,ppc8540,power4,power5,power6,cell"
295+(define_attr "cpu" "rios1,rios2,rs64a,mpccore,ppc403,ppc405,ppc440,ppc601,ppc603,ppc604,ppc604e,ppc620,ppc630,ppc750,ppc7400,ppc7450,ppc8540,power4,power5,power6,cell,ppce300c2,ppce300c3"
296 (const (symbol_ref "rs6000_cpu_attr")))
297
298
299@@ -166,6 +166,7 @@
300 (include "7xx.md")
301 (include "7450.md")
302 (include "8540.md")
303+(include "e300c2c3.md")
304 (include "power4.md")
305 (include "power5.md")
306 (include "power6.md")
307Index: gcc-4.3.1/gcc/config.gcc
308===================================================================
309--- gcc-4.3.1.orig/gcc/config.gcc 2008-08-23 16:49:43.000000000 -0700
310+++ gcc-4.3.1/gcc/config.gcc 2008-08-23 17:03:55.000000000 -0700
311@@ -3144,7 +3144,7 @@ case "${target}" in
312 | rios | rios1 | rios2 | rsc | rsc1 | rs64a \
313 | 401 | 403 | 405 | 405fp | 440 | 440fp | 505 \
314 | 601 | 602 | 603 | 603e | ec603e | 604 \
315- | 604e | 620 | 630 | 740 | 750 | 7400 | 7450 \
316+ | 604e | 620 | 630 | 740 | 750 | 7400 | 7450 | e300c[23] \
317 | 854[08] | 801 | 821 | 823 | 860 | 970 | G3 | G4 | G5 | cell)
318 # OK
319 ;;
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.1/gcc-arm-frename-registers.patch b/meta/recipes-devtools/gcc/gcc-4.5.1/gcc-arm-frename-registers.patch
deleted file mode 100644
index 280b90358e..0000000000
--- a/meta/recipes-devtools/gcc/gcc-4.5.1/gcc-arm-frename-registers.patch
+++ /dev/null
@@ -1,25 +0,0 @@
1http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35964
2Index: gcc-4.3.0/gcc/regrename.c
3===================================================================
4--- gcc-4.3.0.orig/gcc/regrename.c 2008-05-28 08:31:15.000000000 -0700
5+++ gcc-4.3.0/gcc/regrename.c 2008-05-28 08:34:00.000000000 -0700
6@@ -782,6 +782,10 @@
7 || (predicated && recog_data.operand_type[i] == OP_OUT))
8 recog_data.operand_type[i] = OP_INOUT;
9 }
10+ /* Unshare dup_loc RTL */
11+ for (i = 0; i < recog_data.n_dups; i++)
12+ *recog_data.dup_loc[i] = copy_rtx(*recog_data.dup_loc[i]);
13+
14
15 /* Step 1: Close chains for which we have overlapping reads. */
16 for (i = 0; i < n_ops; i++)
17@@ -813,7 +817,7 @@
18 OP_IN, 0);
19
20 for (i = 0; i < recog_data.n_dups; i++)
21- *recog_data.dup_loc[i] = copy_rtx (old_dups[i]);
22+ *recog_data.dup_loc[i] = old_dups[i];
23 for (i = 0; i < n_ops; i++)
24 *recog_data.operand_loc[i] = old_operands[i];
25 if (recog_data.n_dups)
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.1/gcc-ice-hack.dpatch b/meta/recipes-devtools/gcc/gcc-4.5.1/gcc-ice-hack.dpatch
deleted file mode 100644
index 84c5ef2ebd..0000000000
--- a/meta/recipes-devtools/gcc/gcc-4.5.1/gcc-ice-hack.dpatch
+++ /dev/null
@@ -1,331 +0,0 @@
1#! /bin/sh -e
2
3# DP: Retry the build on an ice, save the calling options and preprocessed
4# DP: source when the ice is reproducible.
5
6dir=
7if [ $# -eq 3 -a "$2" = '-d' ]; then
8 pdir="-d $3"
9 dir="$3/"
10elif [ $# -ne 1 ]; then
11 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
12 exit 1
13fi
14case "$1" in
15 -patch)
16 patch $pdir -f --no-backup-if-mismatch -p0 < $0
17 ;;
18 -unpatch)
19 patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
20 ;;
21 *)
22 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
23 exit 1
24esac
25exit 0
26
272004-01-23 Jakub Jelinek <jakub@redhat.com>
28
29 * system.h (ICE_EXIT_CODE): Define.
30 * gcc.c (execute): Don't free first string early, but at the end
31 of the function. Call retry_ice if compiler exited with
32 ICE_EXIT_CODE.
33 (retry_ice): New function.
34 * diagnostic.c (diagnostic_count_diagnostic,
35 diagnostic_action_after_output, error_recursion): Exit with
36 ICE_EXIT_CODE instead of FATAL_EXIT_CODE.
37
38--- gcc/diagnostic.c.orig 2007-09-30 10:48:13.000000000 +0000
39+++ gcc/diagnostic.c 2007-09-30 10:49:57.000000000 +0000
40@@ -244,7 +244,7 @@
41 fnotice (stderr, "Please submit a full bug report,\n"
42 "with preprocessed source if appropriate.\n"
43 "See %s for instructions.\n", bug_report_url);
44- exit (ICE_EXIT_CODE);
45+ exit (FATAL_EXIT_CODE);
46
47 case DK_FATAL:
48 if (context->abort_on_error)
49--- gcc/gcc.c.orig 2007-09-30 10:48:13.000000000 +0000
50+++ gcc/gcc.c 2007-09-30 10:48:39.000000000 +0000
51@@ -357,6 +357,9 @@
52 #if defined(HAVE_TARGET_OBJECT_SUFFIX) || defined(HAVE_TARGET_EXECUTABLE_SUFFIX)
53 static const char *convert_filename (const char *, int, int);
54 #endif
55+#if !(defined (__MSDOS__) || defined (OS2) || defined (VMS))
56+static void retry_ice (const char *prog, const char **argv);
57+#endif
58
59 static const char *getenv_spec_function (int, const char **);
60 static const char *if_exists_spec_function (int, const char **);
61@@ -2999,7 +3002,7 @@
62 }
63 }
64
65- if (string != commands[i].prog)
66+ if (i && string != commands[i].prog)
67 free (CONST_CAST (char *, string));
68 }
69
70@@ -3056,6 +3059,16 @@
71 else if (WIFEXITED (status)
72 && WEXITSTATUS (status) >= MIN_FATAL_STATUS)
73 {
74+#if !(defined (__MSDOS__) || defined (OS2) || defined (VMS))
75+ /* For ICEs in cc1, cc1obj, cc1plus see if it is
76+ reproducible or not. */
77+ char *p;
78+ if (WEXITSTATUS (status) == ICE_EXIT_CODE
79+ && i == 0
80+ && (p = strrchr (commands[0].argv[0], DIR_SEPARATOR))
81+ && ! strncmp (p + 1, "cc1", 3))
82+ retry_ice (commands[0].prog, commands[0].argv);
83+#endif
84 if (WEXITSTATUS (status) > greatest_status)
85 greatest_status = WEXITSTATUS (status);
86 ret_code = -1;
87@@ -3076,6 +3089,9 @@
88 }
89 }
90
91+ if (commands[0].argv[0] != commands[0].prog)
92+ free ((PTR) commands[0].argv[0]);
93+
94 return ret_code;
95 }
96 }
97@@ -6016,6 +6032,224 @@
98 switches[switchnum].validated = 1;
99 }
100
101+#if !(defined (__MSDOS__) || defined (OS2) || defined (VMS))
102+#define RETRY_ICE_ATTEMPTS 2
103+
104+static void
105+retry_ice (const char *prog, const char **argv)
106+{
107+ int nargs, out_arg = -1, quiet = 0, attempt;
108+ int pid, retries, sleep_interval;
109+ const char **new_argv;
110+ char *temp_filenames[RETRY_ICE_ATTEMPTS * 2 + 2];
111+
112+ if (input_filename == NULL || ! strcmp (input_filename, "-"))
113+ return;
114+
115+ for (nargs = 0; argv[nargs] != NULL; ++nargs)
116+ /* Only retry compiler ICEs, not preprocessor ones. */
117+ if (! strcmp (argv[nargs], "-E"))
118+ return;
119+ else if (argv[nargs][0] == '-' && argv[nargs][1] == 'o')
120+ {
121+ if (out_arg == -1)
122+ out_arg = nargs;
123+ else
124+ return;
125+ }
126+ /* If the compiler is going to output any time information,
127+ it might vary between invocations. */
128+ else if (! strcmp (argv[nargs], "-quiet"))
129+ quiet = 1;
130+ else if (! strcmp (argv[nargs], "-ftime-report"))
131+ return;
132+
133+ if (out_arg == -1 || !quiet)
134+ return;
135+
136+ memset (temp_filenames, '\0', sizeof (temp_filenames));
137+ new_argv = alloca ((nargs + 3) * sizeof (const char *));
138+ memcpy (new_argv, argv, (nargs + 1) * sizeof (const char *));
139+ new_argv[nargs++] = "-frandom-seed=0";
140+ new_argv[nargs] = NULL;
141+ if (new_argv[out_arg][2] == '\0')
142+ new_argv[out_arg + 1] = "-";
143+ else
144+ new_argv[out_arg] = "-o-";
145+
146+ for (attempt = 0; attempt < RETRY_ICE_ATTEMPTS + 1; ++attempt)
147+ {
148+ int fd = -1;
149+ int status;
150+
151+ temp_filenames[attempt * 2] = make_temp_file (".out");
152+ temp_filenames[attempt * 2 + 1] = make_temp_file (".err");
153+
154+ if (attempt == RETRY_ICE_ATTEMPTS)
155+ {
156+ int i;
157+ int fd1, fd2;
158+ struct stat st1, st2;
159+ size_t n, len;
160+ char *buf;
161+
162+ buf = xmalloc (8192);
163+
164+ for (i = 0; i < 2; ++i)
165+ {
166+ fd1 = open (temp_filenames[i], O_RDONLY);
167+ fd2 = open (temp_filenames[2 + i], O_RDONLY);
168+
169+ if (fd1 < 0 || fd2 < 0)
170+ {
171+ i = -1;
172+ close (fd1);
173+ close (fd2);
174+ break;
175+ }
176+
177+ if (fstat (fd1, &st1) < 0 || fstat (fd2, &st2) < 0)
178+ {
179+ i = -1;
180+ close (fd1);
181+ close (fd2);
182+ break;
183+ }
184+
185+ if (st1.st_size != st2.st_size)
186+ {
187+ close (fd1);
188+ close (fd2);
189+ break;
190+ }
191+
192+ len = 0;
193+ for (n = st1.st_size; n; n -= len)
194+ {
195+ len = n;
196+ if (len > 4096)
197+ len = 4096;
198+
199+ if (read (fd1, buf, len) != (int) len
200+ || read (fd2, buf + 4096, len) != (int) len)
201+ {
202+ i = -1;
203+ break;
204+ }
205+
206+ if (memcmp (buf, buf + 4096, len) != 0)
207+ break;
208+ }
209+
210+ close (fd1);
211+ close (fd2);
212+
213+ if (n)
214+ break;
215+ }
216+
217+ free (buf);
218+ if (i == -1)
219+ break;
220+
221+ if (i != 2)
222+ {
223+ notice ("The bug is not reproducible, so it is likely a hardware or OS problem.\n");
224+ break;
225+ }
226+
227+ fd = open (temp_filenames[attempt * 2], O_RDWR);
228+ if (fd < 0)
229+ break;
230+ write (fd, "//", 2);
231+ for (i = 0; i < nargs; i++)
232+ {
233+ write (fd, " ", 1);
234+ write (fd, new_argv[i], strlen (new_argv[i]));
235+ }
236+ write (fd, "\n", 1);
237+ new_argv[nargs] = "-E";
238+ new_argv[nargs + 1] = NULL;
239+ }
240+
241+ /* Fork a subprocess; wait and retry if it fails. */
242+ sleep_interval = 1;
243+ pid = -1;
244+ for (retries = 0; retries < 4; retries++)
245+ {
246+ pid = fork ();
247+ if (pid >= 0)
248+ break;
249+ sleep (sleep_interval);
250+ sleep_interval *= 2;
251+ }
252+
253+ if (pid < 0)
254+ break;
255+ else if (pid == 0)
256+ {
257+ if (attempt != RETRY_ICE_ATTEMPTS)
258+ fd = open (temp_filenames[attempt * 2], O_RDWR);
259+ if (fd < 0)
260+ exit (-1);
261+ if (fd != 1)
262+ {
263+ close (1);
264+ dup (fd);
265+ close (fd);
266+ }
267+
268+ fd = open (temp_filenames[attempt * 2 + 1], O_RDWR);
269+ if (fd < 0)
270+ exit (-1);
271+ if (fd != 2)
272+ {
273+ close (2);
274+ dup (fd);
275+ close (fd);
276+ }
277+
278+ if (prog == new_argv[0])
279+ execvp (prog, (char *const *) new_argv);
280+ else
281+ execv (new_argv[0], (char *const *) new_argv);
282+ exit (-1);
283+ }
284+
285+ if (waitpid (pid, &status, 0) < 0)
286+ break;
287+
288+ if (attempt < RETRY_ICE_ATTEMPTS
289+ && (! WIFEXITED (status) || WEXITSTATUS (status) != ICE_EXIT_CODE))
290+ {
291+ notice ("The bug is not reproducible, so it is likely a hardware or OS problem.\n");
292+ break;
293+ }
294+ else if (attempt == RETRY_ICE_ATTEMPTS)
295+ {
296+ close (fd);
297+ if (WIFEXITED (status)
298+ && WEXITSTATUS (status) == SUCCESS_EXIT_CODE)
299+ {
300+ notice ("Preprocessed source stored into %s file, please attach this to your bugreport.\n",
301+ temp_filenames[attempt * 2]);
302+ /* Make sure it is not deleted. */
303+ free (temp_filenames[attempt * 2]);
304+ temp_filenames[attempt * 2] = NULL;
305+ break;
306+ }
307+ }
308+ }
309+
310+ for (attempt = 0; attempt < RETRY_ICE_ATTEMPTS * 2 + 2; attempt++)
311+ if (temp_filenames[attempt])
312+ {
313+ unlink (temp_filenames[attempt]);
314+ free (temp_filenames[attempt]);
315+ }
316+}
317+#endif
318+
319 /* Search for a file named NAME trying various prefixes including the
320 user's -B prefix and some standard ones.
321 Return the absolute file name found. If nothing is found, return NAME. */
322--- gcc/Makefile.in.orig 2007-09-30 10:48:13.000000000 +0000
323+++ gcc/Makefile.in 2007-09-30 10:48:39.000000000 +0000
324@@ -192,6 +192,7 @@
325 build/gengtype-lex.o-warn = -Wno-error
326 # SYSCALLS.c misses prototypes
327 SYSCALLS.c.X-warn = -Wno-strict-prototypes -Wno-error
328+build/gcc.o-warn = -Wno-error
329
330 # All warnings have to be shut off in stage1 if the compiler used then
331 # isn't gcc; configure determines that. WARN_CFLAGS will be either
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.1/libstdc++-pic.dpatch b/meta/recipes-devtools/gcc/gcc-4.5.1/libstdc++-pic.dpatch
deleted file mode 100644
index 70c9e81542..0000000000
--- a/meta/recipes-devtools/gcc/gcc-4.5.1/libstdc++-pic.dpatch
+++ /dev/null
@@ -1,71 +0,0 @@
1#! /bin/sh -e
2
3# DP: Build and install libstdc++_pic.a library.
4
5dir=
6if [ $# -eq 3 -a "$2" = '-d' ]; then
7 pdir="-d $3"
8 dir="$3/"
9elif [ $# -ne 1 ]; then
10 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
11 exit 1
12fi
13case "$1" in
14 -patch)
15 patch $pdir -f --no-backup-if-mismatch -p0 < $0
16 ;;
17 -unpatch)
18 patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
19 ;;
20 *)
21 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
22 exit 1
23esac
24exit 0
25
26diff -ur libstdc++-v3/src/Makefile.am libstdc++-v3/src/Makefile.am
27--- libstdc++-v3/src/Makefile.am~ 2004-04-16 21:04:05.000000000 +0200
28+++ libstdc++-v3/src/Makefile.am 2004-07-03 20:22:43.000000000 +0200
29@@ -210,6 +210,10 @@
30 $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@
31
32
33+install-exec-local:
34+ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o || touch libstdc++_pic.a
35+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
36+
37 # Added bits to build debug library.
38 if GLIBCXX_BUILD_DEBUG
39 all-local: build_debug
40diff -ur libstdc++-v3/src/Makefile.in libstdc++-v3/src/Makefile.in
41--- libstdc++-v3/src/Makefile.in 2004-07-03 06:41:13.000000000 +0200
42+++ libstdc++-v3/src/Makefile.in 2004-07-03 20:25:05.000000000 +0200
43@@ -611,7 +611,7 @@
44
45 install-data-am: install-data-local
46
47-install-exec-am: install-toolexeclibLTLIBRARIES
48+install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
49
50 install-info: install-info-am
51
52@@ -644,6 +644,7 @@
53 distclean-libtool distclean-tags distdir dvi dvi-am html \
54 html-am info info-am install install-am install-data \
55 install-data-am install-data-local install-exec \
56+ install-exec-local \
57 install-exec-am install-info install-info-am install-man \
58 install-strip install-toolexeclibLTLIBRARIES installcheck \
59 installcheck-am installdirs maintainer-clean \
60@@ -729,6 +730,11 @@
61 install_debug:
62 (cd ${debugdir} && $(MAKE) \
63 toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
64+
65+install-exec-local:
66+ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o || touch libstdc++_pic.a
67+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
68+
69 # Tell versions [3.59,3.63) of GNU make to not export all variables.
70 # Otherwise a system limit (for SysV at least) may be exceeded.
71 .NOEXPORT:
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.1/pr30961.dpatch b/meta/recipes-devtools/gcc/gcc-4.5.1/pr30961.dpatch
deleted file mode 100644
index b20fdf5bf5..0000000000
--- a/meta/recipes-devtools/gcc/gcc-4.5.1/pr30961.dpatch
+++ /dev/null
@@ -1,179 +0,0 @@
1#! /bin/sh -e
2
3# DP: <your description>
4
5dir=
6if [ $# -eq 3 -a "$2" = '-d' ]; then
7 pdir="-d $3"
8 dir="$3/"
9elif [ $# -ne 1 ]; then
10 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
11 exit 1
12fi
13case "$1" in
14 -patch)
15 patch $pdir -f --no-backup-if-mismatch -p0 < $0
16 ;;
17 -unpatch)
18 patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
19 ;;
20 *)
21 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
22 exit 1
23esac
24exit 0
25
26From: "H.J. Lu" <hjl@lucon.org>
27Sender: gcc-patches-owner@gcc.gnu.org
28To: gcc-patches@gcc.gnu.org
29Subject: PATCH: PR target/30961: [4.1/4.2/4.3 regression] redundant reg/mem stores/moves
30Date: Mon, 27 Aug 2007 11:34:12 -0700
31
32We start with
33
34(note:HI 3 4 22 2 NOTE_INSN_FUNCTION_BEG)
35
36(insn:HI 6 3 10 2 c.c:3 (set (reg:DF 58 [ <result> ])
37 (subreg:DF (reg/v:DI 59 [ in ]) 0)) 102 {*movdf_integer_rex64} (expr_list:REG_DEAD (reg/v:DI 59 [ in ])
38 (nil)))
39
40(insn:HI 10 6 16 2 c.c:7 (set (reg/i:DF 21 xmm0 [ <result> ])
41 (reg:DF 58 [ <result> ])) 102 {*movdf_integer_rex64} (expr_list:REG_DEAD (reg:DF 58 [ <result> ])
42 (nil)))
43
44(insn:HI 16 10 0 2 c.c:7 (use (reg/i:DF 21 xmm0 [ <result> ])) -1 (nil))
45
46we are trying to allocate registers for insn 6 and we allocate
47xmm0 for the return value. Reload doesn't check if xmm0 can be used for
48DF 59, it allocates xmm1 for DF 59 and generates:
49
50Reloads for insn # 6
51Reload 0: reload_in (DF) = (reg:DF 5 di)
52 SSE_REGS, RELOAD_FOR_INPUT (opnum = 1), can't combine
53 reload_in_reg: (subreg:DF (reg/v:DI 5 di [orig:59 in ] [59]) 0)
54 reload_reg_rtx: (reg:DF 22 xmm1)
55...
56
57(note:HI 4 1 3 2 [bb 2] NOTE_INSN_BASIC_BLOCK)
58
59(note:HI 3 4 22 2 NOTE_INSN_FUNCTION_BEG)
60
61(insn 22 3 23 2 c.c:3 (set (mem/c:DF (plus:DI (reg/f:DI 7 sp)
62 (const_int -8 [0xfffffffffffffff8])) [0 S8 A8])
63 (reg:DF 5 di)) 102 {*movdf_integer_rex64} (nil))
64
65(insn 23 22 6 2 c.c:3 (set (reg:DF 22 xmm1)
66 (mem/c:DF (plus:DI (reg/f:DI 7 sp)
67 (const_int -8 [0xfffffffffffffff8])) [0 S8 A8])) 102 {*movdf_integer_rex64} (nil))
68
69(insn:HI 6 23 16 2 c.c:3 (set (reg:DF 21 xmm0 [orig:58 <result> ] [58])
70 (reg:DF 22 xmm1)) 102 {*movdf_integer_rex64} (nil))
71
72(insn 16 6 21 2 c.c:7 (use (reg/i:DF 21 xmm0 [ <result> ])) -1 (nil))
73
74This patch tries to use the destination register when reloading for input. It
75generates
76
77Reloads for insn # 6
78Reload 0: reload_in (DF) = (reg:DF 5 di)
79 SSE_REGS, RELOAD_FOR_INPUT (opnum = 1), can't combine
80 reload_in_reg: (subreg:DF (reg/v:DI 5 di [orig:59 in ] [59]) 0)
81 reload_reg_rtx: (reg:DF 21 xmm0)
82...
83(note:HI 4 1 3 2 [bb 2] NOTE_INSN_BASIC_BLOCK)
84
85(note:HI 3 4 22 2 NOTE_INSN_FUNCTION_BEG)
86
87(insn 22 3 23 2 c.c:3 (set (mem/c:DF (plus:DI (reg/f:DI 7 sp)
88 (const_int -8 [0xfffffffffffffff8])) [0 S8 A8])
89 (reg:DF 5 di)) 102 {*movdf_integer_rex64} (nil))
90
91(insn 23 22 6 2 c.c:3 (set (reg:DF 21 xmm0)
92 (mem/c:DF (plus:DI (reg/f:DI 7 sp)
93 (const_int -8 [0xfffffffffffffff8])) [0 S8 A8])) 102 {*movdf_integer_rex64} (nil))
94
95(insn:HI 6 23 10 2 c.c:3 (set (reg:DF 22 xmm1 [orig:58 <result> ] [58])
96 (reg:DF 21 xmm0)) 102 {*movdf_integer_rex64} (nil))
97
98(insn:HI 10 6 16 2 c.c:7 (set (reg/i:DF 21 xmm0 [ <result> ])
99 (reg:DF 22 xmm1 [orig:58 <result> ] [58])) 102 {*movdf_integer_rex64} (nil))
100
101(insn 16 10 21 2 c.c:7 (use (reg/i:DF 21 xmm0 [ <result> ])) -1 (nil))
102
103
104H.J.
105----
106gcc/
107
1082007-08-27 H.J. Lu <hongjiu.lu@intel.com>
109
110 PR target/30961
111 * reload1.c (find_reg): Favor the hard register in destination
112 if it is usable and a memory location is needed for reload
113 input.
114
115gcc/testsuite/
116
1172007-08-27 H.J. Lu <hongjiu.lu@intel.com>
118
119 PR target/30961
120 * gcc.target/i386/pr30961-1.c: New.
121
122--- gcc/reload1.c.second 2007-08-27 09:35:08.000000000 -0700
123+++ gcc/reload1.c 2007-08-27 09:36:33.000000000 -0700
124@@ -1781,6 +1781,20 @@ find_reg (struct insn_chain *chain, int
125 HARD_REG_SET not_usable;
126 HARD_REG_SET used_by_other_reload;
127 reg_set_iterator rsi;
128+#ifdef SECONDARY_MEMORY_NEEDED
129+ rtx body = PATTERN (chain->insn);
130+ unsigned int dest_reg = FIRST_PSEUDO_REGISTER;
131+
132+ if (GET_CODE (body) == SET)
133+ {
134+ rtx dest = SET_DEST (body);
135+
136+ if ((REG_P (dest)
137+ || (GET_CODE (dest) == SUBREG
138+ && REG_P (SUBREG_REG (dest)))))
139+ dest_reg = reg_or_subregno (dest);
140+ }
141+#endif
142
143 COPY_HARD_REG_SET (not_usable, bad_spill_regs);
144 IOR_HARD_REG_SET (not_usable, bad_spill_regs_global);
145@@ -1821,6 +1835,18 @@ find_reg (struct insn_chain *chain, int
146 this_cost--;
147 if (rl->out && REG_P (rl->out) && REGNO (rl->out) == regno)
148 this_cost--;
149+#ifdef SECONDARY_MEMORY_NEEDED
150+ /* If a memory location is needed for rl->in and dest_reg
151+ is usable, we will favor it. */
152+ else if (dest_reg == regno
153+ && rl->in
154+ && REG_P (rl->in)
155+ && REGNO (rl->in) < FIRST_PSEUDO_REGISTER
156+ && SECONDARY_MEMORY_NEEDED (REGNO_REG_CLASS (REGNO (rl->in)),
157+ rl->class,
158+ rl->mode))
159+ this_cost = 0;
160+#endif
161 if (this_cost < best_cost
162 /* Among registers with equal cost, prefer caller-saved ones, or
163 use REG_ALLOC_ORDER if it is defined. */
164--- gcc/testsuite/gcc.target/i386/pr30961-1.c.second 2007-08-27 11:01:59.000000000 -0700
165+++ gcc/testsuite/gcc.target/i386/pr30961-1.c 2007-08-27 11:02:51.000000000 -0700
166@@ -0,0 +1,13 @@
167+/* { dg-do compile } */
168+/* { dg-require-effective-target lp64 } */
169+/* { dg-options "-O2" } */
170+
171+double
172+convert (long long in)
173+{
174+ double f;
175+ __builtin_memcpy( &f, &in, sizeof( in ) );
176+ return f;
177+}
178+
179+/* { dg-final { scan-assembler-not "movapd" } } */
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.1/pr35942.patch b/meta/recipes-devtools/gcc/gcc-4.5.1/pr35942.patch
deleted file mode 100644
index da610f5189..0000000000
--- a/meta/recipes-devtools/gcc/gcc-4.5.1/pr35942.patch
+++ /dev/null
@@ -1,38 +0,0 @@
1Fix PR 35942: remove -lstdc++ from libtool postdeps for CXX.
2
3libstdc++-v3/ChangeLog:
42010-01-04 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5
6 PR libstdc++/35942
7 * configure.ac: Remove -lstdc++ from libtool's postdeps_CXX.
8 * configure: Regenerate.
9
10
11Index: gcc-4.3.3/libstdc++-v3/configure
12===================================================================
13--- gcc-4.3.3.orig/libstdc++-v3/configure 2010-03-26 17:57:51.000000000 +0000
14+++ gcc-4.3.3/libstdc++-v3/configure 2010-03-26 17:57:58.000000000 +0000
15@@ -13759,6 +13759,9 @@
16
17
18
19+# Eliminate -lstdc++ addition to postdeps for cross compiles.
20+postdeps_CXX=`echo " $postdeps_CXX " | sed 's, -lstdc++ ,,g'`
21+
22 # Possibly disable most of the library.
23 ## TODO: Consider skipping unncessary tests altogether in this case, rather
24 ## than just ignoring the results. Faster /and/ more correct, win win.
25Index: gcc-4.3.3/libstdc++-v3/configure.ac
26===================================================================
27--- gcc-4.3.3.orig/libstdc++-v3/configure.ac 2010-03-26 17:57:54.000000000 +0000
28+++ gcc-4.3.3/libstdc++-v3/configure.ac 2010-03-26 17:57:58.000000000 +0000
29@@ -89,6 +89,9 @@
30 AC_SUBST(enable_shared)
31 AC_SUBST(enable_static)
32
33+# Eliminate -lstdc++ addition to postdeps for cross compiles.
34+postdeps_CXX=`echo " $postdeps_CXX " | sed 's, -lstdc++ ,,g'`
35+
36 # Possibly disable most of the library.
37 ## TODO: Consider skipping unncessary tests altogether in this case, rather
38 ## than just ignoring the results. Faster /and/ more correct, win win.
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/307-locale_facets.patch b/meta/recipes-devtools/gcc/gcc-4.6.0/307-locale_facets.patch
deleted file mode 100644
index 774fcfa2ca..0000000000
--- a/meta/recipes-devtools/gcc/gcc-4.6.0/307-locale_facets.patch
+++ /dev/null
@@ -1,19 +0,0 @@
1This patch fixes a bug into ostream::operator<<(double) due to the wrong size
2passed into the __convert_from_v method. The wrong size is then passed to
3std::snprintf function, that, on uClibc, doens't handle sized 0 buffer.
4
5Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
6
7Index: gcc-4.3.1/libstdc++-v3/include/bits/locale_facets.tcc
8===================================================================
9--- gcc-4.3.1.orig/libstdc++-v3/include/bits/locale_facets.tcc 2007-11-26 17:59:41.000000000 -0800
10+++ gcc-4.3.1/libstdc++-v3/include/bits/locale_facets.tcc 2008-08-16 02:14:48.000000000 -0700
11@@ -1004,7 +1004,7 @@
12 const int __cs_size = __fixed ? __max_exp + __prec + 4
13 : __max_digits * 2 + __prec;
14 char* __cs = static_cast<char*>(__builtin_alloca(__cs_size));
15- __len = std::__convert_from_v(_S_get_c_locale(), __cs, 0, __fbuf,
16+ __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, __fbuf,
17 __prec, __v);
18 #endif
19
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/602-sdk-libstdc++-includes.patch b/meta/recipes-devtools/gcc/gcc-4.6.0/602-sdk-libstdc++-includes.patch
deleted file mode 100644
index 23fce7544d..0000000000
--- a/meta/recipes-devtools/gcc/gcc-4.6.0/602-sdk-libstdc++-includes.patch
+++ /dev/null
@@ -1,20 +0,0 @@
1--- gcc-4.1.0/libstdc++-v3/fragment.am 2005-03-21 11:40:14.000000000 -0600
2+++ gcc-4.1.0-patched/libstdc++-v3/fragment.am 2005-04-25 20:14:39.856251785 -0500
3@@ -21,5 +21,5 @@
4 $(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once
5
6 # -I/-D flags to pass when compiling.
7-AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
8+AM_CPPFLAGS = $(GLIBCXX_INCLUDES) -I$(toplevel_srcdir)/include
9
10--- gcc-4.1.0/libstdc++-v3/libmath/Makefile.am 2005-03-21 11:40:18.000000000 -0600
11+++ gcc-4.1.0-patched/libstdc++-v3/libmath/Makefile.am 2005-04-25 20:14:39.682280735 -0500
12@@ -35,7 +35,7 @@
13
14 libmath_la_SOURCES = stubs.c
15
16-AM_CPPFLAGS = $(CANADIAN_INCLUDES)
17+AM_CPPFLAGS = $(CANADIAN_INCLUDES) -I$(toplevel_srcdir)/include
18
19 # Only compiling "C" sources in this directory.
20 LIBTOOL = @LIBTOOL@ --tag CC
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/arm-bswapsi2.patch b/meta/recipes-devtools/gcc/gcc-4.6.0/arm-bswapsi2.patch
deleted file mode 100644
index 7ac61a6d63..0000000000
--- a/meta/recipes-devtools/gcc/gcc-4.6.0/arm-bswapsi2.patch
+++ /dev/null
@@ -1,13 +0,0 @@
1Index: gcc-4.5/gcc/config/arm/arm.md
2===================================================================
3--- gcc-4.5.orig/gcc/config/arm/arm.md 2010-06-17 09:13:07.000000000 -0700
4+++ gcc-4.5/gcc/config/arm/arm.md 2010-06-22 08:08:45.397212002 -0700
5@@ -11267,7 +11267,7 @@
6 (define_expand "bswapsi2"
7 [(set (match_operand:SI 0 "s_register_operand" "=r")
8 (bswap:SI (match_operand:SI 1 "s_register_operand" "r")))]
9-"TARGET_EITHER"
10+"TARGET_EITHER && (arm_arch6 && !optimize_size)"
11 "
12 if (!arm_arch6)
13 {
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/arm-unbreak-eabi-armv4t.dpatch b/meta/recipes-devtools/gcc/gcc-4.6.0/arm-unbreak-eabi-armv4t.dpatch
deleted file mode 100644
index 7bb8887068..0000000000
--- a/meta/recipes-devtools/gcc/gcc-4.6.0/arm-unbreak-eabi-armv4t.dpatch
+++ /dev/null
@@ -1,36 +0,0 @@
1#! /bin/sh -e
2
3# DP: Fix armv4t build on ARM
4
5dir=
6if [ $# -eq 3 -a "$2" = '-d' ]; then
7 pdir="-d $3"
8 dir="$3/"
9elif [ $# -ne 1 ]; then
10 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
11 exit 1
12fi
13case "$1" in
14 -patch)
15 patch $pdir -f --no-backup-if-mismatch -p1 < $0
16 ;;
17 -unpatch)
18 patch $pdir -f --no-backup-if-mismatch -R -p1 < $0
19 ;;
20 *)
21 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
22 exit 1
23esac
24exit 0
25
26--- src/gcc/config/arm/linux-eabi.h.orig 2007-11-24 12:37:38.000000000 +0000
27+++ src/gcc/config/arm/linux-eabi.h 2007-11-24 12:39:41.000000000 +0000
28@@ -44,7 +44,7 @@
29 The ARM10TDMI core is the default for armv5t, so set
30 SUBTARGET_CPU_DEFAULT to achieve this. */
31 #undef SUBTARGET_CPU_DEFAULT
32-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
33+#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi
34
35 /* TARGET_BIG_ENDIAN_DEFAULT is set in
36 config.gcc for big endian configurations. */
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4.0.2-e300c2c3.patch b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4.0.2-e300c2c3.patch
deleted file mode 100644
index d1df8b2716..0000000000
--- a/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4.0.2-e300c2c3.patch
+++ /dev/null
@@ -1,319 +0,0 @@
1Adds support for Freescale Power architecture e300c2 and e300c3 cores.
2http://www.bitshrine.org/gpp/tc-fsl-x86lnx-e300c3-nptl-4.0.2-2.src.rpm
3
4Leon Woestenberg <leonw@mailcan.com>
5
6---
7 gcc/config.gcc | 2
8 gcc/config/rs6000/e300c2c3.md | 189 ++++++++++++++++++++++++++++++++++++++++++
9 gcc/config/rs6000/rs6000.c | 24 +++++
10 gcc/config/rs6000/rs6000.h | 4
11 gcc/config/rs6000/rs6000.md | 3
12 5 files changed, 220 insertions(+), 2 deletions(-)
13
14Index: gcc-4.3.1/gcc/config/rs6000/e300c2c3.md
15===================================================================
16--- /dev/null 1970-01-01 00:00:00.000000000 +0000
17+++ gcc-4.3.1/gcc/config/rs6000/e300c2c3.md 2008-08-23 16:51:33.000000000 -0700
18@@ -0,0 +1,189 @@
19+;; Pipeline description for Motorola PowerPC e300c3 core.
20+;; Copyright (C) 2003 Free Software Foundation, Inc.
21+;;
22+;; This file is part of GCC.
23+
24+;; GCC is free software; you can redistribute it and/or modify it
25+;; under the terms of the GNU General Public License as published
26+;; by the Free Software Foundation; either version 2, or (at your
27+;; option) any later version.
28+
29+;; GCC is distributed in the hope that it will be useful, but WITHOUT
30+;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
31+;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
32+;; License for more details.
33+
34+;; You should have received a copy of the GNU General Public License
35+;; along with GCC; see the file COPYING. If not, write to the
36+;; Free Software Foundation, 59 Temple Place - Suite 330, Boston,
37+;; MA 02111-1307, USA.
38+
39+(define_automaton "ppce300c3_most,ppce300c3_long,ppce300c3_retire")
40+(define_cpu_unit "ppce300c3_decode_0,ppce300c3_decode_1" "ppce300c3_most")
41+
42+;; We don't simulate general issue queue (GIC). If we have SU insn
43+;; and then SU1 insn, they can not be issued on the same cycle
44+;; (although SU1 insn and then SU insn can be issued) because the SU
45+;; insn will go to SU1 from GIC0 entry. Fortunately, the first cycle
46+;; multipass insn scheduling will find the situation and issue the SU1
47+;; insn and then the SU insn.
48+(define_cpu_unit "ppce300c3_issue_0,ppce300c3_issue_1" "ppce300c3_most")
49+
50+;; We could describe completion buffers slots in combination with the
51+;; retirement units and the order of completion but the result
52+;; automaton would behave in the same way because we can not describe
53+;; real latency time with taking in order completion into account.
54+;; Actually we could define the real latency time by querying reserved
55+;; automaton units but the current scheduler uses latency time before
56+;; issuing insns and making any reservations.
57+;;
58+;; So our description is aimed to achieve a insn schedule in which the
59+;; insns would not wait in the completion buffer.
60+(define_cpu_unit "ppce300c3_retire_0,ppce300c3_retire_1" "ppce300c3_retire")
61+
62+;; Branch unit:
63+(define_cpu_unit "ppce300c3_bu" "ppce300c3_most")
64+
65+;; IU:
66+(define_cpu_unit "ppce300c3_iu0_stage0,ppce300c3_iu1_stage0" "ppce300c3_most")
67+
68+;; IU: This used to describe non-pipelined division.
69+(define_cpu_unit "ppce300c3_mu_div" "ppce300c3_long")
70+
71+;; SRU:
72+(define_cpu_unit "ppce300c3_sru_stage0" "ppce300c3_most")
73+
74+;; Here we simplified LSU unit description not describing the stages.
75+(define_cpu_unit "ppce300c3_lsu" "ppce300c3_most")
76+
77+;; FPU:
78+(define_cpu_unit "ppce300c3_fpu" "ppce300c3_most")
79+
80+;; The following units are used to make automata deterministic
81+(define_cpu_unit "present_ppce300c3_decode_0" "ppce300c3_most")
82+(define_cpu_unit "present_ppce300c3_issue_0" "ppce300c3_most")
83+(define_cpu_unit "present_ppce300c3_retire_0" "ppce300c3_retire")
84+(define_cpu_unit "present_ppce300c3_iu0_stage0" "ppce300c3_most")
85+
86+;; The following sets to make automata deterministic when option ndfa is used.
87+(presence_set "present_ppce300c3_decode_0" "ppce300c3_decode_0")
88+(presence_set "present_ppce300c3_issue_0" "ppce300c3_issue_0")
89+(presence_set "present_ppce300c3_retire_0" "ppce300c3_retire_0")
90+(presence_set "present_ppce300c3_iu0_stage0" "ppce300c3_iu0_stage0")
91+
92+;; Some useful abbreviations.
93+(define_reservation "ppce300c3_decode"
94+ "ppce300c3_decode_0|ppce300c3_decode_1+present_ppce300c3_decode_0")
95+(define_reservation "ppce300c3_issue"
96+ "ppce300c3_issue_0|ppce300c3_issue_1+present_ppce300c3_issue_0")
97+(define_reservation "ppce300c3_retire"
98+ "ppce300c3_retire_0|ppce300c3_retire_1+present_ppce300c3_retire_0")
99+(define_reservation "ppce300c3_iu_stage0"
100+ "ppce300c3_iu0_stage0|ppce300c3_iu1_stage0+present_ppce300c3_iu0_stage0")
101+
102+;; Compares can be executed either one of the IU or SRU
103+(define_insn_reservation "ppce300c3_cmp" 1
104+ (and (eq_attr "type" "cmp,compare,delayed_compare,fast_compare")
105+ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
106+ "ppce300c3_decode,ppce300c3_issue+(ppce300c3_iu_stage0|ppce300c3_sru_stage0) \
107+ +ppce300c3_retire")
108+
109+;; Other one cycle IU insns
110+(define_insn_reservation "ppce300c3_iu" 1
111+ (and (eq_attr "type" "integer,insert_word")
112+ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
113+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_iu_stage0+ppce300c3_retire")
114+
115+;; Branch. Actually this latency time is not used by the scheduler.
116+(define_insn_reservation "ppce300c3_branch" 1
117+ (and (eq_attr "type" "jmpreg,branch")
118+ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
119+ "ppce300c3_decode,ppce300c3_bu,ppce300c3_retire")
120+
121+;; Multiply is non-pipelined but can be executed in any IU
122+(define_insn_reservation "ppce300c3_multiply" 2
123+ (and (eq_attr "type" "imul,imul2,imul3,imul_compare")
124+ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
125+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_iu_stage0, \
126+ ppce300c3_iu_stage0+ppce300c3_retire")
127+
128+;; Divide. We use the average latency time here. We omit reserving a
129+;; retire unit because of the result automata will be huge.
130+(define_insn_reservation "ppce300c3_divide" 20
131+ (and (eq_attr "type" "idiv")
132+ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
133+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_iu_stage0+ppce300c3_mu_div,\
134+ ppce300c3_mu_div*19")
135+
136+;; CR logical
137+(define_insn_reservation "ppce300c3_cr_logical" 1
138+ (and (eq_attr "type" "cr_logical,delayed_cr")
139+ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
140+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_sru_stage0+ppce300c3_retire")
141+
142+;; Mfcr
143+(define_insn_reservation "ppce300c3_mfcr" 1
144+ (and (eq_attr "type" "mfcr")
145+ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
146+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_sru_stage0+ppce300c3_retire")
147+
148+;; Mtcrf
149+(define_insn_reservation "ppce300c3_mtcrf" 1
150+ (and (eq_attr "type" "mtcr")
151+ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
152+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_sru_stage0+ppce300c3_retire")
153+
154+;; Mtjmpr
155+(define_insn_reservation "ppce300c3_mtjmpr" 1
156+ (and (eq_attr "type" "mtjmpr,mfjmpr")
157+ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
158+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_sru_stage0+ppce300c3_retire")
159+
160+;; Float point instructions
161+(define_insn_reservation "ppce300c3_fpcompare" 3
162+ (and (eq_attr "type" "fpcompare")
163+ (eq_attr "cpu" "ppce300c3"))
164+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_fpu,nothing,ppce300c3_retire")
165+
166+(define_insn_reservation "ppce300c3_fp" 3
167+ (and (eq_attr "type" "fp")
168+ (eq_attr "cpu" "ppce300c3"))
169+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_fpu,nothing,ppce300c3_retire")
170+
171+(define_insn_reservation "ppce300c3_dmul" 4
172+ (and (eq_attr "type" "dmul")
173+ (eq_attr "cpu" "ppce300c3"))
174+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_fpu,ppce300c3_fpu,nothing,ppce300c3_retire")
175+
176+; Divides are not pipelined
177+(define_insn_reservation "ppce300c3_sdiv" 18
178+ (and (eq_attr "type" "sdiv")
179+ (eq_attr "cpu" "ppce300c3"))
180+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_fpu,ppce300c3_fpu*17")
181+
182+(define_insn_reservation "ppce300c3_ddiv" 33
183+ (and (eq_attr "type" "ddiv")
184+ (eq_attr "cpu" "ppce300c3"))
185+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_fpu,ppce300c3_fpu*32")
186+
187+;; Loads
188+(define_insn_reservation "ppce300c3_load" 2
189+ (and (eq_attr "type" "load,load_ext,load_ext_u,load_ext_ux,load_ux,load_u")
190+ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
191+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_lsu,ppce300c3_retire")
192+
193+(define_insn_reservation "ppce300c3_fpload" 2
194+ (and (eq_attr "type" "fpload,fpload_ux,fpload_u")
195+ (eq_attr "cpu" "ppce300c3"))
196+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_lsu,ppce300c3_retire")
197+
198+;; Stores.
199+(define_insn_reservation "ppce300c3_store" 2
200+ (and (eq_attr "type" "store,store_ux,store_u")
201+ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
202+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_lsu,ppce300c3_retire")
203+
204+(define_insn_reservation "ppce300c3_fpstore" 2
205+ (and (eq_attr "type" "fpstore,fpstore_ux,fpstore_u")
206+ (eq_attr "cpu" "ppce300c3"))
207+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_lsu,ppce300c3_retire")
208Index: gcc-4.3.1/gcc/config/rs6000/rs6000.c
209===================================================================
210--- gcc-4.3.1.orig/gcc/config/rs6000/rs6000.c 2008-08-23 16:49:39.000000000 -0700
211+++ gcc-4.3.1/gcc/config/rs6000/rs6000.c 2008-08-23 16:54:25.000000000 -0700
212@@ -669,6 +669,21 @@ struct processor_costs ppc8540_cost = {
213 1, /* prefetch streams /*/
214 };
215
216+/* Instruction costs on E300C2 and E300C3 cores. */
217+static const
218+struct processor_costs ppce300c2c3_cost = {
219+ COSTS_N_INSNS (4), /* mulsi */
220+ COSTS_N_INSNS (4), /* mulsi_const */
221+ COSTS_N_INSNS (4), /* mulsi_const9 */
222+ COSTS_N_INSNS (4), /* muldi */
223+ COSTS_N_INSNS (19), /* divsi */
224+ COSTS_N_INSNS (19), /* divdi */
225+ COSTS_N_INSNS (3), /* fp */
226+ COSTS_N_INSNS (4), /* dmul */
227+ COSTS_N_INSNS (18), /* sdiv */
228+ COSTS_N_INSNS (33), /* ddiv */
229+};
230+
231 /* Instruction costs on POWER4 and POWER5 processors. */
232 static const
233 struct processor_costs power4_cost = {
234@@ -1420,6 +1435,8 @@ rs6000_override_options (const char *def
235 {"8540", PROCESSOR_PPC8540, POWERPC_BASE_MASK | MASK_STRICT_ALIGN},
236 /* 8548 has a dummy entry for now. */
237 {"8548", PROCESSOR_PPC8540, POWERPC_BASE_MASK | MASK_STRICT_ALIGN},
238+ {"e300c2", PROCESSOR_PPCE300C2, POWERPC_BASE_MASK | MASK_SOFT_FLOAT},
239+ {"e300c3", PROCESSOR_PPCE300C3, POWERPC_BASE_MASK},
240 {"860", PROCESSOR_MPCCORE, POWERPC_BASE_MASK | MASK_SOFT_FLOAT},
241 {"970", PROCESSOR_POWER4,
242 POWERPC_7400_MASK | MASK_PPC_GPOPT | MASK_MFCRF | MASK_POWERPC64},
243@@ -1845,6 +1862,11 @@ rs6000_override_options (const char *def
244 rs6000_cost = &ppc8540_cost;
245 break;
246
247+ case PROCESSOR_PPCE300C2:
248+ case PROCESSOR_PPCE300C3:
249+ rs6000_cost = &ppce300c2c3_cost;
250+ break;
251+
252 case PROCESSOR_POWER4:
253 case PROCESSOR_POWER5:
254 rs6000_cost = &power4_cost;
255@@ -18606,6 +18628,8 @@ rs6000_issue_rate (void)
256 case CPU_PPC7400:
257 case CPU_PPC8540:
258 case CPU_CELL:
259+ case CPU_PPCE300C2:
260+ case CPU_PPCE300C3:
261 return 2;
262 case CPU_RIOS2:
263 case CPU_PPC604:
264Index: gcc-4.3.1/gcc/config/rs6000/rs6000.h
265===================================================================
266--- gcc-4.3.1.orig/gcc/config/rs6000/rs6000.h 2008-01-26 09:18:35.000000000 -0800
267+++ gcc-4.3.1/gcc/config/rs6000/rs6000.h 2008-08-23 16:55:30.000000000 -0700
268@@ -117,6 +117,8 @@
269 %{mcpu=G5: -mpower4 -maltivec} \
270 %{mcpu=8540: -me500} \
271 %{mcpu=8548: -me500} \
272+%{mcpu=e300c2: -mppc} \
273+%{mcpu=e300c3: -mppc -mpmr} \
274 %{maltivec: -maltivec} \
275 -many"
276
277@@ -262,6 +264,8 @@ enum processor_type
278 PROCESSOR_PPC7400,
279 PROCESSOR_PPC7450,
280 PROCESSOR_PPC8540,
281+ PROCESSOR_PPCE300C2,
282+ PROCESSOR_PPCE300C3,
283 PROCESSOR_POWER4,
284 PROCESSOR_POWER5,
285 PROCESSOR_POWER6,
286Index: gcc-4.3.1/gcc/config/rs6000/rs6000.md
287===================================================================
288--- gcc-4.3.1.orig/gcc/config/rs6000/rs6000.md 2008-02-13 16:14:45.000000000 -0800
289+++ gcc-4.3.1/gcc/config/rs6000/rs6000.md 2008-08-23 16:57:29.000000000 -0700
290@@ -133,7 +133,7 @@
291 ;; Processor type -- this attribute must exactly match the processor_type
292 ;; enumeration in rs6000.h.
293
294-(define_attr "cpu" "rios1,rios2,rs64a,mpccore,ppc403,ppc405,ppc440,ppc601,ppc603,ppc604,ppc604e,ppc620,ppc630,ppc750,ppc7400,ppc7450,ppc8540,power4,power5,power6,cell"
295+(define_attr "cpu" "rios1,rios2,rs64a,mpccore,ppc403,ppc405,ppc440,ppc601,ppc603,ppc604,ppc604e,ppc620,ppc630,ppc750,ppc7400,ppc7450,ppc8540,power4,power5,power6,cell,ppce300c2,ppce300c3"
296 (const (symbol_ref "rs6000_cpu_attr")))
297
298
299@@ -166,6 +166,7 @@
300 (include "7xx.md")
301 (include "7450.md")
302 (include "8540.md")
303+(include "e300c2c3.md")
304 (include "power4.md")
305 (include "power5.md")
306 (include "power6.md")
307Index: gcc-4.3.1/gcc/config.gcc
308===================================================================
309--- gcc-4.3.1.orig/gcc/config.gcc 2008-08-23 16:49:43.000000000 -0700
310+++ gcc-4.3.1/gcc/config.gcc 2008-08-23 17:03:55.000000000 -0700
311@@ -3144,7 +3144,7 @@ case "${target}" in
312 | rios | rios1 | rios2 | rsc | rsc1 | rs64a \
313 | 401 | 403 | 405 | 405fp | 440 | 440fp | 505 \
314 | 601 | 602 | 603 | 603e | ec603e | 604 \
315- | 604e | 620 | 630 | 740 | 750 | 7400 | 7450 \
316+ | 604e | 620 | 630 | 740 | 750 | 7400 | 7450 | e300c[23] \
317 | 854[08] | 801 | 821 | 823 | 860 | 970 | G3 | G4 | G5 | cell)
318 # OK
319 ;;
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-arm-frename-registers.patch b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-arm-frename-registers.patch
deleted file mode 100644
index 280b90358e..0000000000
--- a/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-arm-frename-registers.patch
+++ /dev/null
@@ -1,25 +0,0 @@
1http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35964
2Index: gcc-4.3.0/gcc/regrename.c
3===================================================================
4--- gcc-4.3.0.orig/gcc/regrename.c 2008-05-28 08:31:15.000000000 -0700
5+++ gcc-4.3.0/gcc/regrename.c 2008-05-28 08:34:00.000000000 -0700
6@@ -782,6 +782,10 @@
7 || (predicated && recog_data.operand_type[i] == OP_OUT))
8 recog_data.operand_type[i] = OP_INOUT;
9 }
10+ /* Unshare dup_loc RTL */
11+ for (i = 0; i < recog_data.n_dups; i++)
12+ *recog_data.dup_loc[i] = copy_rtx(*recog_data.dup_loc[i]);
13+
14
15 /* Step 1: Close chains for which we have overlapping reads. */
16 for (i = 0; i < n_ops; i++)
17@@ -813,7 +817,7 @@
18 OP_IN, 0);
19
20 for (i = 0; i < recog_data.n_dups; i++)
21- *recog_data.dup_loc[i] = copy_rtx (old_dups[i]);
22+ *recog_data.dup_loc[i] = old_dups[i];
23 for (i = 0; i < n_ops; i++)
24 *recog_data.operand_loc[i] = old_operands[i];
25 if (recog_data.n_dups)
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-ice-hack.dpatch b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-ice-hack.dpatch
deleted file mode 100644
index 84c5ef2ebd..0000000000
--- a/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-ice-hack.dpatch
+++ /dev/null
@@ -1,331 +0,0 @@
1#! /bin/sh -e
2
3# DP: Retry the build on an ice, save the calling options and preprocessed
4# DP: source when the ice is reproducible.
5
6dir=
7if [ $# -eq 3 -a "$2" = '-d' ]; then
8 pdir="-d $3"
9 dir="$3/"
10elif [ $# -ne 1 ]; then
11 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
12 exit 1
13fi
14case "$1" in
15 -patch)
16 patch $pdir -f --no-backup-if-mismatch -p0 < $0
17 ;;
18 -unpatch)
19 patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
20 ;;
21 *)
22 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
23 exit 1
24esac
25exit 0
26
272004-01-23 Jakub Jelinek <jakub@redhat.com>
28
29 * system.h (ICE_EXIT_CODE): Define.
30 * gcc.c (execute): Don't free first string early, but at the end
31 of the function. Call retry_ice if compiler exited with
32 ICE_EXIT_CODE.
33 (retry_ice): New function.
34 * diagnostic.c (diagnostic_count_diagnostic,
35 diagnostic_action_after_output, error_recursion): Exit with
36 ICE_EXIT_CODE instead of FATAL_EXIT_CODE.
37
38--- gcc/diagnostic.c.orig 2007-09-30 10:48:13.000000000 +0000
39+++ gcc/diagnostic.c 2007-09-30 10:49:57.000000000 +0000
40@@ -244,7 +244,7 @@
41 fnotice (stderr, "Please submit a full bug report,\n"
42 "with preprocessed source if appropriate.\n"
43 "See %s for instructions.\n", bug_report_url);
44- exit (ICE_EXIT_CODE);
45+ exit (FATAL_EXIT_CODE);
46
47 case DK_FATAL:
48 if (context->abort_on_error)
49--- gcc/gcc.c.orig 2007-09-30 10:48:13.000000000 +0000
50+++ gcc/gcc.c 2007-09-30 10:48:39.000000000 +0000
51@@ -357,6 +357,9 @@
52 #if defined(HAVE_TARGET_OBJECT_SUFFIX) || defined(HAVE_TARGET_EXECUTABLE_SUFFIX)
53 static const char *convert_filename (const char *, int, int);
54 #endif
55+#if !(defined (__MSDOS__) || defined (OS2) || defined (VMS))
56+static void retry_ice (const char *prog, const char **argv);
57+#endif
58
59 static const char *getenv_spec_function (int, const char **);
60 static const char *if_exists_spec_function (int, const char **);
61@@ -2999,7 +3002,7 @@
62 }
63 }
64
65- if (string != commands[i].prog)
66+ if (i && string != commands[i].prog)
67 free (CONST_CAST (char *, string));
68 }
69
70@@ -3056,6 +3059,16 @@
71 else if (WIFEXITED (status)
72 && WEXITSTATUS (status) >= MIN_FATAL_STATUS)
73 {
74+#if !(defined (__MSDOS__) || defined (OS2) || defined (VMS))
75+ /* For ICEs in cc1, cc1obj, cc1plus see if it is
76+ reproducible or not. */
77+ char *p;
78+ if (WEXITSTATUS (status) == ICE_EXIT_CODE
79+ && i == 0
80+ && (p = strrchr (commands[0].argv[0], DIR_SEPARATOR))
81+ && ! strncmp (p + 1, "cc1", 3))
82+ retry_ice (commands[0].prog, commands[0].argv);
83+#endif
84 if (WEXITSTATUS (status) > greatest_status)
85 greatest_status = WEXITSTATUS (status);
86 ret_code = -1;
87@@ -3076,6 +3089,9 @@
88 }
89 }
90
91+ if (commands[0].argv[0] != commands[0].prog)
92+ free ((PTR) commands[0].argv[0]);
93+
94 return ret_code;
95 }
96 }
97@@ -6016,6 +6032,224 @@
98 switches[switchnum].validated = 1;
99 }
100
101+#if !(defined (__MSDOS__) || defined (OS2) || defined (VMS))
102+#define RETRY_ICE_ATTEMPTS 2
103+
104+static void
105+retry_ice (const char *prog, const char **argv)
106+{
107+ int nargs, out_arg = -1, quiet = 0, attempt;
108+ int pid, retries, sleep_interval;
109+ const char **new_argv;
110+ char *temp_filenames[RETRY_ICE_ATTEMPTS * 2 + 2];
111+
112+ if (input_filename == NULL || ! strcmp (input_filename, "-"))
113+ return;
114+
115+ for (nargs = 0; argv[nargs] != NULL; ++nargs)
116+ /* Only retry compiler ICEs, not preprocessor ones. */
117+ if (! strcmp (argv[nargs], "-E"))
118+ return;
119+ else if (argv[nargs][0] == '-' && argv[nargs][1] == 'o')
120+ {
121+ if (out_arg == -1)
122+ out_arg = nargs;
123+ else
124+ return;
125+ }
126+ /* If the compiler is going to output any time information,
127+ it might vary between invocations. */
128+ else if (! strcmp (argv[nargs], "-quiet"))
129+ quiet = 1;
130+ else if (! strcmp (argv[nargs], "-ftime-report"))
131+ return;
132+
133+ if (out_arg == -1 || !quiet)
134+ return;
135+
136+ memset (temp_filenames, '\0', sizeof (temp_filenames));
137+ new_argv = alloca ((nargs + 3) * sizeof (const char *));
138+ memcpy (new_argv, argv, (nargs + 1) * sizeof (const char *));
139+ new_argv[nargs++] = "-frandom-seed=0";
140+ new_argv[nargs] = NULL;
141+ if (new_argv[out_arg][2] == '\0')
142+ new_argv[out_arg + 1] = "-";
143+ else
144+ new_argv[out_arg] = "-o-";
145+
146+ for (attempt = 0; attempt < RETRY_ICE_ATTEMPTS + 1; ++attempt)
147+ {
148+ int fd = -1;
149+ int status;
150+
151+ temp_filenames[attempt * 2] = make_temp_file (".out");
152+ temp_filenames[attempt * 2 + 1] = make_temp_file (".err");
153+
154+ if (attempt == RETRY_ICE_ATTEMPTS)
155+ {
156+ int i;
157+ int fd1, fd2;
158+ struct stat st1, st2;
159+ size_t n, len;
160+ char *buf;
161+
162+ buf = xmalloc (8192);
163+
164+ for (i = 0; i < 2; ++i)
165+ {
166+ fd1 = open (temp_filenames[i], O_RDONLY);
167+ fd2 = open (temp_filenames[2 + i], O_RDONLY);
168+
169+ if (fd1 < 0 || fd2 < 0)
170+ {
171+ i = -1;
172+ close (fd1);
173+ close (fd2);
174+ break;
175+ }
176+
177+ if (fstat (fd1, &st1) < 0 || fstat (fd2, &st2) < 0)
178+ {
179+ i = -1;
180+ close (fd1);
181+ close (fd2);
182+ break;
183+ }
184+
185+ if (st1.st_size != st2.st_size)
186+ {
187+ close (fd1);
188+ close (fd2);
189+ break;
190+ }
191+
192+ len = 0;
193+ for (n = st1.st_size; n; n -= len)
194+ {
195+ len = n;
196+ if (len > 4096)
197+ len = 4096;
198+
199+ if (read (fd1, buf, len) != (int) len
200+ || read (fd2, buf + 4096, len) != (int) len)
201+ {
202+ i = -1;
203+ break;
204+ }
205+
206+ if (memcmp (buf, buf + 4096, len) != 0)
207+ break;
208+ }
209+
210+ close (fd1);
211+ close (fd2);
212+
213+ if (n)
214+ break;
215+ }
216+
217+ free (buf);
218+ if (i == -1)
219+ break;
220+
221+ if (i != 2)
222+ {
223+ notice ("The bug is not reproducible, so it is likely a hardware or OS problem.\n");
224+ break;
225+ }
226+
227+ fd = open (temp_filenames[attempt * 2], O_RDWR);
228+ if (fd < 0)
229+ break;
230+ write (fd, "//", 2);
231+ for (i = 0; i < nargs; i++)
232+ {
233+ write (fd, " ", 1);
234+ write (fd, new_argv[i], strlen (new_argv[i]));
235+ }
236+ write (fd, "\n", 1);
237+ new_argv[nargs] = "-E";
238+ new_argv[nargs + 1] = NULL;
239+ }
240+
241+ /* Fork a subprocess; wait and retry if it fails. */
242+ sleep_interval = 1;
243+ pid = -1;
244+ for (retries = 0; retries < 4; retries++)
245+ {
246+ pid = fork ();
247+ if (pid >= 0)
248+ break;
249+ sleep (sleep_interval);
250+ sleep_interval *= 2;
251+ }
252+
253+ if (pid < 0)
254+ break;
255+ else if (pid == 0)
256+ {
257+ if (attempt != RETRY_ICE_ATTEMPTS)
258+ fd = open (temp_filenames[attempt * 2], O_RDWR);
259+ if (fd < 0)
260+ exit (-1);
261+ if (fd != 1)
262+ {
263+ close (1);
264+ dup (fd);
265+ close (fd);
266+ }
267+
268+ fd = open (temp_filenames[attempt * 2 + 1], O_RDWR);
269+ if (fd < 0)
270+ exit (-1);
271+ if (fd != 2)
272+ {
273+ close (2);
274+ dup (fd);
275+ close (fd);
276+ }
277+
278+ if (prog == new_argv[0])
279+ execvp (prog, (char *const *) new_argv);
280+ else
281+ execv (new_argv[0], (char *const *) new_argv);
282+ exit (-1);
283+ }
284+
285+ if (waitpid (pid, &status, 0) < 0)
286+ break;
287+
288+ if (attempt < RETRY_ICE_ATTEMPTS
289+ && (! WIFEXITED (status) || WEXITSTATUS (status) != ICE_EXIT_CODE))
290+ {
291+ notice ("The bug is not reproducible, so it is likely a hardware or OS problem.\n");
292+ break;
293+ }
294+ else if (attempt == RETRY_ICE_ATTEMPTS)
295+ {
296+ close (fd);
297+ if (WIFEXITED (status)
298+ && WEXITSTATUS (status) == SUCCESS_EXIT_CODE)
299+ {
300+ notice ("Preprocessed source stored into %s file, please attach this to your bugreport.\n",
301+ temp_filenames[attempt * 2]);
302+ /* Make sure it is not deleted. */
303+ free (temp_filenames[attempt * 2]);
304+ temp_filenames[attempt * 2] = NULL;
305+ break;
306+ }
307+ }
308+ }
309+
310+ for (attempt = 0; attempt < RETRY_ICE_ATTEMPTS * 2 + 2; attempt++)
311+ if (temp_filenames[attempt])
312+ {
313+ unlink (temp_filenames[attempt]);
314+ free (temp_filenames[attempt]);
315+ }
316+}
317+#endif
318+
319 /* Search for a file named NAME trying various prefixes including the
320 user's -B prefix and some standard ones.
321 Return the absolute file name found. If nothing is found, return NAME. */
322--- gcc/Makefile.in.orig 2007-09-30 10:48:13.000000000 +0000
323+++ gcc/Makefile.in 2007-09-30 10:48:39.000000000 +0000
324@@ -192,6 +192,7 @@
325 build/gengtype-lex.o-warn = -Wno-error
326 # SYSCALLS.c misses prototypes
327 SYSCALLS.c.X-warn = -Wno-strict-prototypes -Wno-error
328+build/gcc.o-warn = -Wno-error
329
330 # All warnings have to be shut off in stage1 if the compiler used then
331 # isn't gcc; configure determines that. WARN_CFLAGS will be either
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/libstdc++-pic.dpatch b/meta/recipes-devtools/gcc/gcc-4.6.0/libstdc++-pic.dpatch
deleted file mode 100644
index 70c9e81542..0000000000
--- a/meta/recipes-devtools/gcc/gcc-4.6.0/libstdc++-pic.dpatch
+++ /dev/null
@@ -1,71 +0,0 @@
1#! /bin/sh -e
2
3# DP: Build and install libstdc++_pic.a library.
4
5dir=
6if [ $# -eq 3 -a "$2" = '-d' ]; then
7 pdir="-d $3"
8 dir="$3/"
9elif [ $# -ne 1 ]; then
10 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
11 exit 1
12fi
13case "$1" in
14 -patch)
15 patch $pdir -f --no-backup-if-mismatch -p0 < $0
16 ;;
17 -unpatch)
18 patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
19 ;;
20 *)
21 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
22 exit 1
23esac
24exit 0
25
26diff -ur libstdc++-v3/src/Makefile.am libstdc++-v3/src/Makefile.am
27--- libstdc++-v3/src/Makefile.am~ 2004-04-16 21:04:05.000000000 +0200
28+++ libstdc++-v3/src/Makefile.am 2004-07-03 20:22:43.000000000 +0200
29@@ -210,6 +210,10 @@
30 $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@
31
32
33+install-exec-local:
34+ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o || touch libstdc++_pic.a
35+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
36+
37 # Added bits to build debug library.
38 if GLIBCXX_BUILD_DEBUG
39 all-local: build_debug
40diff -ur libstdc++-v3/src/Makefile.in libstdc++-v3/src/Makefile.in
41--- libstdc++-v3/src/Makefile.in 2004-07-03 06:41:13.000000000 +0200
42+++ libstdc++-v3/src/Makefile.in 2004-07-03 20:25:05.000000000 +0200
43@@ -611,7 +611,7 @@
44
45 install-data-am: install-data-local
46
47-install-exec-am: install-toolexeclibLTLIBRARIES
48+install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
49
50 install-info: install-info-am
51
52@@ -644,6 +644,7 @@
53 distclean-libtool distclean-tags distdir dvi dvi-am html \
54 html-am info info-am install install-am install-data \
55 install-data-am install-data-local install-exec \
56+ install-exec-local \
57 install-exec-am install-info install-info-am install-man \
58 install-strip install-toolexeclibLTLIBRARIES installcheck \
59 installcheck-am installdirs maintainer-clean \
60@@ -729,6 +730,11 @@
61 install_debug:
62 (cd ${debugdir} && $(MAKE) \
63 toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
64+
65+install-exec-local:
66+ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o || touch libstdc++_pic.a
67+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
68+
69 # Tell versions [3.59,3.63) of GNU make to not export all variables.
70 # Otherwise a system limit (for SysV at least) may be exceeded.
71 .NOEXPORT:
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/pr30961.dpatch b/meta/recipes-devtools/gcc/gcc-4.6.0/pr30961.dpatch
deleted file mode 100644
index b20fdf5bf5..0000000000
--- a/meta/recipes-devtools/gcc/gcc-4.6.0/pr30961.dpatch
+++ /dev/null
@@ -1,179 +0,0 @@
1#! /bin/sh -e
2
3# DP: <your description>
4
5dir=
6if [ $# -eq 3 -a "$2" = '-d' ]; then
7 pdir="-d $3"
8 dir="$3/"
9elif [ $# -ne 1 ]; then
10 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
11 exit 1
12fi
13case "$1" in
14 -patch)
15 patch $pdir -f --no-backup-if-mismatch -p0 < $0
16 ;;
17 -unpatch)
18 patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
19 ;;
20 *)
21 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
22 exit 1
23esac
24exit 0
25
26From: "H.J. Lu" <hjl@lucon.org>
27Sender: gcc-patches-owner@gcc.gnu.org
28To: gcc-patches@gcc.gnu.org
29Subject: PATCH: PR target/30961: [4.1/4.2/4.3 regression] redundant reg/mem stores/moves
30Date: Mon, 27 Aug 2007 11:34:12 -0700
31
32We start with
33
34(note:HI 3 4 22 2 NOTE_INSN_FUNCTION_BEG)
35
36(insn:HI 6 3 10 2 c.c:3 (set (reg:DF 58 [ <result> ])
37 (subreg:DF (reg/v:DI 59 [ in ]) 0)) 102 {*movdf_integer_rex64} (expr_list:REG_DEAD (reg/v:DI 59 [ in ])
38 (nil)))
39
40(insn:HI 10 6 16 2 c.c:7 (set (reg/i:DF 21 xmm0 [ <result> ])
41 (reg:DF 58 [ <result> ])) 102 {*movdf_integer_rex64} (expr_list:REG_DEAD (reg:DF 58 [ <result> ])
42 (nil)))
43
44(insn:HI 16 10 0 2 c.c:7 (use (reg/i:DF 21 xmm0 [ <result> ])) -1 (nil))
45
46we are trying to allocate registers for insn 6 and we allocate
47xmm0 for the return value. Reload doesn't check if xmm0 can be used for
48DF 59, it allocates xmm1 for DF 59 and generates:
49
50Reloads for insn # 6
51Reload 0: reload_in (DF) = (reg:DF 5 di)
52 SSE_REGS, RELOAD_FOR_INPUT (opnum = 1), can't combine
53 reload_in_reg: (subreg:DF (reg/v:DI 5 di [orig:59 in ] [59]) 0)
54 reload_reg_rtx: (reg:DF 22 xmm1)
55...
56
57(note:HI 4 1 3 2 [bb 2] NOTE_INSN_BASIC_BLOCK)
58
59(note:HI 3 4 22 2 NOTE_INSN_FUNCTION_BEG)
60
61(insn 22 3 23 2 c.c:3 (set (mem/c:DF (plus:DI (reg/f:DI 7 sp)
62 (const_int -8 [0xfffffffffffffff8])) [0 S8 A8])
63 (reg:DF 5 di)) 102 {*movdf_integer_rex64} (nil))
64
65(insn 23 22 6 2 c.c:3 (set (reg:DF 22 xmm1)
66 (mem/c:DF (plus:DI (reg/f:DI 7 sp)
67 (const_int -8 [0xfffffffffffffff8])) [0 S8 A8])) 102 {*movdf_integer_rex64} (nil))
68
69(insn:HI 6 23 16 2 c.c:3 (set (reg:DF 21 xmm0 [orig:58 <result> ] [58])
70 (reg:DF 22 xmm1)) 102 {*movdf_integer_rex64} (nil))
71
72(insn 16 6 21 2 c.c:7 (use (reg/i:DF 21 xmm0 [ <result> ])) -1 (nil))
73
74This patch tries to use the destination register when reloading for input. It
75generates
76
77Reloads for insn # 6
78Reload 0: reload_in (DF) = (reg:DF 5 di)
79 SSE_REGS, RELOAD_FOR_INPUT (opnum = 1), can't combine
80 reload_in_reg: (subreg:DF (reg/v:DI 5 di [orig:59 in ] [59]) 0)
81 reload_reg_rtx: (reg:DF 21 xmm0)
82...
83(note:HI 4 1 3 2 [bb 2] NOTE_INSN_BASIC_BLOCK)
84
85(note:HI 3 4 22 2 NOTE_INSN_FUNCTION_BEG)
86
87(insn 22 3 23 2 c.c:3 (set (mem/c:DF (plus:DI (reg/f:DI 7 sp)
88 (const_int -8 [0xfffffffffffffff8])) [0 S8 A8])
89 (reg:DF 5 di)) 102 {*movdf_integer_rex64} (nil))
90
91(insn 23 22 6 2 c.c:3 (set (reg:DF 21 xmm0)
92 (mem/c:DF (plus:DI (reg/f:DI 7 sp)
93 (const_int -8 [0xfffffffffffffff8])) [0 S8 A8])) 102 {*movdf_integer_rex64} (nil))
94
95(insn:HI 6 23 10 2 c.c:3 (set (reg:DF 22 xmm1 [orig:58 <result> ] [58])
96 (reg:DF 21 xmm0)) 102 {*movdf_integer_rex64} (nil))
97
98(insn:HI 10 6 16 2 c.c:7 (set (reg/i:DF 21 xmm0 [ <result> ])
99 (reg:DF 22 xmm1 [orig:58 <result> ] [58])) 102 {*movdf_integer_rex64} (nil))
100
101(insn 16 10 21 2 c.c:7 (use (reg/i:DF 21 xmm0 [ <result> ])) -1 (nil))
102
103
104H.J.
105----
106gcc/
107
1082007-08-27 H.J. Lu <hongjiu.lu@intel.com>
109
110 PR target/30961
111 * reload1.c (find_reg): Favor the hard register in destination
112 if it is usable and a memory location is needed for reload
113 input.
114
115gcc/testsuite/
116
1172007-08-27 H.J. Lu <hongjiu.lu@intel.com>
118
119 PR target/30961
120 * gcc.target/i386/pr30961-1.c: New.
121
122--- gcc/reload1.c.second 2007-08-27 09:35:08.000000000 -0700
123+++ gcc/reload1.c 2007-08-27 09:36:33.000000000 -0700
124@@ -1781,6 +1781,20 @@ find_reg (struct insn_chain *chain, int
125 HARD_REG_SET not_usable;
126 HARD_REG_SET used_by_other_reload;
127 reg_set_iterator rsi;
128+#ifdef SECONDARY_MEMORY_NEEDED
129+ rtx body = PATTERN (chain->insn);
130+ unsigned int dest_reg = FIRST_PSEUDO_REGISTER;
131+
132+ if (GET_CODE (body) == SET)
133+ {
134+ rtx dest = SET_DEST (body);
135+
136+ if ((REG_P (dest)
137+ || (GET_CODE (dest) == SUBREG
138+ && REG_P (SUBREG_REG (dest)))))
139+ dest_reg = reg_or_subregno (dest);
140+ }
141+#endif
142
143 COPY_HARD_REG_SET (not_usable, bad_spill_regs);
144 IOR_HARD_REG_SET (not_usable, bad_spill_regs_global);
145@@ -1821,6 +1835,18 @@ find_reg (struct insn_chain *chain, int
146 this_cost--;
147 if (rl->out && REG_P (rl->out) && REGNO (rl->out) == regno)
148 this_cost--;
149+#ifdef SECONDARY_MEMORY_NEEDED
150+ /* If a memory location is needed for rl->in and dest_reg
151+ is usable, we will favor it. */
152+ else if (dest_reg == regno
153+ && rl->in
154+ && REG_P (rl->in)
155+ && REGNO (rl->in) < FIRST_PSEUDO_REGISTER
156+ && SECONDARY_MEMORY_NEEDED (REGNO_REG_CLASS (REGNO (rl->in)),
157+ rl->class,
158+ rl->mode))
159+ this_cost = 0;
160+#endif
161 if (this_cost < best_cost
162 /* Among registers with equal cost, prefer caller-saved ones, or
163 use REG_ALLOC_ORDER if it is defined. */
164--- gcc/testsuite/gcc.target/i386/pr30961-1.c.second 2007-08-27 11:01:59.000000000 -0700
165+++ gcc/testsuite/gcc.target/i386/pr30961-1.c 2007-08-27 11:02:51.000000000 -0700
166@@ -0,0 +1,13 @@
167+/* { dg-do compile } */
168+/* { dg-require-effective-target lp64 } */
169+/* { dg-options "-O2" } */
170+
171+double
172+convert (long long in)
173+{
174+ double f;
175+ __builtin_memcpy( &f, &in, sizeof( in ) );
176+ return f;
177+}
178+
179+/* { dg-final { scan-assembler-not "movapd" } } */
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/pr35942.patch b/meta/recipes-devtools/gcc/gcc-4.6.0/pr35942.patch
deleted file mode 100644
index da610f5189..0000000000
--- a/meta/recipes-devtools/gcc/gcc-4.6.0/pr35942.patch
+++ /dev/null
@@ -1,38 +0,0 @@
1Fix PR 35942: remove -lstdc++ from libtool postdeps for CXX.
2
3libstdc++-v3/ChangeLog:
42010-01-04 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5
6 PR libstdc++/35942
7 * configure.ac: Remove -lstdc++ from libtool's postdeps_CXX.
8 * configure: Regenerate.
9
10
11Index: gcc-4.3.3/libstdc++-v3/configure
12===================================================================
13--- gcc-4.3.3.orig/libstdc++-v3/configure 2010-03-26 17:57:51.000000000 +0000
14+++ gcc-4.3.3/libstdc++-v3/configure 2010-03-26 17:57:58.000000000 +0000
15@@ -13759,6 +13759,9 @@
16
17
18
19+# Eliminate -lstdc++ addition to postdeps for cross compiles.
20+postdeps_CXX=`echo " $postdeps_CXX " | sed 's, -lstdc++ ,,g'`
21+
22 # Possibly disable most of the library.
23 ## TODO: Consider skipping unncessary tests altogether in this case, rather
24 ## than just ignoring the results. Faster /and/ more correct, win win.
25Index: gcc-4.3.3/libstdc++-v3/configure.ac
26===================================================================
27--- gcc-4.3.3.orig/libstdc++-v3/configure.ac 2010-03-26 17:57:54.000000000 +0000
28+++ gcc-4.3.3/libstdc++-v3/configure.ac 2010-03-26 17:57:58.000000000 +0000
29@@ -89,6 +89,9 @@
30 AC_SUBST(enable_shared)
31 AC_SUBST(enable_static)
32
33+# Eliminate -lstdc++ addition to postdeps for cross compiles.
34+postdeps_CXX=`echo " $postdeps_CXX " | sed 's, -lstdc++ ,,g'`
35+
36 # Possibly disable most of the library.
37 ## TODO: Consider skipping unncessary tests altogether in this case, rather
38 ## than just ignoring the results. Faster /and/ more correct, win win.