update to gcc 4.6.2 and binutils 2.22
[toolchains.git] / gcc-patch.txt
blob529718998a8eb4178fedbae9b74add5e39620eb7
1 diff -ruN gcc-4.6.2/configure gcc-4.6.2.patched/configure
2 --- gcc-4.6.2/configure 2011-06-27 13:54:59.000000000 -0700
3 +++ gcc-4.6.2.patched/configure 2011-12-24 12:23:16.660536149 -0800
4 @@ -3125,6 +3125,7 @@
5      noconfigdirs="$noconfigdirs ld gas gdb gprof"
6      noconfigdirs="$noconfigdirs sim target-rda"
7      noconfigdirs="$noconfigdirs ${libgcj}"
8 +    noconfigdirs="$noconfigdirs target-libstdc++-v3"
9      ;;
10    *-*-freebsd[12] | *-*-freebsd[12].* | *-*-freebsd*aout*)
11      noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
12 @@ -3205,6 +3206,10 @@
13    sh-*-linux*)
14      noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
15      ;;
16 +  sh-*-elf)
17 +    noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
18 +    noconfigdirs="$noconfigdirs target-libstdc++-v3"
19 +       ;;
20    sh*-*-pe|mips*-*-pe|*arm-wince-pe)
21      noconfigdirs="$noconfigdirs ${libgcj}"
22      noconfigdirs="$noconfigdirs target-examples"
23 @@ -3232,6 +3237,7 @@
24      ;;
25    arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
26      noconfigdirs="$noconfigdirs target-libffi target-qthreads"
27 +    noconfigdirs="$noconfigdirs target-libstdc++-v3"
28      libgloss_dir=arm
29      ;;
30    arm*-*-linux-gnueabi)
31 @@ -3369,6 +3375,7 @@
32      ;;
33    i[3456789]86-*-coff | i[3456789]86-*-elf)
34      noconfigdirs="$noconfigdirs ${libgcj}"
35 +    noconfigdirs="$noconfigdirs target-libstdc++-v3"
36      libgloss_dir=i386
37      ;;
38    i[3456789]86-*-linux*)
39 @@ -3436,6 +3443,10 @@
40    i[3456789]86-*-rdos*)
41      noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss"
42      ;;
43 +  x86_64-*-elf)
44 +    noconfigdirs="$noconfigdirs ${libgcj}"
45 +       noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3"
46 +    ;;
47    m32r-*-*)
48      noconfigdirs="$noconfigdirs ${libgcj}"
49      ;;
50 @@ -3492,6 +3503,10 @@
51      noconfigdirs="$noconfigdirs ${libgcj}"
52      libgloss_dir=rs6000
53      ;;
54 +  powerpc-*-elf)
55 +    noconfigdirs="$noconfigdirs ${libgcj}"
56 +    noconfigdirs="$noconfigdirs target-libstdc++-v3"
57 +    ;;
58    powerpc-*-eabi* | powerpcle-*-eabi* | powerpc-*-rtems* )
59      libgloss_dir=rs6000
60      ;;
61 diff -ruN gcc-4.6.2/gcc/config/arm/elf.h gcc-4.6.2.patched/gcc/config/arm/elf.h
62 --- gcc-4.6.2/gcc/config/arm/elf.h      2009-06-21 13:48:15.000000000 -0700
63 +++ gcc-4.6.2.patched/gcc/config/arm/elf.h      2011-12-24 13:12:51.121576063 -0800
64 @@ -164,3 +164,6 @@
65  #undef L_floatundisf
66  #endif
68 +#undef FPUTYPE_DEFAULT
69 +#define FPUTYPE_DEFAULT "vfp"
71 diff -ruN gcc-4.6.2/gcc/config/arm/t-arm-elf gcc-4.6.2.patched/gcc/config/arm/t-arm-elf
72 --- gcc-4.6.2/gcc/config/arm/t-arm-elf  2011-01-03 12:52:22.000000000 -0800
73 +++ gcc-4.6.2.patched/gcc/config/arm/t-arm-elf  2011-12-24 14:13:54.219032141 -0800
74 @@ -40,22 +40,36 @@
75  #MULTILIB_DIRNAMES    += fa526 fa626 fa606te fa626te fmp626 fa726te
76  #MULTILIB_EXCEPTIONS  += *mthumb*/*mcpu=fa526 *mthumb*/*mcpu=fa626
78 -#MULTILIB_OPTIONS      += march=armv7
79 -#MULTILIB_DIRNAMES     += thumb2
80 -#MULTILIB_EXCEPTIONS   += march=armv7* marm/*march=armv7*
81 -#MULTILIB_MATCHES      += march?armv7=march?armv7-a
82 -#MULTILIB_MATCHES      += march?armv7=march?armv7-r
83 -#MULTILIB_MATCHES      += march?armv7=march?armv7-m
84 -#MULTILIB_MATCHES      += march?armv7=mcpu?cortex-a8
85 -#MULTILIB_MATCHES      += march?armv7=mcpu?cortex-r4
86 -#MULTILIB_MATCHES      += march?armv7=mcpu?cortex-m3
87 +# build a bunch of specialized versions of libcc for particular cores
88 +#MULTILIB_OPTIONS    += mcpu=arm7tdmi/mcpu=arm9tdmi/mcpu=arm920t/mcpu=arm926ej-s/mcpu=arm1136j-s/mcpu=arm1136jf-s/mcpu=arm1176jz-s/mcpu=arm1176jzf-s/mcpu=xscale/mcpu=mpcore/mcpu=cortex-a8/cortex-a9/march=armv4t/march=armv5t/march=armv5te/march=armv6/march=armv6j/march=armv6k/march=armv6z/march=armv6zk/march=armv7-a/march=armv7-r
89 +#MULTILIB_DIRNAMES   += arm7tdmi arm9tdmi arm920t arm926ej-s arm1136j-s arm1136jf-s arm1176jz-s arm1176jzf-s xscale mpcore cortex-a8 cortex-a9 cortex-m3 armv4t armv5t armv5te armv6 armv6j armv6k armv6z armv6zk armv7-a armv7-r
90 +#MULTILIB_OPTIONS    += mcpu=arm7tdmi/mcpu=arm9tdmi/mcpu=arm920t/mcpu=arm926ej-s/mcpu=arm1136j-s/mcpu=arm1136jf-s/mcpu=arm1176jz-s/mcpu=arm1176jzf-s/mcpu=xscale/mcpu=mpcore/mcpu=cortex-a8/mcpu=cortex-a9
91 +#MULTILIB_DIRNAMES   += arm7tdmi arm9tdmi arm920t arm926ej-s arm1136j-s arm1136jf-s arm1176jz-s arm1176jzf-s xscale mpcore cortex-a8 cortex-a9
93 +MULTILIB_OPTIONS      += march=armv7
94 +MULTILIB_DIRNAMES     += thumb2
95 +MULTILIB_EXCEPTIONS   += march=armv7* marm/*march=armv7*
96 +MULTILIB_MATCHES      += march?armv7=march?armv7-a
97 +MULTILIB_MATCHES      += march?armv7=march?armv7-r
98 +MULTILIB_MATCHES      += march?armv7=march?armv7-m
99 +MULTILIB_MATCHES      += march?armv7=mcpu?cortex-a15
100 +MULTILIB_MATCHES      += march?armv7=mcpu?cortex-a9
101 +MULTILIB_MATCHES      += march?armv7=mcpu?cortex-a8
102 +MULTILIB_MATCHES      += march?armv7=mcpu?cortex-r4
103 +MULTILIB_MATCHES      += march?armv7=mcpu?cortex-m4
104 +MULTILIB_MATCHES      += march?armv7=mcpu?cortex-m3
106 +MULTILIB_OPTIONS      += mfpu=vfp
107 +MULTILIB_DIRNAMES     += vfp
108 +MULTILIB_MATCHES      += mfpu?vfp=mcpu?arm1136jf-s
109 +MULTILIB_MATCHES      += mfpu?vfp=mcpu?arm1136jzf-s
111  # Not quite true.  We can support hard-vfp calling in Thumb2, but how do we
112  # express that here?  Also, we really need architecture v5e or later
113  # (mcrr etc).
114 -MULTILIB_OPTIONS       += mfloat-abi=hard
115 -MULTILIB_DIRNAMES      += fpu
116 -MULTILIB_EXCEPTIONS    += *mthumb/*mfloat-abi=hard*
117 +#MULTILIB_OPTIONS       += mfloat-abi=hard
118 +#MULTILIB_DIRNAMES      += fpu
119 +#MULTILIB_EXCEPTIONS    += *mthumb/*mfloat-abi=hard*
120  #MULTILIB_EXCEPTIONS    += *mcpu=fa526/*mfloat-abi=hard*
121  #MULTILIB_EXCEPTIONS    += *mcpu=fa626/*mfloat-abi=hard*
123 @@ -71,8 +85,8 @@
124  # MULTILIB_DIRNAMES   += fpu soft
125  # MULTILIB_EXCEPTIONS += *mthumb/*mhard-float*
126  # 
127 -# MULTILIB_OPTIONS    += mno-thumb-interwork/mthumb-interwork
128 -# MULTILIB_DIRNAMES   += normal interwork
129 +MULTILIB_OPTIONS    += mno-thumb-interwork/mthumb-interwork
130 +MULTILIB_DIRNAMES   += normal interwork
131  # 
132  # MULTILIB_OPTIONS    += fno-leading-underscore/fleading-underscore
133  # MULTILIB_DIRNAMES   += elf under
134 diff -ruN gcc-4.6.2/gcc/config/i386/t-x86_64elf gcc-4.6.2.patched/gcc/config/i386/t-x86_64elf
135 --- gcc-4.6.2/gcc/config/i386/t-x86_64elf       1969-12-31 16:00:00.000000000 -0800
136 +++ gcc-4.6.2.patched/gcc/config/i386/t-x86_64elf       2011-12-24 12:23:16.660536149 -0800
137 @@ -0,0 +1,21 @@
138 +# On x86-64 we do not need any exports for glibc for 64-bit libgcc_s,
139 +# override the settings
140 +# from t-slibgcc-elf-ver and t-linux
141 +#SHLIB_MAPFILES = $(srcdir)/libgcc-std.ver \
142 +#               $(srcdir)/config/i386/libgcc-x86_64-glibc.ver
144 +MULTILIB_OPTIONS = m64/m32
145 +MULTILIB_DIRNAMES = 64 32 
146 +MULTILIB_OSDIRNAMES = ../lib64 ../lib
148 +LIBGCC = stmp-multilib
149 +INSTALL_LIBGCC = install-multilib
151 +#EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o crtbeginS.o crtendS.o \
152 +#                   crtbeginT.o crtfastmath.o
154 +# The pushl in CTOR initialization interferes with frame pointer elimination.
155 +# crtend*.o cannot be compiled without -fno-asynchronous-unwind-tables,
156 +# because then __FRAME_END__ might not be the last thing in .eh_frame
157 +# section.
158 +#CRTSTUFF_T_CFLAGS = -fno-omit-frame-pointer -fno-asynchronous-unwind-tables
159 diff -ruN gcc-4.6.2/gcc/config.gcc gcc-4.6.2.patched/gcc/config.gcc
160 --- gcc-4.6.2/gcc/config.gcc    2011-07-22 09:44:50.000000000 -0700
161 +++ gcc-4.6.2.patched/gcc/config.gcc    2011-12-24 12:23:16.660536149 -0800
162 @@ -1219,6 +1219,10 @@
163         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/x86-64.h i386/freebsd.h i386/freebsd64.h"
164         tmake_file="${tmake_file} i386/t-crtstuff"
165         ;;
166 +x86_64-*-elf*)
167 +       tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/x86-64.h"
168 +       tmake_file="i386/t-x86_64elf"
169 +       ;;
170  i[34567]86-*-netbsdelf*)
171         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/netbsd-elf.h"
172         extra_options="${extra_options} netbsd.opt netbsd-elf.opt"