sdcard build fixes for paranoia mode
[AROS.git] / tools / crosstools / binutils-2.23.2-aros.diff
blob8d0ac7788da4fa962a66dc088b10a729cceb3bee
1 diff -ruN binutils-2.23.2/bfd/config.bfd binutils-2.23.2.aros/bfd/config.bfd
2 --- binutils-2.23.2/bfd/config.bfd 2012-09-04 16:14:59.000000000 +0200
3 +++ binutils-2.23.2.aros/bfd/config.bfd 2012-06-28 13:50:52.000000000 +0200
4 @@ -315,7 +315,7 @@
5 ;;
6 arm-*-elf | arm-*-freebsd* | arm*-*-linux-* | arm*-*-conix* | \
7 arm*-*-uclinux* | arm-*-kfreebsd*-gnu | \
8 - arm*-*-eabi* )
9 + arm*-*-eabi* | arm*-*-aros)
10 targ_defvec=bfd_elf32_littlearm_vec
11 targ_selvecs=bfd_elf32_bigarm_vec
13 @@ -518,6 +518,8 @@
15 i[3-7]86-*-aros*)
16 targ_defvec=bfd_elf32_i386_vec
17 + targ_selvecs="bfd_elf64_x86_64_vec bfd_elf32_powerpc_vec"
18 + want64=true
20 i[3-7]86-*-chorus*)
21 targ_defvec=bfd_elf32_i386_vec
22 @@ -660,6 +662,11 @@
23 want64=true
24 targ_underscore=no
26 + x86_64-*-aros*)
27 + targ_defvec=bfd_elf64_x86_64_vec
28 + targ_selvecs="bfd_elf32_i386_vec bfd_elf32_powerpc_vec"
29 + want64=true
30 + ;;
31 #endif
32 i[3-7]86-*-lynxos*)
33 targ_defvec=bfd_elf32_i386_vec
34 @@ -815,7 +822,7 @@
35 targ_selvecs="cisco_core_big_vec ieee_vec"
36 targ_underscore=yes
38 - m68*-*-elf* | m68*-*-sysv4* | m68*-*-uclinux*)
39 + m68*-*-elf* | m68*-*-sysv4* | m68*-*-uclinux* | m68*-*-aros)
40 targ_defvec=bfd_elf32_m68k_vec
41 targ_selvecs="m68kcoff_vec ieee_vec"
43 @@ -1190,6 +1197,11 @@
44 want64=true
46 #endif
47 + powerpc-*-aros*)
48 + targ_defvec=bfd_elf32_powerpc_vec
49 + targ_selvecs="bfd_elf32_i386_vec bfd_elf64_x86_64_vec"
50 + want64=true
51 + ;;
52 powerpc-*-*freebsd*)
53 targ_defvec=bfd_elf32_powerpc_freebsd_vec
54 targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec bfd_elf32_powerpcle_vec ppcboot_vec"
55 diff -ruN binutils-2.23.2/binutils/configure binutils-2.23.2.aros/binutils/configure
56 --- binutils-2.23.2/binutils/configure 2012-11-05 17:27:34.000000000 +0100
57 +++ binutils-2.23.2.aros/binutils/configure 2012-06-28 13:50:52.000000000 +0200
58 @@ -12746,7 +12746,9 @@
59 $as_echo_n "checking for mbstate_t... " >&6; }
60 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
61 /* end confdefs.h. */
62 +#if !defined(__AROS__)
63 #include <wchar.h>
64 +#endif
65 int
66 main ()
68 diff -ruN binutils-2.23.2/binutils/sysdep.h binutils-2.23.2.aros/binutils/sysdep.h
69 --- binutils-2.23.2/binutils/sysdep.h 2012-05-11 16:25:29.000000000 +0200
70 +++ binutils-2.23.2.aros/binutils/sysdep.h 2012-06-28 13:50:52.000000000 +0200
71 @@ -26,6 +26,7 @@
72 #include "ansidecl.h"
73 #include <stdio.h>
74 #include <sys/types.h>
75 +#include <sys/stat.h>
77 #include "bfdver.h"
79 diff -ruN binutils-2.23.2/config.guess binutils-2.23.2.aros/config.guess
80 --- binutils-2.23.2/config.guess 2011-06-06 12:36:06.000000000 +0200
81 +++ binutils-2.23.2.aros/config.guess 2012-06-28 13:50:52.000000000 +0200
82 @@ -292,6 +292,9 @@
83 *:[Mm]orph[Oo][Ss]:*:*)
84 echo ${UNAME_MACHINE}-unknown-morphos
85 exit ;;
86 + *:AROS:*:*)
87 + echo ${UNAME_MACHINE}-unknown-aros
88 + exit ;;
89 *:OS/390:*:*)
90 echo i370-ibm-openedition
91 exit ;;
92 diff -ruN binutils-2.23.2/intl/configure binutils-2.23.2.aros/intl/configure
93 --- binutils-2.23.2/intl/configure 2010-09-27 22:22:53.000000000 +0200
94 +++ binutils-2.23.2.aros/intl/configure 2012-06-28 13:50:52.000000000 +0200
95 @@ -4606,6 +4606,9 @@
97 int main ()
99 +#if defined(__AROS__)
100 + exit (1);
101 +#endif
102 signal (SIGFPE, sigfpe_handler);
103 /* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
104 #if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
105 diff -ruN binutils-2.23.2/ld/configure.tgt binutils-2.23.2.aros/ld/configure.tgt
106 --- binutils-2.23.2/ld/configure.tgt 2012-09-04 14:53:47.000000000 +0200
107 +++ binutils-2.23.2.aros/ld/configure.tgt 2012-06-28 13:50:52.000000000 +0200
108 @@ -87,6 +87,10 @@
109 targ_extra_emuls="armelfb armelf armelf_linux"
110 targ_extra_libpath="armelf_linux"
112 +arm*-*-aros*) targ_emul=armelf_aros
113 + targ_extra_emuls=armelfb_aros
114 + targ_extra_libpath=$targ_extra_emuls
115 + ;;
116 arm*-*-linux-*eabi*) targ_emul=armelf_linux_eabi
117 targ_extra_emuls=armelfb_linux_eabi
118 targ_extra_libpath=$targ_extra_emuls
119 @@ -260,6 +264,9 @@
120 x86_64-*-elf*) targ_emul=elf_x86_64
121 targ_extra_emuls="elf_i386 elf_l1om elf_k1om"
123 +x86_64-*-aros*) targ_emul=elf_x86_64
124 + targ_extra_emuls=elf_i386
125 + ;;
126 i[3-7]86-*-kaos*) targ_emul=elf_i386 ;;
127 i[3-7]86-*-freebsdaout* | i[3-7]86-*-freebsd[12].* | i[3-7]86-*-freebsd[12])
128 targ_emul=i386bsd ;;
129 @@ -366,6 +373,7 @@
130 m68k-hp-bsd*) targ_emul=hp300bsd ;;
131 m68*-motorola-sysv*) targ_emul=delta68 ;;
132 m68*-*-aout) targ_emul=m68kaout ;;
133 +m68*-*-aros) targ_emul=m68kelf ;;
134 m68*-*-coff) targ_emul=m68kcoff ;;
135 m68*-*-elf) targ_emul=m68kelf ;;
136 m68*-*-hpux*) targ_emul=hp3hpux ;;
137 @@ -557,6 +565,7 @@
138 powerpc-*-beos*) targ_emul=aixppc ;;
139 powerpc-*-windiss*) targ_emul=elf32ppcwindiss ;;
140 powerpc-*-lynxos*) targ_emul=ppclynx ;;
141 +powerpc-*-aros*) targ_emul=elf32ppc ;;
142 rs6000-*-aix[5-9]*) targ_emul=aix5rs6 ;;
143 rs6000-*-aix*) targ_emul=aixrs6
145 diff -ruN binutils-2.23.2/ld/emulparams/armelf_aros.sh binutils-2.23.2.aros/ld/emulparams/armelf_aros.sh
146 --- binutils-2.23.2/ld/emulparams/armelf_aros.sh 1970-01-01 01:00:00.000000000 +0100
147 +++ binutils-2.23.2.aros/ld/emulparams/armelf_aros.sh 2012-06-28 13:50:52.000000000 +0200
148 @@ -0,0 +1,3 @@
149 +. ${srcdir}/emulparams/armelf_linux_eabi.sh
150 +# Remap R_ARM_TARGET2 to R_ARM_ABS32
151 +TARGET2_TYPE=abs
152 diff -ruN binutils-2.23.2/ld/emulparams/armelfb_aros.sh binutils-2.23.2.aros/ld/emulparams/armelfb_aros.sh
153 --- binutils-2.23.2/ld/emulparams/armelfb_aros.sh 1970-01-01 01:00:00.000000000 +0100
154 +++ binutils-2.23.2.aros/ld/emulparams/armelfb_aros.sh 2012-06-28 13:50:52.000000000 +0200
155 @@ -0,0 +1,2 @@
156 +. ${srcdir}/emulparams/armelf_aros.sh
157 +OUTPUT_FORMAT="elf32-bigarm"
158 diff -ruN binutils-2.23.2/ld/Makefile.in binutils-2.23.2.aros/ld/Makefile.in
159 --- binutils-2.23.2/ld/Makefile.in 2013-03-25 09:06:23.000000000 +0100
160 +++ binutils-2.23.2.aros/ld/Makefile.in 2012-06-28 13:50:52.000000000 +0200
161 @@ -447,6 +447,7 @@
162 earmaoutl.c \
163 earmcoff.c \
164 earmelf.c \
165 + earmelf_aros.c \
166 earmelf_fbsd.c \
167 earmelf_linux.c \
168 earmelf_linux_eabi.c \
169 @@ -454,6 +455,7 @@
170 earmelf_nbsd.c \
171 earmelf_vxworks.c \
172 earmelfb.c \
173 + earmelfb_aros.c \
174 earmelfb_linux.c \
175 earmelfb_linux_eabi.c \
176 earmelfb_nacl.c \
177 @@ -1073,6 +1075,7 @@
178 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmaoutl.Po@am__quote@
179 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmcoff.Po@am__quote@
180 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf.Po@am__quote@
181 +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_aros.Po@am__quote@
182 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_fbsd.Po@am__quote@
183 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_linux.Po@am__quote@
184 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_linux_eabi.Po@am__quote@
185 @@ -1080,6 +1083,7 @@
186 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_nbsd.Po@am__quote@
187 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_vxworks.Po@am__quote@
188 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb.Po@am__quote@
189 +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb_aros.Po@am__quote@
190 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb_linux.Po@am__quote@
191 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb_linux_eabi.Po@am__quote@
192 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb_nacl.Po@am__quote@
193 @@ -2189,6 +2193,12 @@
194 $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
195 $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
196 ${GENSCRIPTS} armelf_linux_eabi "$(tdir_armelf_linux_abi)"
197 +earmelf_aros.c: $(srcdir)/emulparams/armelf_aros.sh \
198 + $(srcdir)/emulparams/armelf_linux_eabi.sh \
199 + $(srcdir)/emulparams/armelf_linux.sh \
200 + $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
201 + $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
202 + ${GENSCRIPTS} armelf_aros "$(tdir_armelf_aros)"
203 earmelf_nacl.c: $(srcdir)/emulparams/armelf_nacl.sh \
204 $(srcdir)/emulparams/armelf_linux_eabi.sh \
205 $(srcdir)/emulparams/armelf_linux.sh \
206 @@ -2222,6 +2232,13 @@
207 $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
208 $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
209 ${GENSCRIPTS} armelfb_linux_eabi "$(tdir_armelfb_linux_abi)"
210 +earmelfb_aros.c: $(srcdir)/emulparams/armelfb_aros.sh \
211 + $(srcdir)/emulparams/armelf_aros.sh \
212 + $(srcdir)/emulparams/armelf_linux_eabi.sh \
213 + $(srcdir)/emulparams/armelf_linux.sh \
214 + $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
215 + $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
216 + ${GENSCRIPTS} armelfb_aros "$(tdir_armelfb_aros)"
217 earmelfb_nacl.c: $(srcdir)/emulparams/armelfb_nacl.sh \
218 $(srcdir)/emulparams/armelf_nacl.sh \
219 $(srcdir)/emulparams/armelf_linux_eabi.sh \