]> rtime.felk.cvut.cz Git - rtems-devel.git/blob - gcc-patches/4.3.4/gcc-core-4.3.4-rtems4.9-20090825.diff
Template application updated to build for RTEMS 4.9.x environment.
[rtems-devel.git] / gcc-patches / 4.3.4 / gcc-core-4.3.4-rtems4.9-20090825.diff
1 ---
2  configure                  |    3 ++-
3  configure.ac               |    3 ++-
4  gcc/config/arm/rtems-elf.h |    1 -
5  gcc/config/avr/t-rtems     |    3 ++-
6  gcc/config/mips/elf.h      |    2 --
7  gcc/config/rs6000/rtems.h  |   12 +++++++++++-
8  gcc/config/rs6000/t-rtems  |   11 +++++++----
9  7 files changed, 24 insertions(+), 11 deletions(-)
10
11 Index: gcc-4.3.4/configure
12 ===================================================================
13 --- gcc-4.3.4.orig/configure    2009-04-25 07:55:24.000000000 +0200
14 +++ gcc-4.3.4/configure 2009-11-28 22:40:01.647590027 +0100
15 @@ -2185,6 +2185,7 @@
16      noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss ${libgcj} target-libmudflap"
17      ;;
18    *-*-rtems*)
19 +    skipdirs="$skipdirs target-libiberty"
20      noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
21      ;;
22      # The tpf target doesn't support gdb yet.
23 @@ -5831,7 +5832,7 @@
24         # to it.  This is right: we don't want to search that directory
25         # for binaries, but we want the header files in there, so add
26         # them explicitly.
27 -       FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/$(HOST_SUBDIR)/gcc/include'
28 +       FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/$(HOST_SUBDIR)/gcc/include -isystem $$r/$(HOST_SUBDIR)/gcc/include-fixed'
29  
30         # Someone might think of using the pre-installed headers on
31         # Canadian crosses, in case the installed compiler is not fully
32 Index: gcc-4.3.4/configure.ac
33 ===================================================================
34 --- gcc-4.3.4.orig/configure.ac 2009-04-25 07:55:24.000000000 +0200
35 +++ gcc-4.3.4/configure.ac      2009-11-28 22:40:01.647590027 +0100
36 @@ -462,6 +462,7 @@
37      noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss ${libgcj} target-libmudflap"
38      ;;
39    *-*-rtems*)
40 +    skipdirs="$skipdirs target-libiberty"
41      noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
42      ;;
43      # The tpf target doesn't support gdb yet.
44 @@ -2342,7 +2343,7 @@
45         # to it.  This is right: we don't want to search that directory
46         # for binaries, but we want the header files in there, so add
47         # them explicitly.
48 -       FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/$(HOST_SUBDIR)/gcc/include'
49 +       FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/$(HOST_SUBDIR)/gcc/include -isystem $$r/$(HOST_SUBDIR)/gcc/include-fixed'
50  
51         # Someone might think of using the pre-installed headers on
52         # Canadian crosses, in case the installed compiler is not fully
53 Index: gcc-4.3.4/gcc/config/arm/rtems-elf.h
54 ===================================================================
55 --- gcc-4.3.4.orig/gcc/config/arm/rtems-elf.h   2008-02-06 08:33:26.000000000 +0100
56 +++ gcc-4.3.4/gcc/config/arm/rtems-elf.h        2009-11-28 22:40:01.647590027 +0100
57 @@ -43,4 +43,3 @@
58   *  with how this used to be defined.
59   */
60  #undef LINK_GCC_C_SEQUENCE_SPEC
61 -#define LINK_GCC_C_SEQUENCE_SPEC "%G %L"
62 Index: gcc-4.3.4/gcc/config/avr/t-rtems
63 ===================================================================
64 --- gcc-4.3.4.orig/gcc/config/avr/t-rtems       2004-11-23 04:44:03.000000000 +0100
65 +++ gcc-4.3.4/gcc/config/avr/t-rtems    2009-11-28 22:40:01.647590027 +0100
66 @@ -1,3 +1,4 @@
67  # Multilibs for avr RTEMS targets.
68  
69 -# ATM, this is just a stub
70 +# RTEMS uses _exit from newlib
71 +LIB1ASMFUNCS := $(filter-out _exit,$(LIB1ASMFUNCS))
72 Index: gcc-4.3.4/gcc/config/mips/elf.h
73 ===================================================================
74 --- gcc-4.3.4.orig/gcc/config/mips/elf.h        2007-08-02 12:49:31.000000000 +0200
75 +++ gcc-4.3.4/gcc/config/mips/elf.h     2009-11-28 22:40:01.651569933 +0100
76 @@ -48,6 +48,4 @@
77  #undef  ENDFILE_SPEC
78  #define ENDFILE_SPEC "crtend%O%s crtn%O%s"
79  
80 -#define NO_IMPLICIT_EXTERN_C 1
81 -
82  #define HANDLE_PRAGMA_PACK_PUSH_POP 1
83 Index: gcc-4.3.4/gcc/config/rs6000/rtems.h
84 ===================================================================
85 --- gcc-4.3.4.orig/gcc/config/rs6000/rtems.h    2007-08-02 12:49:31.000000000 +0200
86 +++ gcc-4.3.4/gcc/config/rs6000/rtems.h 2009-11-28 22:40:01.651569933 +0100
87 @@ -49,8 +49,18 @@
88  %{mcpu=604:  %{!Dppc*: %{!Dmpc*: -Dmpc604}  } } \
89  %{mcpu=750:  %{!Dppc*: %{!Dmpc*: -Dmpc750}  } } \
90  %{mcpu=821:  %{!Dppc*: %{!Dmpc*: -Dmpc821}  } } \
91 -%{mcpu=860:  %{!Dppc*: %{!Dmpc*: -Dmpc860}  } }" 
92 +%{mcpu=860:  %{!Dppc*: %{!Dmpc*: -Dmpc860}  } } \
93 +%{mcpu=8540: %{!Dppc*: %{!Dmpc*: -Dppc8540}  } }" 
94  
95  #undef  SUBSUBTARGET_EXTRA_SPECS
96  #define SUBSUBTARGET_EXTRA_SPECS \
97    { "cpp_os_rtems",            CPP_OS_RTEMS_SPEC }
98 +
99 +#undef SUBSUBTARGET_OVERRIDE_OPTIONS
100 +#define SUBSUBTARGET_OVERRIDE_OPTIONS          \
101 +  do {                                         \
102 +    if (TARGET_E500)                           \
103 +      {                                                \
104 +       rs6000_float_gprs = 1;                  \
105 +      }                                                \
106 +  } while(0)
107 Index: gcc-4.3.4/gcc/config/rs6000/t-rtems
108 ===================================================================
109 --- gcc-4.3.4.orig/gcc/config/rs6000/t-rtems    2005-05-27 09:54:06.000000000 +0200
110 +++ gcc-4.3.4/gcc/config/rs6000/t-rtems 2009-11-28 22:40:01.651569933 +0100
111 @@ -1,17 +1,15 @@
112  # Multilibs for powerpc RTEMS targets.
113  
114  MULTILIB_OPTIONS       = \
115 -mcpu=403/mcpu=505/mcpu=601/mcpu=603e/mcpu=604/mcpu=860/mcpu=7400 \
116 +mcpu=403/mcpu=505/mcpu=601/mcpu=603e/mcpu=604/mcpu=860/mcpu=7400/mcpu=8540 \
117  Dmpc8260 \
118  msoft-float
119  
120  MULTILIB_DIRNAMES      = \
121 -m403 m505 m601 m603e m604 m860 m7400 \
122 +m403 m505 m601 m603e m604 m860 m7400 m8540 \
123  mpc8260 \
124  nof
125  
126 -MULTILIB_EXTRA_OPTS    = mrelocatable-lib mno-eabi mstrict-align
127 -
128  # MULTILIB_MATCHES     = ${MULTILIB_MATCHES_FLOAT}
129  MULTILIB_MATCHES       =
130  MULTILIB_MATCHES       += ${MULTILIB_MATCHES_ENDIAN}
131 @@ -31,6 +29,10 @@
132  # Map 750 to .
133  MULTILIB_MATCHES       += mcpu?750=
134  
135 +# Map e500, 8548 to 8540
136 +MULTILIB_MATCHES       += mcpu?8540=mcpu?e500
137 +MULTILIB_MATCHES       += mcpu?8540=mcpu?8548
138 +
139  # Soft-float only, default implies msoft-float
140  # NOTE: Must match with MULTILIB_MATCHES_FLOAT and MULTILIB_MATCHES
141  MULTILIB_SOFTFLOAT_ONLY = \
142 @@ -64,3 +66,4 @@
143  MULTILIB_EXCEPTIONS += *mcpu=750/Dmpc*
144  MULTILIB_EXCEPTIONS += *mcpu=860/Dmpc*
145  MULTILIB_EXCEPTIONS += *mcpu=7400/Dmpc*
146 +MULTILIB_EXCEPTIONS += *mcpu=8540/Dmpc*