source: rtems/contrib/crossrpms/patches/gcc-core-4.5-20100311-rtems4.11-20100317.diff @ 28d868c4

4.104.115
Last change on this file since 28d868c4 was 28d868c4, checked in by Ralf Corsepius <ralf.corsepius@…>, on 03/18/10 at 18:27:15

New. Preliminary, initial, VERY coarse patch against gcc-4.5-branch.

  • Property mode set to 100644
File size: 13.1 KB
RevLine 
[28d868c4]1diff -Naur gcc-4.5-20100311.orig/ChangeLog.rtems gcc-4.5-20100311/ChangeLog.rtems
2--- gcc-4.5-20100311.orig/ChangeLog.rtems       1970-01-01 01:00:00.000000000 +0100
3+++ gcc-4.5-20100311/ChangeLog.rtems    2010-03-17 16:08:55.000000000 +0100
4@@ -0,0 +1,4 @@
5+               Ralf Corsépius <ralf.corsepius@rtems.org>
6+
7+       * configure, configure.ac (skipdirs): Add target-libiberty.
8+
9diff -Naur gcc-4.5-20100311.orig/configure gcc-4.5-20100311/configure
10--- gcc-4.5-20100311.orig/configure     2010-03-01 14:58:48.000000000 +0100
11+++ gcc-4.5-20100311/configure  2010-03-17 16:09:14.000000000 +0100
12@@ -3291,6 +3291,7 @@
13     noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss ${libgcj} target-libmudflap"
14     ;;
15   *-*-rtems*)
16+    skipdirs="$skipdirs target-libiberty"
17     noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
18     ;;
19     # The tpf target doesn't support gdb yet.
20@@ -7889,7 +7890,7 @@
21        # to it.  This is right: we don't want to search that directory
22        # for binaries, but we want the header files in there, so add
23        # them explicitly.
24-       FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/$(HOST_SUBDIR)/gcc/include'
25+       FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/$(HOST_SUBDIR)/gcc/include -isystem $$r/$(HOST_SUBDIR)/gcc/include-fixed'
26 
27        # Someone might think of using the pre-installed headers on
28        # Canadian crosses, in case the installed compiler is not fully
29diff -Naur gcc-4.5-20100311.orig/configure.ac gcc-4.5-20100311/configure.ac
30--- gcc-4.5-20100311.orig/configure.ac  2010-03-01 14:58:48.000000000 +0100
31+++ gcc-4.5-20100311/configure.ac       2010-03-17 16:09:37.000000000 +0100
32@@ -528,6 +528,7 @@
33     noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss ${libgcj} target-libmudflap"
34     ;;
35   *-*-rtems*)
36+    skipdirs="$skipdirs target-libiberty"
37     noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
38     ;;
39     # The tpf target doesn't support gdb yet.
40@@ -2993,7 +2994,7 @@
41        # to it.  This is right: we don't want to search that directory
42        # for binaries, but we want the header files in there, so add
43        # them explicitly.
44-       FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/$(HOST_SUBDIR)/gcc/include'
45+       FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/$(HOST_SUBDIR)/gcc/include -isystem $$r/$(HOST_SUBDIR)/gcc/include-fixed'
46 
47        # Someone might think of using the pre-installed headers on
48        # Canadian crosses, in case the installed compiler is not fully
49diff -Naur gcc-4.5-20100311.orig/gcc/ChangeLog.rtems gcc-4.5-20100311/gcc/ChangeLog.rtems
50--- gcc-4.5-20100311.orig/gcc/ChangeLog.rtems   1970-01-01 01:00:00.000000000 +0100
51+++ gcc-4.5-20100311/gcc/ChangeLog.rtems        2010-03-17 16:19:37.000000000 +0100
52@@ -0,0 +1,49 @@
53+2010-03-15     Ralf Corsépius <ralf.corsepius@rtems.org>
54+
55+       Patch from Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>:
56+       * config/arm/rtems-elf.h, config/arm/t-rtems: Add optional support
57+       for vfp FPU model
58+
59+2010-02-10     Ralf Corsépius <ralf.corsepius@rtems.org>
60+
61+       * config/rtems.h: Abandon -qrtems_debug.
62+
63+2009-12-01     Ralf Corsépius <ralf.corsepius@rtems.org>
64+
65+       * config/avr/avr.h (LINK_SPEC): Pass -m avrN to ld for -mmcu=avrN.
66+
67+2009-11-04     Ralf Corsépius <ralf.corsepius@rtems.org>
68+
69+       * config/m32c/rtems.h, config/m68k/rtemself.h,
70+       config/m68k/rtemself.h, config/sh/rtemself.h,
71+       config/sparc/rtemself.h: Undef WCHAR_TYPE_SIZE, WCHAR_TYPE.
72+       (Resets WCHAR_TYPE's to defaults. Prevents broken GCC tm_files
73+       to interfere and cause wchar_t/wint_t incompatibilities).
74+
75+2009-10-15     Ralf Corsépius <ralf.corsepius@rtems.org>
76+
77+       * config/avr/t-rtems: Don't build _exit.
78+
79+               Jon Beniston <jon@beniston.com>
80+
81+       * config/lm32/arithmetic.c, config/lm32/crti.S,
82+       config/lm32/crtn.S, config/lm32/lib1funcs.S,
83+       config/lm32/lm32.c, config/lm32/lm32.h,
84+       config/lm32/lm32.md, config/lm32/lm32.opt,
85+       config/lm32/lm32-protos.h, config/lm32/predicates.md,
86+       config/lm32/rtems.h, config/lm32/sfp-machine.h,
87+       config/lm32/t-fprules-softfp, config/lm32/t-lm32,
88+       config/lm32/uclinux-elf.h: New (lm32 port).
89+       * config.gcc: Add lm32* targets.
90+       * doc/contrib.texi, doc/invoke.texi: Add lm32.
91+
92+               Ralf Corsépius <ralf.corsepius@rtems.org>
93+
94+       * config/rs6000/rtems.h: Support for custom RTEMS multilibs.
95+       Support TARGET_E500.
96+       * config/rs6000/t-rtems: Custom RTEMS multilibs.
97+
98+               Ralf Corsépius <ralf.corsepius@rtems.org>
99+
100+       * config/mips/elf.h: Remove NO_IMPLICIT_EXTERN_C.
101+       
102diff -Naur gcc-4.5-20100311.orig/gcc/config/arm/rtems-elf.h gcc-4.5-20100311/gcc/config/arm/rtems-elf.h
103--- gcc-4.5-20100311.orig/gcc/config/arm/rtems-elf.h    2009-03-25 13:54:16.000000000 +0100
104+++ gcc-4.5-20100311/gcc/config/arm/rtems-elf.h 2010-03-17 16:11:31.000000000 +0100
105@@ -36,7 +36,7 @@
106  */
107 #undef SUBTARGET_EXTRA_ASM_SPEC
108 #define SUBTARGET_EXTRA_ASM_SPEC "\
109-  %{!mhard-float: %{!msoft-float:-mfpu=softfpa}}"
110+  %{!mhard-float: %{!mfpu=vfp: %{!msoft-float:-mfpu=softfpa}}}"
111 
112 /*
113  *  The default includes --start-group and --end-group which conflicts
114diff -Naur gcc-4.5-20100311.orig/gcc/config/arm/t-rtems gcc-4.5-20100311/gcc/config/arm/t-rtems
115--- gcc-4.5-20100311.orig/gcc/config/arm/t-rtems        2004-11-23 06:30:32.000000000 +0100
116+++ gcc-4.5-20100311/gcc/config/arm/t-rtems     2010-03-17 16:11:31.000000000 +0100
117@@ -5,6 +5,41 @@
118 MULTILIB_EXCEPTIONS  =
119 MULTILIB_MATCHES     = marm=mno-thumb
120 
121-MULTILIB_OPTIONS    += msoft-float/mhard-float
122-MULTILIB_DIRNAMES   += soft fpu
123-MULTILIB_EXCEPTIONS += *mthumb/*mhard-float*
124+MULTILIB_OPTIONS    += mhard-float/mfloat-abi=softfp
125+MULTILIB_DIRNAMES   += fpu softfp
126+MULTILIB_EXCEPTIONS += *mthumb*/*mhard-float* *mthumb*/*mfloat-abi=softfp*
127+MULTILIB_MATCHES     =
128+
129+MULTILIB_OPTIONS    += mfpu=vfp
130+MULTILIB_DIRNAMES   += vfp
131+MULTILIB_EXCEPTIONS += *mhard-float*/*mfpu=vfp* *marm*/*mfloat-abi=softfp*/*mfpu=fpa*
132+MULTILIB_EXCLUSIONS += !mthumb/mfloat-abi=softfp/!mfpu=vfp
133+
134+# default float model is fpa, so don't create a explicit copy of it
135+MULTILIB_EXCEPTIONS += *marm*/*mfpa*
136+
137+# permutations of the options which are useful (+) or make no sense (-),
138+# defaults are in brackets:
139+# + (arm/soft/fpa)
140+# + (arm/soft)/vfp
141+# - (arm)/softfp(/fpa)
142+# + (arm)/softfp/vfp
143+# + (arm)/hard-float(/fpa)
144+# - (arm)/hard-float/vfp
145+# + thumb/(soft/fpa)
146+# + thumb/(soft/)vfp
147+# - thumb/softfp/fpa
148+# - thumb/softfp/vfp
149+# - thumb/hard-float/fpa
150+# - thumb/hard-float/vfp
151+
152+# subdirs to be used for multilibs and their respective options:
153+#/thumb/vfp  -> thumb/soft/vfp
154+#/thumb/fpa  -> thumb/soft/fpa
155+#/thumb      -> thumb/soft/fpa
156+#/vfp        -> arm/soft/vfp
157+#/softfp/vfp -> arm/softfp/cfp
158+#/fpu/fpa    -> arm/hard/fpa
159+#/fpu        -> arm/hard/fpa
160+#/fpa        -> arm/soft/fpa
161+#.           -> arm/soft/fpa
162diff -Naur gcc-4.5-20100311.orig/gcc/config/avr/t-rtems gcc-4.5-20100311/gcc/config/avr/t-rtems
163--- gcc-4.5-20100311.orig/gcc/config/avr/t-rtems        2004-11-23 04:44:03.000000000 +0100
164+++ gcc-4.5-20100311/gcc/config/avr/t-rtems     2010-03-17 16:11:55.000000000 +0100
165@@ -1,3 +1,4 @@
166 # Multilibs for avr RTEMS targets.
167 
168-# ATM, this is just a stub
169+# RTEMS uses _exit from newlib
170+LIB1ASMFUNCS := $(filter-out _exit,$(LIB1ASMFUNCS))
171diff -Naur gcc-4.5-20100311.orig/gcc/config/lm32/rtems.h gcc-4.5-20100311/gcc/config/lm32/rtems.h
172--- gcc-4.5-20100311.orig/gcc/config/lm32/rtems.h       1970-01-01 01:00:00.000000000 +0100
173+++ gcc-4.5-20100311/gcc/config/lm32/rtems.h    2010-03-17 16:13:37.000000000 +0100
174@@ -0,0 +1,32 @@
175+/* Definitions for rtems targeting a lm32 using ELF.
176+   Copyright (C) 2009, Free Software Foundation, Inc.
177+
178+This file is part of GCC.
179+
180+GCC is free software; you can redistribute it and/or modify
181+it under the terms of the GNU General Public License as published by
182+the Free Software Foundation; either version 3, or (at your option)
183+any later version.
184+
185+GCC is distributed in the hope that it will be useful,
186+but WITHOUT ANY WARRANTY; without even the implied warranty of
187+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
188+GNU General Public License for more details.
189+
190+You should have received a copy of the GNU General Public License
191+along with GCC; see the file COPYING3.  If not see
192+<http://www.gnu.org/licenses/>.  */
193+
194+/* Target OS builtins.  */
195+#undef TARGET_OS_CPP_BUILTINS
196+#define TARGET_OS_CPP_BUILTINS()               \
197+  do                                           \
198+    {                                          \
199+       builtin_define ("__rtems__");           \
200+       builtin_define ("__USE_INIT_FINI__");   \
201+       builtin_assert ("system=rtems");        \
202+    }                                          \
203+  while (0)
204+
205+/* Use the default */
206+#undef LINK_GCC_C_SEQUENCE_SPEC
207diff -Naur gcc-4.5-20100311.orig/gcc/config/m32c/rtems.h gcc-4.5-20100311/gcc/config/m32c/rtems.h
208--- gcc-4.5-20100311.orig/gcc/config/m32c/rtems.h       2008-12-01 17:34:42.000000000 +0100
209+++ gcc-4.5-20100311/gcc/config/m32c/rtems.h    2010-03-17 16:14:37.000000000 +0100
210@@ -29,5 +29,9 @@
211     }                                          \
212   while (0)
213 
214-/* Use the default */
215+/* Use the defaults */
216 #undef LINK_GCC_C_SEQUENCE_SPEC
217+
218+#undef WCHAR_TYPE
219+
220+#undef WCHAR_TYPE_SIZE
221diff -Naur gcc-4.5-20100311.orig/gcc/config/m68k/rtemself.h gcc-4.5-20100311/gcc/config/m68k/rtemself.h
222--- gcc-4.5-20100311.orig/gcc/config/m68k/rtemself.h    2007-08-02 12:49:31.000000000 +0200
223+++ gcc-4.5-20100311/gcc/config/m68k/rtemself.h 2010-03-17 16:15:20.000000000 +0100
224@@ -31,3 +31,8 @@
225        builtin_assert ("system=rtems");        \
226     }                                          \
227   while (0)
228+
229+/* Use the defaults */
230+#undef WCHAR_TYPE
231+
232+#undef WCHAR_TYPE_SIZE
233diff -Naur gcc-4.5-20100311.orig/gcc/config/mips/elf.h gcc-4.5-20100311/gcc/config/mips/elf.h
234--- gcc-4.5-20100311.orig/gcc/config/mips/elf.h 2007-08-02 12:49:31.000000000 +0200
235+++ gcc-4.5-20100311/gcc/config/mips/elf.h      2010-03-17 16:15:01.000000000 +0100
236@@ -48,6 +48,4 @@
237 #undef  ENDFILE_SPEC
238 #define ENDFILE_SPEC "crtend%O%s crtn%O%s"
239 
240-#define NO_IMPLICIT_EXTERN_C 1
241-
242 #define HANDLE_PRAGMA_PACK_PUSH_POP 1
243diff -Naur gcc-4.5-20100311.orig/gcc/config/rs6000/rtems.h gcc-4.5-20100311/gcc/config/rs6000/rtems.h
244--- gcc-4.5-20100311.orig/gcc/config/rs6000/rtems.h     2007-08-02 12:49:31.000000000 +0200
245+++ gcc-4.5-20100311/gcc/config/rs6000/rtems.h  2010-03-17 16:18:43.000000000 +0100
246@@ -49,8 +49,22 @@
247 %{mcpu=604:  %{!Dppc*: %{!Dmpc*: -Dmpc604}  } } \
248 %{mcpu=750:  %{!Dppc*: %{!Dmpc*: -Dmpc750}  } } \
249 %{mcpu=821:  %{!Dppc*: %{!Dmpc*: -Dmpc821}  } } \
250-%{mcpu=860:  %{!Dppc*: %{!Dmpc*: -Dmpc860}  } }"
251+%{mcpu=860:  %{!Dppc*: %{!Dmpc*: -Dmpc860}  } } \
252+%{mcpu=8540: %{!Dppc*: %{!Dmpc*: -Dppc8540}  } }"
253 
254 #undef  SUBSUBTARGET_EXTRA_SPECS
255 #define SUBSUBTARGET_EXTRA_SPECS \
256   { "cpp_os_rtems",            CPP_OS_RTEMS_SPEC }
257+
258+#undef SUBSUBTARGET_OVERRIDE_OPTIONS
259+#define SUBSUBTARGET_OVERRIDE_OPTIONS          \
260+  do {                                         \
261+    if (TARGET_E500)                           \
262+      {                                                \
263+       rs6000_float_gprs = 1;                  \
264+      }                                                \
265+  } while(0)
266+
267+#undef WCHAR_TYPE
268+
269+#undef WCHAR_TYPE_SIZE
270diff -Naur gcc-4.5-20100311.orig/gcc/config/rs6000/t-rtems gcc-4.5-20100311/gcc/config/rs6000/t-rtems
271--- gcc-4.5-20100311.orig/gcc/config/rs6000/t-rtems     2009-04-21 21:03:23.000000000 +0200
272+++ gcc-4.5-20100311/gcc/config/rs6000/t-rtems  2010-03-17 16:15:38.000000000 +0100
273@@ -19,12 +19,12 @@
274 # <http://www.gnu.org/licenses/>.
275 
276 MULTILIB_OPTIONS       = \
277-mcpu=403/mcpu=505/mcpu=601/mcpu=603e/mcpu=604/mcpu=860/mcpu=7400 \
278+mcpu=403/mcpu=505/mcpu=601/mcpu=603e/mcpu=604/mcpu=860/mcpu=7400/mcpu=8540 \
279 Dmpc8260 \
280 msoft-float
281 
282 MULTILIB_DIRNAMES      = \
283-m403 m505 m601 m603e m604 m860 m7400 \
284+m403 m505 m601 m603e m604 m860 m7400 m8540 \
285 mpc8260 \
286 nof
287 
288@@ -47,6 +47,10 @@
289 # Map 750 to .
290 MULTILIB_MATCHES       += mcpu?750=
291 
292+# Map e500, 8548 to 8540
293+MULTILIB_MATCHES       += mcpu?8540=mcpu?e500
294+MULTILIB_MATCHES       += mcpu?8540=mcpu?8548
295+
296 # Soft-float only, default implies msoft-float
297 # NOTE: Must match with MULTILIB_MATCHES_FLOAT and MULTILIB_MATCHES
298 MULTILIB_SOFTFLOAT_ONLY = \
299@@ -80,3 +84,4 @@
300 MULTILIB_EXCEPTIONS += *mcpu=750/Dmpc*
301 MULTILIB_EXCEPTIONS += *mcpu=860/Dmpc*
302 MULTILIB_EXCEPTIONS += *mcpu=7400/Dmpc*
303+MULTILIB_EXCEPTIONS += *mcpu=8540/Dmpc*
304diff -Naur gcc-4.5-20100311.orig/gcc/config/rtems.h gcc-4.5-20100311/gcc/config/rtems.h
305--- gcc-4.5-20100311.orig/gcc/config/rtems.h    2007-08-02 12:49:31.000000000 +0200
306+++ gcc-4.5-20100311/gcc/config/rtems.h 2010-03-17 16:16:01.000000000 +0100
307@@ -38,6 +38,5 @@
308 #undef LIB_SPEC
309 #define LIB_SPEC "%{!qrtems: " STD_LIB_SPEC "} " \
310 "%{!nostdlib: %{qrtems: --start-group \
311- %{!qrtems_debug: -lrtemsbsp -lrtemscpu} \
312- %{qrtems_debug: -lrtemsbsp_g -lrtemscpu_g} \
313+ -lrtemsbsp -lrtemscpu \
314  -lc -lgcc --end-group %{!qnolinkcmds: -T linkcmds%s}}}"
315diff -Naur gcc-4.5-20100311.orig/gcc/config/sh/rtemself.h gcc-4.5-20100311/gcc/config/sh/rtemself.h
316--- gcc-4.5-20100311.orig/gcc/config/sh/rtemself.h      2007-08-02 12:49:31.000000000 +0200
317+++ gcc-4.5-20100311/gcc/config/sh/rtemself.h   2010-03-17 16:16:20.000000000 +0100
318@@ -24,3 +24,8 @@
319   builtin_define( "__rtems__" );               \
320   builtin_assert( "system=rtems" );            \
321 } while (0)
322+
323+/* Use the defaults */
324+#undef WCHAR_TYPE
325+
326+#undef WCHAR_TYPE_SIZE
327diff -Naur gcc-4.5-20100311.orig/gcc/config/sparc/rtemself.h gcc-4.5-20100311/gcc/config/sparc/rtemself.h
328--- gcc-4.5-20100311.orig/gcc/config/sparc/rtemself.h   2007-08-02 12:49:31.000000000 +0200
329+++ gcc-4.5-20100311/gcc/config/sparc/rtemself.h        2010-03-17 16:16:40.000000000 +0100
330@@ -29,5 +29,9 @@
331     }                                          \
332   while (0)
333 
334-/* Use the default */
335+/* Use the defaults */
336 #undef LINK_GCC_C_SEQUENCE_SPEC
337+
338+#undef WCHAR_TYPE
339+
340+#undef WCHAR_TYPE_SIZE
Note: See TracBrowser for help on using the repository browser.