append modtype to generated makefiles
[AROS.git] / tools / crosstools / gcc-4.6.2-aros.diff
blob629b057c53c4f754c294f88559ca6bd22ffe9b47
1 diff -ruN gcc-4.6.2/configure gcc-4.6.2.aros/configure
2 --- gcc-4.6.2/configure 2011-06-27 22:54:59.000000000 +0200
3 +++ gcc-4.6.2.aros/configure 2012-04-14 16:50:17.996003545 +0200
4 @@ -2997,6 +2997,9 @@
5 ppc*-*-pe)
6 noconfigdirs="$noconfigdirs patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl gnuserv"
7 ;;
8 + *-*-aros*)
9 + noconfigdirs="$noconfigdirs patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl tix gnuserv gdb"
10 + ;;
11 powerpc-*-beos*)
12 noconfigdirs="$noconfigdirs tk itcl libgui gdb dejagnu readline"
14 @@ -3810,6 +3813,8 @@
15 # Build the stage2 and stage3 compilers with -fomit-frame-pointer.
16 host_makefile_frag="config/mh-x86omitfp"
18 + *-*-aros*)
19 + ;;
20 esac
23 diff -ruN gcc-4.6.2/configure.ac gcc-4.6.2.aros/configure.ac
24 --- gcc-4.6.2/configure.ac 2011-06-27 22:54:59.000000000 +0200
25 +++ gcc-4.6.2.aros/configure.ac 2012-04-14 16:50:17.996003545 +0200
26 @@ -453,6 +453,9 @@
27 ppc*-*-pe)
28 noconfigdirs="$noconfigdirs patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl gnuserv"
30 + *-*-aros*)
31 + noconfigdirs="$noconfigdirs patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl tix gnuserv gdb"
32 + ;;
33 powerpc-*-beos*)
34 noconfigdirs="$noconfigdirs tk itcl libgui gdb dejagnu readline"
36 @@ -1237,6 +1240,8 @@
37 # Build the stage2 and stage3 compilers with -fomit-frame-pointer.
38 host_makefile_frag="config/mh-x86omitfp"
40 + *-*-aros*)
41 + ;;
42 esac
45 diff -ruN gcc-4.6.2/fixincludes/configure gcc-4.6.2.aros/fixincludes/configure
46 --- gcc-4.6.2/fixincludes/configure 2010-06-03 08:45:02.000000000 +0200
47 +++ gcc-4.6.2.aros/fixincludes/configure 2012-04-14 16:50:17.996003545 +0200
48 @@ -4245,6 +4245,7 @@
50 else
51 case $host in
52 + *-*-aros* | \
53 i?86-*-msdosdjgpp* | \
54 i?86-*-mingw32* | \
55 x86_64-*-mingw32* | \
56 diff -ruN gcc-4.6.2/fixincludes/configure.ac gcc-4.6.2.aros/fixincludes/configure.ac
57 --- gcc-4.6.2/fixincludes/configure.ac 2010-06-03 08:45:02.000000000 +0200
58 +++ gcc-4.6.2.aros/fixincludes/configure.ac 2012-04-14 16:50:17.996003545 +0200
59 @@ -49,6 +49,7 @@
60 TARGET=oneprocess
61 fi],
62 [case $host in
63 + *-*-aros* | \
64 i?86-*-msdosdjgpp* | \
65 i?86-*-mingw32* | \
66 x86_64-*-mingw32* | \
67 diff -ruN gcc-4.6.2/gcc/config/arm/aros.h gcc-4.6.2.aros/gcc/config/arm/aros.h
68 --- gcc-4.6.2/gcc/config/arm/aros.h 1970-01-01 01:00:00.000000000 +0100
69 +++ gcc-4.6.2.aros/gcc/config/arm/aros.h 2012-04-14 16:50:17.996003545 +0200
70 @@ -0,0 +1,79 @@
71 +/* Configuration file for ARM AROS EABI targets.
72 + Copyright (C) 2004, 2005, 2006, 2007, 2010
73 + Free Software Foundation, Inc.
74 + Contributed by Pavel Fedin
75 + Based on linux-eabi.h and other AROS targets
77 + This file is part of GCC.
79 + GCC is free software; you can redistribute it and/or modify it
80 + under the terms of the GNU General Public License as published
81 + by the Free Software Foundation; either version 3, or (at your
82 + option) any later version.
84 + GCC is distributed in the hope that it will be useful, but WITHOUT
85 + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
86 + or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
87 + License for more details.
89 + You should have received a copy of the GNU General Public License
90 + along with GCC; see the file COPYING3. If not see
91 + <http://www.gnu.org/licenses/>. */
93 +/* On EABI GNU/Linux, we want both the BPABI builtins and the
94 + GNU/Linux builtins. */
95 +#undef TARGET_OS_CPP_BUILTINS
96 +#define TARGET_OS_CPP_BUILTINS() \
97 + do \
98 + { \
99 + TARGET_BPABI_CPP_BUILTINS(); \
100 + builtin_define_std ("AROS"); \
101 + builtin_define ("AMIGA"); \
102 + builtin_define ("_AMIGA"); \
103 + builtin_assert ("system=posix"); \
104 + if (flag_pic) \
105 + { \
106 + builtin_define ("__PIC__"); \
107 + builtin_define ("__pic__"); \
108 + } \
109 + } \
110 + while (false)
112 +/* We default to a softfp ABI so that we are compatible
113 + with the Linux EABI (as used by the linker). */
114 +#undef TARGET_DEFAULT_FLOAT_ABI
115 +#define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_SOFTFP
117 +/* We default to the "aapcs-linux" ABI so that enums are int-sized by
118 + default. */
119 +#undef ARM_DEFAULT_ABI
120 +#define ARM_DEFAULT_ABI ARM_ABI_AAPCS_LINUX
122 +/* Default to armv5t so that thumb shared libraries work.
123 + The ARM10TDMI core is the default for armv5t, so set
124 + SUBTARGET_CPU_DEFAULT to achieve this. */
125 +#undef SUBTARGET_CPU_DEFAULT
126 +#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
128 +/* TARGET_BIG_ENDIAN_DEFAULT is set in
129 + config.gcc for big endian configurations. */
130 +#undef TARGET_LINKER_EMULATION
131 +#if TARGET_BIG_ENDIAN_DEFAULT
132 +#define TARGET_LINKER_EMULATION "armelfb_linux_eabi"
133 +#else
134 +#define TARGET_LINKER_EMULATION "armelf_linux_eabi"
135 +#endif
137 +#undef SUBTARGET_EXTRA_LINK_SPEC
138 +#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION
140 +/* Provide a LINK_SPEC appropriate for AROS. */
141 +#undef LINK_SPEC
142 +#define LINK_SPEC "-m armelf_linux_eabi -L %R/lib"
144 +/* Use own supplement to libgcc. */
145 +#undef LIBGCC_SPEC
146 +#define LIBGCC_SPEC "-laeabi -lgcc"
148 +/* FIXME: AROS doesn't support dw2 unwinding yet. */
149 +#undef MD_FALLBACK_FRAME_STATE_FOR
150 diff -ruN gcc-4.6.2/gcc/config/aros.h gcc-4.6.2.aros/gcc/config/aros.h
151 --- gcc-4.6.2/gcc/config/aros.h 1970-01-01 01:00:00.000000000 +0100
152 +++ gcc-4.6.2.aros/gcc/config/aros.h 2012-04-14 18:06:44.876880307 +0200
153 @@ -0,0 +1,100 @@
154 +/* Definitions for AROS
155 + Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
156 + Contributed by Fabio Alemagna
157 + Based upon linux.h, contributed by Eric Youngdale.
159 +This file is part of GNU CC.
161 +GNU CC is free software; you can redistribute it and/or modify
162 +it under the terms of the GNU General Public License as published by
163 +the Free Software Foundation; either version 2, or (at your option)
164 +any later version.
166 +GNU CC is distributed in the hope that it will be useful,
167 +but WITHOUT ANY WARRANTY; without even the implied warranty of
168 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
169 +GNU General Public License for more details.
171 +You should have received a copy of the GNU General Public License
172 +along with GNU CC; see the file COPYING. If not, write to
173 +the Free Software Foundation, 59 Temple Place - Suite 330,
174 +Boston, MA 02111-1307, USA. */
176 +/* Don't assume anything about the header files. */
177 +#define NO_IMPLICIT_EXTERN_C
179 +#undef SIZE_TYPE
180 +#define SIZE_TYPE "long unsigned int"
182 +#undef WCHAR_TYPE
183 +#define WCHAR_TYPE "char"
185 +#undef WCHAR_TYPE_SIZE
186 +#define WCHAR_TYPE_SIZE 8
188 +#undef PTRDIFF_TYPE
189 +#define PTRDIFF_TYPE "long int"
191 +#undef TARGET_OS_CPP_BUILTINS
192 +#define TARGET_OS_CPP_BUILTINS() \
193 + do \
194 + { \
195 + builtin_define_std ("AROS"); \
196 + builtin_define ("AMIGA"); \
197 + builtin_define ("_AMIGA"); \
198 + builtin_define ("__ELF__"); \
199 + builtin_assert ("system=posix"); \
200 + } \
201 + while (0)
203 +#undef ASM_APP_ON
204 +#define ASM_APP_ON "#APP\n"
206 +#undef ASM_APP_OFF
207 +#define ASM_APP_OFF "#NO_APP\n"
209 +#undef MD_EXEC_PREFIX
210 +#undef MD_STARTFILE_PREFIX
212 +/* Provide a STARTFILE_SPEC appropriate for AROS. AROS has its own
213 + set of startup files which also take care of handling C++
214 + constructors/destructors. */
216 +#undef STARTFILE_SPEC
217 +#define STARTFILE_SPEC \
218 + "%{detach:detach.o%s} startup.o%s %{nix:nixmain.o%s}"
220 +/* Provide a ENDFILE_SPEC appropriate for AROS. */
222 +#undef ENDFILE_SPEC
223 +#define ENDFILE_SPEC \
224 + "-lautoinit"
226 +#undef STANDARD_INCLUDE_DIR
227 +#define STANDARD_INCLUDE_DIR "/include"
229 +#undef LOCAL_INCLUDE_DIR
230 +#define LOCAL_INCLUDE_DIR "/local/include"
232 +/* This is for -profile to use -lc_p instead of -lc. */
233 +#ifndef CC1_SPEC
234 +#define CC1_SPEC "%{profile:-p}"
235 +#endif
237 +/* The GNU C++ standard library requires that these macros be defined. */
238 +#undef CPLUSPLUS_CPP_SPEC
239 +#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
241 +#undef LIB_SPEC
242 +#define LIB_SPEC \
243 + "-lamiga -larosc%{noarosc:.static} -larossupport -lm -lcodesets -lkeymap -lexpansion -lcommodities -ldiskfont -lasl -lmuimaster -ldatatypes -lcybergraphics -lworkbench -licon -lintuition -lgadtools -llayers -laros -lpartition -liffparse -lgraphics -llocale -ldos -lutility %{!nosysbase:-lexec} -lautoinit -llibinit -lautoinit"
245 +#if !defined(USE_GNULIBC_1) && defined(HAVE_LD_EH_FRAME_HDR)
246 +#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
247 +#endif
249 +/* AROS uses its own collect-like program for the moment. */
250 +#undef LINKER_NAME
251 +#define LINKER_NAME "collect-aros"
253 +#define TARGET_HAS_F_SETLKW
254 diff -ruN gcc-4.6.2/gcc/config/i386/aros64.h gcc-4.6.2.aros/gcc/config/i386/aros64.h
255 --- gcc-4.6.2/gcc/config/i386/aros64.h 1970-01-01 01:00:00.000000000 +0100
256 +++ gcc-4.6.2.aros/gcc/config/i386/aros64.h 2012-04-14 16:50:17.996003545 +0200
257 @@ -0,0 +1,43 @@
258 +/* Definitions for AMD x86_64 running AROS systems with ELF64 format.
259 + Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002
260 + Free Software Foundation, Inc.
261 + Contributed by Stanislaw Szymczyk <sszymczy@gmail.com>. Based on aros.h.
263 +This file is part of GNU CC.
265 +GNU CC is free software; you can redistribute it and/or modify
266 +it under the terms of the GNU General Public License as published by
267 +the Free Software Foundation; either version 2, or (at your option)
268 +any later version.
270 +GNU CC is distributed in the hope that it will be useful,
271 +but WITHOUT ANY WARRANTY; without even the implied warranty of
272 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
273 +GNU General Public License for more details.
275 +You should have received a copy of the GNU General Public License
276 +along with GNU CC; see the file COPYING. If not, write to
277 +the Free Software Foundation, 59 Temple Place - Suite 330,
278 +Boston, MA 02111-1307, USA. */
280 +/* Output at beginning of assembler file. */
281 +/* The .file command should always begin the output. */
283 +#undef TARGET_VERSION
284 +#define TARGET_VERSION fprintf (stderr, " (x86_64 AROS/ELF)");
286 +#undef CPP_SPEC
287 +#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
289 +/* The svr4 ABI for the i386 says that records and unions are returned
290 + in memory. In the 64bit compilation we will turn this flag off in
291 + override_options, as we never do pcc_struct_return scheme on this target. */
292 +#undef DEFAULT_PCC_STRUCT_RETURN
293 +#define DEFAULT_PCC_STRUCT_RETURN 1
295 +/* Provide a LINK_SPEC appropriate for AROS. */
297 +#undef LINK_SPEC
298 +#define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} -L %R/lib"
300 +/* FIXME: AROS doesn't support dw2 unwinding yet. */
301 diff -ruN gcc-4.6.2/gcc/config/i386/aros.h gcc-4.6.2.aros/gcc/config/i386/aros.h
302 --- gcc-4.6.2/gcc/config/i386/aros.h 1970-01-01 01:00:00.000000000 +0100
303 +++ gcc-4.6.2.aros/gcc/config/i386/aros.h 2012-04-14 16:50:17.996003545 +0200
304 @@ -0,0 +1,28 @@
305 +/* Definitions for Intel 386 running AROS systems with ELF format.
306 + Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002
307 + Free Software Foundation, Inc.
308 + Contributed by Fabio Alemagna.
309 + Based upon i386/linux.h by Eric Youngdale.
311 +This file is part of GNU CC.
313 +GNU CC is free software; you can redistribute it and/or modify
314 +it under the terms of the GNU General Public License as published by
315 +the Free Software Foundation; either version 2, or (at your option)
316 +any later version.
318 +GNU CC is distributed in the hope that it will be useful,
319 +but WITHOUT ANY WARRANTY; without even the implied warranty of
320 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
321 +GNU General Public License for more details.
323 +You should have received a copy of the GNU General Public License
324 +along with GNU CC; see the file COPYING. If not, write to
325 +the Free Software Foundation, 59 Temple Place - Suite 330,
326 +Boston, MA 02111-1307, USA. */
328 +#undef TARGET_VERSION
329 +#define TARGET_VERSION fprintf (stderr, " (i386 AROS/ELF)");
331 +#undef LINK_SPEC
332 +#define LINK_SPEC "-m elf_i386 -L%R/lib"
333 diff -ruN gcc-4.6.2/gcc/config/m68k/m68k.c gcc-4.6.2.aros/gcc/config/m68k/m68k.c
334 --- gcc-4.6.2/gcc/config/m68k/m68k.c 2011-07-31 17:09:25.000000000 +0200
335 +++ gcc-4.6.2.aros/gcc/config/m68k/m68k.c 2012-04-14 16:50:17.996003545 +0200
336 @@ -4522,7 +4522,7 @@
337 else if (letter == '/')
338 asm_fprintf (file, "%R");
339 else if (letter == '?')
340 - asm_fprintf (file, m68k_library_id_string);
341 + asm_fprintf (file, "%s", m68k_library_id_string);
342 else if (letter == 'p')
344 output_addr_const (file, op);
345 diff -ruN gcc-4.6.2/gcc/config/m68k/m68k.h gcc-4.6.2.aros/gcc/config/m68k/m68k.h
346 --- gcc-4.6.2/gcc/config/m68k/m68k.h 2010-11-22 02:57:50.000000000 +0100
347 +++ gcc-4.6.2.aros/gcc/config/m68k/m68k.h 2012-04-14 16:50:17.996003545 +0200
348 @@ -342,7 +342,9 @@
349 register elimination. */
350 #define FIRST_PSEUDO_REGISTER 25
352 -/* All m68k targets (except AmigaOS) use %a5 as the PIC register */
353 +/* All m68k targets (except AmigaOS) use %a5 as the PIC register.
354 + * On AmigaOS, we use %a4
355 + */
356 #define PIC_OFFSET_TABLE_REGNUM \
357 (!flag_pic ? INVALID_REGNUM \
358 : reload_completed ? REGNO (pic_offset_table_rtx) \
359 @@ -432,7 +434,8 @@
360 /* Most m68k targets use %a6 as a frame pointer. The AmigaOS
361 ABI uses %a6 for shared library calls, therefore the frame
362 pointer is shifted to %a5 on this target. */
363 -#define FRAME_POINTER_REGNUM A6_REG
364 +#define FRAME_POINTER_REGNUM A5_REG
365 +#define PIC_REG A4_REG
367 /* Base register for access to arguments of the function.
368 * This isn't a hardware register. It will be eliminated to the
369 diff -ruN gcc-4.6.2/gcc/config/m68k/m68k.md gcc-4.6.2.aros/gcc/config/m68k/m68k.md
370 --- gcc-4.6.2/gcc/config/m68k/m68k.md 2009-12-31 00:03:46.000000000 +0100
371 +++ gcc-4.6.2.aros/gcc/config/m68k/m68k.md 2012-04-14 16:50:17.996003545 +0200
372 @@ -131,7 +131,8 @@
373 [(D0_REG 0)
374 (A0_REG 8)
375 (A1_REG 9)
376 - (PIC_REG 13)
377 + (A4_REG 12)
378 + (A5_REG 13)
379 (A6_REG 14)
380 (SP_REG 15)
381 (FP0_REG 16)
382 @@ -7295,7 +7296,7 @@
384 if (TARGET_ID_SHARED_LIBRARY)
386 - operands[1] = gen_rtx_REG (Pmode, PIC_REG);
387 + operands[1] = gen_rtx_REG (Pmode, A4_REG);
388 return MOTOROLA ? "move.l %?(%1),%0" : "movel %1@(%?), %0";
390 else if (MOTOROLA)
391 diff -ruN gcc-4.6.2/gcc/config/rs6000/aros.h gcc-4.6.2.aros/gcc/config/rs6000/aros.h
392 --- gcc-4.6.2/gcc/config/rs6000/aros.h 1970-01-01 01:00:00.000000000 +0100
393 +++ gcc-4.6.2.aros/gcc/config/rs6000/aros.h 2012-04-14 16:50:17.996003545 +0200
394 @@ -0,0 +1,164 @@
395 +/* Definitions for Powerpc running AROS systems with ELF format.
396 + Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002
397 + Free Software Foundation, Inc.
398 + Contributed by Markus Weiss.
399 + Based upon i386/aros.h by Fabio Alemagna.
401 +This file is part of GNU CC.
403 +GNU CC is free software; you can redistribute it and/or modify
404 +it under the terms of the GNU General Public License as published by
405 +the Free Software Foundation; either version 2, or (at your option)
406 +any later version.
408 +GNU CC is distributed in the hope that it will be useful,
409 +but WITHOUT ANY WARRANTY; without even the implied warranty of
410 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
411 +GNU General Public License for more details.
413 +You should have received a copy of the GNU General Public License
414 +along with GNU CC; see the file COPYING. If not, write to
415 +the Free Software Foundation, 59 Temple Place - Suite 330,
416 +Boston, MA 02111-1307, USA. */
418 +/* Symbols missing in comparison to i386/aros.h are either
419 + defined in elfos.h, rs6000/rs6000.h rs6000/sysv4.h
420 + or not needed for PowerPC.
423 +/* We need to define __powerpc__. */
425 +#undef TARGET_OS_CPP_BUILTINS
426 +#define TARGET_OS_CPP_BUILTINS() \
427 + do \
428 + { \
429 + builtin_define_std ("AROS"); \
430 + builtin_define ("AMIGA"); \
431 + builtin_define ("_AMIGA"); \
432 + builtin_define ("__powerpc__"); \
433 + builtin_define ("__ELF__"); \
434 + builtin_assert ("system=posix"); \
435 + if (flag_pic) \
436 + { \
437 + builtin_define ("__PIC__"); \
438 + builtin_define ("__pic__"); \
439 + } \
440 + } \
441 + while (0)
443 +/* This one taken from linux.h. */
444 +/* We are 32-bit all the time, so optimize a little. */
445 +#undef TARGET_64BIT
446 +#define TARGET_64BIT 0
448 +/* Output at beginning of assembler file. */
449 +/* The .file command should always begin the output. */
450 +/*#undef TARGET_ASM_FILE_START_FILE_DIRECTIVE
451 +#define TARGET_ASM_FILE_START_FILE_DIRECTIVE true
452 +defined in elfos.h
455 +#undef TARGET_VERSION
456 +#define TARGET_VERSION fprintf (stderr, " (PowerPC AROS/ELF)");
458 +/* The svr4 ABI for the i386 says that records and unions are returned
459 + in memory. */
460 +/*#undef DEFAULT_PCC_STRUCT_RETURN
461 +#define DEFAULT_PCC_STRUCT_RETURN 1
462 +see rs6000/rs6000.h
466 +#undef ASM_COMMENT_START
467 +#define ASM_COMMENT_START "#"
468 +see rs6000/rs6000.h
472 +#undef DBX_REGISTER_NUMBER
473 +#define DBX_REGISTER_NUMBER(n) \
474 + (TARGET_64BIT ? dbx64_register_map[n] : svr4_dbx_register_map[n])
475 +see rs6000/sysv4.h
478 +/* Output assembler code to FILE to call the profiler.
479 + To the best of my knowledge, no Linux libc has required the label
480 + argument to mcount. */
483 +#define NO_PROFILE_COUNTERS 1
484 +not used by other similar ppc compilers
485 +only in darwin.h rs6000/linux64.h rs6000/rs6000.c
489 +#undef MCOUNT_NAME
490 +#define MCOUNT_NAME "mcount"
491 +see rs6000/sysv4.h RS6000_MCOUNT
494 +/* The GLIBC version of mcount for the x86 assumes that there is a
495 + frame, so we cannot allow profiling without a frame pointer. */
497 +#undef SUBTARGET_FRAME_POINTER_REQUIRED
498 +#define SUBTARGET_FRAME_POINTER_REQUIRED crtl->profile
499 +seems to be handled by rs6000/rs6000.h
502 +#undef CPP_SPEC
503 +#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
505 +#undef CC1_SPEC
506 +#define CC1_SPEC "%(cc1_cpu) %{profile:-p}"
508 +/* Provide a LINK_SPEC appropriate for AROS. */
510 +#undef LINK_SPEC
511 +#define LINK_SPEC "-m elf32ppc -L %R/lib"
513 +/* A C statement (sans semicolon) to output to the stdio stream
514 + FILE the assembler definition of uninitialized global DECL named
515 + NAME whose size is SIZE bytes and alignment is ALIGN bytes.
516 + Try to use asm_output_aligned_bss to implement this macro. */
518 +#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
519 + asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
520 +see rs6000/sysv4.h
523 +/* A C statement to output to the stdio stream FILE an assembler
524 + command to advance the location counter to a multiple of 1<<LOG
525 + bytes if it is within MAX_SKIP bytes.
527 + This is used to align code labels according to Intel recommendations. */
529 +#ifdef HAVE_GAS_MAX_SKIP_P2ALIGN
530 +#define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE,LOG,MAX_SKIP) \
531 + do { \
532 + if ((LOG) != 0) { \
533 + if ((MAX_SKIP) == 0) fprintf ((FILE), "\t.p2align %d\n", (LOG)); \
534 + else fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)); \
535 + } \
536 + } while (0)
537 +#endif
538 +see rs6000/sysv4.h
541 +/* Handle special EH pointer encodings. Absolute, pc-relative, and
542 + indirect are handled automatically. */
544 +#define ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX(FILE, ENCODING, SIZE, ADDR, DONE) \
545 + do { \
546 + if ((SIZE) == 4 && ((ENCODING) & 0x70) == DW_EH_PE_datarel) \
547 + { \
548 + fputs (ASM_LONG, FILE); \
549 + assemble_name (FILE, XSTR (ADDR, 0)); \
550 + fputs (((ENCODING) & DW_EH_PE_indirect ? "@GOT" : "@GOTOFF"), FILE); \
551 + goto DONE; \
552 + } \
553 + } while (0)
554 +not used for PowerPC
557 +/* FIXME: AROS doesn't support dw2 unwinding yet. */
558 +#undef MD_FALLBACK_FRAME_STATE_FOR
559 diff -ruN gcc-4.6.2/gcc/config/rs6000/rs6000.c gcc-4.6.2.aros/gcc/config/rs6000/rs6000.c
560 --- gcc-4.6.2/gcc/config/rs6000/rs6000.c 2011-09-19 00:01:56.000000000 +0200
561 +++ gcc-4.6.2.aros/gcc/config/rs6000/rs6000.c 2012-04-14 16:50:17.996003545 +0200
562 @@ -1308,6 +1308,7 @@
563 { "altivec", 1, 1, false, true, false, rs6000_handle_altivec_attribute },
564 { "longcall", 0, 0, false, true, true, rs6000_handle_longcall_attribute },
565 { "shortcall", 0, 0, false, true, true, rs6000_handle_longcall_attribute },
566 + { "stackparm", 0, 0, false, true, true, rs6000_handle_longcall_attribute },
567 { "ms_struct", 0, 0, false, false, false, rs6000_handle_struct_attribute },
568 { "gcc_struct", 0, 0, false, false, false, rs6000_handle_struct_attribute },
569 #ifdef SUBTARGET_ATTRIBUTE_TABLE
570 @@ -8063,6 +8064,9 @@
571 && !lookup_attribute ("shortcall", TYPE_ATTRIBUTES (fntype))))
572 cum->call_cookie |= CALL_LONG;
574 + cum->stackparm = fntype && lookup_attribute("stackparm",
575 + TYPE_ATTRIBUTES(fntype));
577 if (TARGET_DEBUG_ARG)
579 fprintf (stderr, "\ninit_cumulative_args:");
580 @@ -9038,6 +9042,9 @@
581 return GEN_INT (cum->call_cookie);
584 + if (cum->stackparm)
585 + return NULL_RTX;
587 if (TARGET_MACHO && rs6000_darwin64_struct_check_p (mode, type))
589 rtx rslt = rs6000_darwin64_record_arg (cum, type, named, /*retval= */false);
590 @@ -9453,6 +9460,9 @@
591 int first_reg_offset;
592 alias_set_type set;
594 + if (cum->stackparm)
595 + return;
597 /* Skip the last named argument. */
598 next_cum = *cum;
599 rs6000_function_arg_advance_1 (&next_cum, mode, type, true, 0);
600 diff -ruN gcc-4.6.2/gcc/config/rs6000/rs6000.h gcc-4.6.2.aros/gcc/config/rs6000/rs6000.h
601 --- gcc-4.6.2/gcc/config/rs6000/rs6000.h 2011-07-27 20:17:15.000000000 +0200
602 +++ gcc-4.6.2.aros/gcc/config/rs6000/rs6000.h 2012-04-14 16:50:17.996003545 +0200
603 @@ -1563,6 +1563,7 @@
604 int nargs_prototype; /* # args left in the current prototype */
605 int prototype; /* Whether a prototype was defined */
606 int stdarg; /* Whether function is a stdarg function. */
607 + int stackparm; /* Whether function has all args on the stack */
608 int call_cookie; /* Do special things for this call */
609 int sysv_gregno; /* next available GP register */
610 int intoffset; /* running offset in struct (darwin64) */
611 diff -ruN gcc-4.6.2/gcc/config/t-aros gcc-4.6.2.aros/gcc/config/t-aros
612 --- gcc-4.6.2/gcc/config/t-aros 1970-01-01 01:00:00.000000000 +0100
613 +++ gcc-4.6.2.aros/gcc/config/t-aros 2012-04-14 16:50:17.996003545 +0200
614 @@ -0,0 +1,29 @@
615 +# In AROS, "/usr" is a four-letter word.
616 +# Must match STANDARD_INCLUDE_DIR in aros.h !
617 +NATIVE_SYSTEM_HEADER_DIR = /include
619 +# Don't add AROS target include path when compiling host compiler
620 +CPPFLAGS =
622 +# Copy AROS specific include replacement files
623 +LIBGCC_DEPS += stmp-aros-hrds
625 +EXTRA_AROS_HEADERS = aros/types/size_t.h aros/types/ptrdiff_t.h \
626 + aros/types/wchar_t.h aros/types/wint_t.h aros/types/null.h
628 +stmp-int-hdrs : | include/aros/types
630 +include/aros/types : $(addprefix $(srcdir)/ginclude/,$(EXTRA_AROS_HEADERS))
631 + -if [ -d include ] ; then true; else mkdir include; chmod a+rx include; fi
632 + -if [ -d include/aros/types ] ; \
633 + then true; \
634 + else \
635 + mkdir include/aros; chmod a+rx include/aros; \
636 + mkdir include/aros/types; chmod a+rx include/aros/types; \
637 + fi
638 + for file in $(EXTRA_AROS_HEADERS); do \
639 + $(STAMP) include/$$file; \
640 + rm -fr include/$$file; \
641 + cp $(srcdir)/ginclude/$$file include/$$file; \
642 + chmod a+r include/$$file; \
643 + done
644 diff -ruN gcc-4.6.2/gcc/config.build gcc-4.6.2.aros/gcc/config.build
645 --- gcc-4.6.2/gcc/config.build 2010-04-12 20:36:30.000000000 +0200
646 +++ gcc-4.6.2.aros/gcc/config.build 2012-04-14 16:50:17.996003545 +0200
647 @@ -124,6 +124,9 @@
648 # HP 9000 series 300
649 build_install_headers_dir=install-headers-cpio
651 + *-*-aros*)
652 + build_xm_file=xm-aros.h
653 + ;;
654 *-*-sysv*)
655 # All other System V variants.
656 build_install_headers_dir=install-headers-cpio
657 diff -ruN gcc-4.6.2/gcc/config.gcc gcc-4.6.2.aros/gcc/config.gcc
658 --- gcc-4.6.2/gcc/config.gcc 2011-07-22 18:44:50.000000000 +0200
659 +++ gcc-4.6.2.aros/gcc/config.gcc 2012-04-14 16:50:17.996003545 +0200
660 @@ -656,6 +656,14 @@
662 esac
664 +*-*-aros*)
665 + gas=yes
666 + gnu_ld=yes
667 + thread_file=single
668 + use_collect2=no
669 + xm_defines='STDC_HEADERS=1'
670 + ;;
672 *-*-openbsd*)
673 tmake_file="t-libc-ok t-openbsd t-libgcc-pic"
674 case ${enable_threads} in
675 @@ -793,6 +801,16 @@
676 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
677 extra_parts="crtinit.o crtfini.o"
679 +arm*-*-aros*)
680 + tm_file="dbxelf.h elfos.h arm/elf.h arm/bpabi.h aros.h arm/aros.h arm/aout.h arm/arm.h"
681 + tm_file="$tm_file ../../libgcc/config/arm/bpabi-lib.h"
682 + tmake_file="${tmake_file} arm/t-arm arm/t-arm-elf arm/t-arm-softfp arm/t-bpabi t-aros"
683 + xm_file="xm-aros.h"
684 + # The BPABI long long divmod functions return a 128-bit value in
685 + # registers r0-r3. Correctly modeling that requires the use of
686 + # TImode.
687 + need_64bit_hwint=yes
688 + ;;
689 arm-wrs-vxworks)
690 tm_file="elfos.h arm/elf.h arm/aout.h ${tm_file} vx-common.h vxworks.h arm/vxworks.h"
691 extra_options="${extra_options} arm/vxworks.opt"
692 @@ -1312,6 +1326,16 @@
693 esac
694 tmake_file="${tmake_file} i386/t-linux64 i386/t-crtstuff i386/t-crtpc i386/t-crtfm t-dfprules"
696 +i[34567]86-*-aros*)
697 + tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/i386elf.h aros.h i386/aros.h"
698 + xm_file=xm-aros.h
699 + tmake_file="${tmake_file} i386/t-i386elf t-aros"
700 + ;;
701 +x86_64-*-aros*)
702 + tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/i386elf.h i386/x86-64.h aros.h i386/aros64.h"
703 + tmake_file="${tmake_file} i386/t-i386elf t-aros"
704 + xm_file=xm-aros.h
705 + ;;
706 i[34567]86-pc-msdosdjgpp*)
707 xm_file=i386/xm-djgpp.h
708 tm_file="dbxcoff.h ${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/djgpp.h i386/djgpp-stdint.h"
709 @@ -1720,6 +1744,16 @@
710 extra_options="${extra_options} m68hc11/m68hc11.opt"
711 use_gcc_stdint=wrap
713 +m68k-*-aros*)
714 + default_m68k_cpu=68000
715 + default_cf_cpu=5206
716 + tm_file="${tm_file} m68k/m68k-none.h m68k/m68kelf.h dbxelf.h elfos.h newlib-stdint.h m68k/m68kemb.h m68k/m68020-elf.h"
717 + tm_file="${tm_file} aros.h"
718 + tm_defines="${tm_defines} MOTOROLA=1"
719 + tmake_file="m68k/t-floatlib m68k/t-m68kbare m68k/t-m68kelf"
720 + tmake_file="$tmake_file m68k/t-aros m68k/t-mlibs t-aros"
721 + extra_parts="crtbegin.o crtend.o"
722 + ;;
723 m68k-*-elf* | fido-*-elf*)
724 case ${target} in
725 fido-*-elf*)
726 @@ -2143,6 +2177,13 @@
727 extra_options="${extra_options} rs6000/sysv4.opt"
728 tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-rtems t-rtems rs6000/t-ppccomm"
730 +powerpc-*-aros*)
731 + tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h aros.h"
732 + extra_options="${extra_options} rs6000/sysv4.opt"
733 + tm_file="${tm_file} rs6000/aros.h"
734 + xm_file=xm-aros.h
735 + tmake_file="$tmake_file t-aros"
736 + ;;
737 powerpc-*-linux* | powerpc64-*-linux*)
738 tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h"
739 extra_options="${extra_options} rs6000/sysv4.opt"
740 diff -ruN gcc-4.6.2/gcc/config.host gcc-4.6.2.aros/gcc/config.host
741 --- gcc-4.6.2/gcc/config.host 2011-02-15 10:49:14.000000000 +0100
742 +++ gcc-4.6.2.aros/gcc/config.host 2012-04-14 16:50:17.996003545 +0200
743 @@ -277,4 +277,8 @@
744 out_host_hook_obj=host-hpux.o
745 host_xmake_file="${host_xmake_file} x-hpux"
747 + *-*-aros*)
748 + host_can_use_collect2=no
749 + host_xm_file=xm-aros.h
750 + ;;
751 esac
752 diff -ruN gcc-4.6.2/gcc/ginclude/aros/types/null.h gcc-4.6.2.aros/gcc/ginclude/aros/types/null.h
753 --- gcc-4.6.2/gcc/ginclude/aros/types/null.h 1970-01-01 01:00:00.000000000 +0100
754 +++ gcc-4.6.2.aros/gcc/ginclude/aros/types/null.h 2012-04-14 16:50:17.996003545 +0200
755 @@ -0,0 +1,3 @@
756 +/* Replace AROS' NULL definition with gcc's one */
757 +#define __need_NULL
758 +#include <stddef.h>
759 diff -ruN gcc-4.6.2/gcc/ginclude/aros/types/ptrdiff_t.h gcc-4.6.2.aros/gcc/ginclude/aros/types/ptrdiff_t.h
760 --- gcc-4.6.2/gcc/ginclude/aros/types/ptrdiff_t.h 1970-01-01 01:00:00.000000000 +0100
761 +++ gcc-4.6.2.aros/gcc/ginclude/aros/types/ptrdiff_t.h 2012-04-14 16:50:17.996003545 +0200
762 @@ -0,0 +1,3 @@
763 +/* Replace AROS' ptrdiff_t definition with gcc's one */
764 +#define __need_ptrdiff_t
765 +#include <stddef.h>
766 diff -ruN gcc-4.6.2/gcc/ginclude/aros/types/size_t.h gcc-4.6.2.aros/gcc/ginclude/aros/types/size_t.h
767 --- gcc-4.6.2/gcc/ginclude/aros/types/size_t.h 1970-01-01 01:00:00.000000000 +0100
768 +++ gcc-4.6.2.aros/gcc/ginclude/aros/types/size_t.h 2012-04-14 16:50:17.996003545 +0200
769 @@ -0,0 +1,3 @@
770 +/* Replace AROS' size_t definition with gcc's one */
771 +#define __need_size_t
772 +#include <stddef.h>
773 diff -ruN gcc-4.6.2/gcc/ginclude/aros/types/wchar_t.h gcc-4.6.2.aros/gcc/ginclude/aros/types/wchar_t.h
774 --- gcc-4.6.2/gcc/ginclude/aros/types/wchar_t.h 1970-01-01 01:00:00.000000000 +0100
775 +++ gcc-4.6.2.aros/gcc/ginclude/aros/types/wchar_t.h 2012-04-14 16:50:17.996003545 +0200
776 @@ -0,0 +1,3 @@
777 +/* Replace AROS' wchar_t definition with gcc's one */
778 +#define __need_wchar_t
779 +#include <stddef.h>
780 diff -ruN gcc-4.6.2/gcc/ginclude/aros/types/wint_t.h gcc-4.6.2.aros/gcc/ginclude/aros/types/wint_t.h
781 --- gcc-4.6.2/gcc/ginclude/aros/types/wint_t.h 1970-01-01 01:00:00.000000000 +0100
782 +++ gcc-4.6.2.aros/gcc/ginclude/aros/types/wint_t.h 2012-04-14 16:50:17.996003545 +0200
783 @@ -0,0 +1,3 @@
784 +/* Replace AROS' wint_t definition with gcc's one */
785 +#define __need_wint_t
786 +#include <stddef.h>
787 diff -ruN gcc-4.6.2/gcc/ginclude/stddef.h gcc-4.6.2.aros/gcc/ginclude/stddef.h
788 --- gcc-4.6.2/gcc/ginclude/stddef.h 2011-01-29 23:15:52.000000000 +0100
789 +++ gcc-4.6.2.aros/gcc/ginclude/stddef.h 2012-04-14 16:50:17.996003545 +0200
790 @@ -134,6 +134,7 @@
791 #ifndef __PTRDIFF_T
792 #ifndef _PTRDIFF_T_
793 #ifndef _BSD_PTRDIFF_T_
794 +#ifndef _AROS_TYPES_PTRDIFF_T_H
795 #ifndef ___int_ptrdiff_t_h
796 #ifndef _GCC_PTRDIFF_T
797 #define _PTRDIFF_T
798 @@ -142,6 +143,7 @@
799 #define __PTRDIFF_T
800 #define _PTRDIFF_T_
801 #define _BSD_PTRDIFF_T_
802 +#define _AROS_TYPES_PTRDIFF_T_H
803 #define ___int_ptrdiff_t_h
804 #define _GCC_PTRDIFF_T
805 #ifndef __PTRDIFF_TYPE__
806 @@ -150,6 +152,7 @@
807 typedef __PTRDIFF_TYPE__ ptrdiff_t;
808 #endif /* _GCC_PTRDIFF_T */
809 #endif /* ___int_ptrdiff_t_h */
810 +#endif /* _AROS_TYPES_PTRDIFF_T_H */
811 #endif /* _BSD_PTRDIFF_T_ */
812 #endif /* _PTRDIFF_T_ */
813 #endif /* __PTRDIFF_T */
814 @@ -176,6 +179,7 @@
815 #ifndef __SIZE_T
816 #ifndef _SIZE_T_
817 #ifndef _BSD_SIZE_T_
818 +#ifndef _AROS_TYPES_SIZE_T_H
819 #ifndef _SIZE_T_DEFINED_
820 #ifndef _SIZE_T_DEFINED
821 #ifndef _BSD_SIZE_T_DEFINED_ /* Darwin */
822 @@ -193,6 +197,7 @@
823 #define __SIZE_T
824 #define _SIZE_T_
825 #define _BSD_SIZE_T_
826 +#define _AROS_TYPES_SIZE_T_H
827 #define _SIZE_T_DEFINED_
828 #define _SIZE_T_DEFINED
829 #define _BSD_SIZE_T_DEFINED_ /* Darwin */
830 @@ -222,6 +227,7 @@
831 #endif /* _BSD_SIZE_T_DEFINED_ */
832 #endif /* _SIZE_T_DEFINED */
833 #endif /* _SIZE_T_DEFINED_ */
834 +#endif /* _AROS_TYPES_SIZE_T_H */
835 #endif /* _BSD_SIZE_T_ */
836 #endif /* _SIZE_T_ */
837 #endif /* __SIZE_T */
838 diff -ruN gcc-4.6.2/include/filenames.h gcc-4.6.2.aros/include/filenames.h
839 --- gcc-4.6.2/include/filenames.h 2011-02-28 19:23:25.000000000 +0100
840 +++ gcc-4.6.2.aros/include/filenames.h 2012-04-14 16:50:17.996003545 +0200
841 @@ -37,6 +37,10 @@
842 # define HAS_DRIVE_SPEC(f) HAS_DOS_DRIVE_SPEC (f)
843 # define IS_DIR_SEPARATOR(c) IS_DOS_DIR_SEPARATOR (c)
844 # define IS_ABSOLUTE_PATH(f) IS_DOS_ABSOLUTE_PATH (f)
845 +#elif defined __AROS__
846 +# define IS_DIR_SEPARATOR(c) ((c) == '/' || (c) == ':')
847 +# define IS_ABSOLUTE_PATH(f) (IS_DIR_SEPARATOR((f)[0]) || (strchr((f), ':')))
848 +# define HAVE_CASE_INSENSITIVE_FILE_SYSTEM
849 #else /* not DOSish */
850 # define HAS_DRIVE_SPEC(f) (0)
851 # define IS_DIR_SEPARATOR(c) IS_UNIX_DIR_SEPARATOR (c)
852 diff -ruN gcc-4.6.2/libgcc/config.host gcc-4.6.2.aros/libgcc/config.host
853 --- gcc-4.6.2/libgcc/config.host 2011-03-14 07:06:23.000000000 +0100
854 +++ gcc-4.6.2.aros/libgcc/config.host 2012-04-14 16:50:17.996003545 +0200
855 @@ -599,6 +599,8 @@
857 mep*-*-*)
859 +*-*-aros*)
860 + ;;
862 echo "*** Configuration ${host} not supported" 1>&2
863 exit 1
864 diff -ruN gcc-4.6.2/libiberty/filename_cmp.c gcc-4.6.2.aros/libiberty/filename_cmp.c
865 --- gcc-4.6.2/libiberty/filename_cmp.c 2011-02-28 19:23:25.000000000 +0100
866 +++ gcc-4.6.2.aros/libiberty/filename_cmp.c 2012-04-14 16:50:17.996003545 +0200
867 @@ -51,7 +51,11 @@
868 filename_cmp (const char *s1, const char *s2)
870 #ifndef HAVE_DOS_BASED_FILE_SYSTEM
871 +#ifdef HAVE_CASE_INSENSITIVE_FILE_SYSTEM
872 + return strcasecmp(s1, s2);
873 +#else
874 return strcmp(s1, s2);
875 +#endif
876 #else
877 for (;;)
879 diff -ruN gcc-4.6.2/libobjc/configure gcc-4.6.2.aros/libobjc/configure
880 --- gcc-4.6.2/libobjc/configure 2011-02-13 12:45:53.000000000 +0100
881 +++ gcc-4.6.2.aros/libobjc/configure 2012-04-14 16:50:17.996003545 +0200
882 @@ -11249,215 +11249,7 @@
886 -# Check if we have thread-local storage
889 - # Check whether --enable-tls was given.
890 -if test "${enable_tls+set}" = set; then :
891 - enableval=$enable_tls;
892 - case "$enableval" in
893 - yes|no) ;;
894 - *) as_fn_error "Argument to enable/disable tls must be yes or no" "$LINENO" 5 ;;
895 - esac
897 -else
898 - enable_tls=yes
902 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the target supports thread-local storage" >&5
903 -$as_echo_n "checking whether the target supports thread-local storage... " >&6; }
904 -if test "${gcc_cv_have_tls+set}" = set; then :
905 - $as_echo_n "(cached) " >&6
906 -else
908 - if test "$cross_compiling" = yes; then :
909 - if test x$gcc_no_link = xyes; then
910 - as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
912 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
913 -/* end confdefs.h. */
914 -__thread int a; int b; int main() { return a = b; }
915 -_ACEOF
916 -if ac_fn_c_try_link "$LINENO"; then :
917 - chktls_save_LDFLAGS="$LDFLAGS"
918 - case $host in
919 - *-*-linux*)
920 - LDFLAGS="-shared -Wl,--no-undefined $LDFLAGS"
921 - ;;
922 - esac
923 - chktls_save_CFLAGS="$CFLAGS"
924 - CFLAGS="-fPIC $CFLAGS"
925 - if test x$gcc_no_link = xyes; then
926 - as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
928 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
929 -/* end confdefs.h. */
930 -int f() { return 0; }
931 -_ACEOF
932 -if ac_fn_c_try_link "$LINENO"; then :
933 - if test x$gcc_no_link = xyes; then
934 - as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
936 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
937 -/* end confdefs.h. */
938 -__thread int a; int b; int f() { return a = b; }
939 -_ACEOF
940 -if ac_fn_c_try_link "$LINENO"; then :
941 - gcc_cv_have_tls=yes
942 -else
943 - gcc_cv_have_tls=no
945 -rm -f core conftest.err conftest.$ac_objext \
946 - conftest$ac_exeext conftest.$ac_ext
947 -else
948 - gcc_cv_have_tls=yes
950 -rm -f core conftest.err conftest.$ac_objext \
951 - conftest$ac_exeext conftest.$ac_ext
952 - CFLAGS="$chktls_save_CFLAGS"
953 - LDFLAGS="$chktls_save_LDFLAGS"
954 -else
955 - gcc_cv_have_tls=no
957 -rm -f core conftest.err conftest.$ac_objext \
958 - conftest$ac_exeext conftest.$ac_ext
961 -else
962 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext
963 -/* end confdefs.h. */
964 -__thread int a; int b; int main() { return a = b; }
965 -_ACEOF
966 -if ac_fn_c_try_run "$LINENO"; then :
967 - chktls_save_LDFLAGS="$LDFLAGS"
968 - LDFLAGS="-static $LDFLAGS"
969 - if test x$gcc_no_link = xyes; then
970 - as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
972 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
973 -/* end confdefs.h. */
974 -int main() { return 0; }
975 -_ACEOF
976 -if ac_fn_c_try_link "$LINENO"; then :
977 - if test "$cross_compiling" = yes; then :
978 - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
979 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
980 -as_fn_error "cannot run test program while cross compiling
981 -See \`config.log' for more details." "$LINENO" 5; }
982 -else
983 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext
984 -/* end confdefs.h. */
985 -__thread int a; int b; int main() { return a = b; }
986 -_ACEOF
987 -if ac_fn_c_try_run "$LINENO"; then :
988 - gcc_cv_have_tls=yes
989 -else
990 - gcc_cv_have_tls=no
992 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
993 - conftest.$ac_objext conftest.beam conftest.$ac_ext
996 -else
997 - gcc_cv_have_tls=yes
999 -rm -f core conftest.err conftest.$ac_objext \
1000 - conftest$ac_exeext conftest.$ac_ext
1001 - LDFLAGS="$chktls_save_LDFLAGS"
1002 - if test $gcc_cv_have_tls = yes; then
1003 - chktls_save_CFLAGS="$CFLAGS"
1004 - thread_CFLAGS=failed
1005 - for flag in '' '-pthread' '-lpthread'; do
1006 - CFLAGS="$flag $chktls_save_CFLAGS"
1007 - if test x$gcc_no_link = xyes; then
1008 - as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
1010 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1011 -/* end confdefs.h. */
1012 -#include <pthread.h>
1013 - void *g(void *d) { return NULL; }
1014 -int
1015 -main ()
1017 -pthread_t t; pthread_create(&t,NULL,g,NULL);
1019 - return 0;
1021 -_ACEOF
1022 -if ac_fn_c_try_link "$LINENO"; then :
1023 - thread_CFLAGS="$flag"
1025 -rm -f core conftest.err conftest.$ac_objext \
1026 - conftest$ac_exeext conftest.$ac_ext
1027 - if test "X$thread_CFLAGS" != Xfailed; then
1028 - break
1029 - fi
1030 - done
1031 - CFLAGS="$chktls_save_CFLAGS"
1032 - if test "X$thread_CFLAGS" != Xfailed; then
1033 - CFLAGS="$thread_CFLAGS $chktls_save_CFLAGS"
1034 - if test "$cross_compiling" = yes; then :
1035 - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
1036 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1037 -as_fn_error "cannot run test program while cross compiling
1038 -See \`config.log' for more details." "$LINENO" 5; }
1039 -else
1040 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1041 -/* end confdefs.h. */
1042 -#include <pthread.h>
1043 - __thread int a;
1044 - static int *volatile a_in_other_thread;
1045 - static void *
1046 - thread_func (void *arg)
1048 - a_in_other_thread = &a;
1049 - return (void *)0;
1051 -int
1052 -main ()
1054 -pthread_t thread;
1055 - void *thread_retval;
1056 - int *volatile a_in_main_thread;
1057 - a_in_main_thread = &a;
1058 - if (pthread_create (&thread, (pthread_attr_t *)0,
1059 - thread_func, (void *)0))
1060 - return 0;
1061 - if (pthread_join (thread, &thread_retval))
1062 - return 0;
1063 - return (a_in_other_thread == a_in_main_thread);
1065 - return 0;
1067 -_ACEOF
1068 -if ac_fn_c_try_run "$LINENO"; then :
1069 - gcc_cv_have_tls=yes
1070 -else
1071 - gcc_cv_have_tls=no
1073 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
1074 - conftest.$ac_objext conftest.beam conftest.$ac_ext
1077 - CFLAGS="$chktls_save_CFLAGS"
1078 - fi
1079 - fi
1080 -else
1081 - gcc_cv_have_tls=no
1083 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
1084 - conftest.$ac_objext conftest.beam conftest.$ac_ext
1088 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_have_tls" >&5
1089 -$as_echo "$gcc_cv_have_tls" >&6; }
1090 - if test "$enable_tls $gcc_cv_have_tls" = "yes yes"; then
1092 -$as_echo "#define HAVE_TLS 1" >>confdefs.h
1094 - fi
1095 +#dnl GCC_ENABLE_TLS
1097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for exception model to use" >&5
1098 $as_echo_n "checking for exception model to use... " >&6; }
1099 diff -ruN gcc-4.6.2/libobjc/configure.ac gcc-4.6.2.aros/libobjc/configure.ac
1100 --- gcc-4.6.2/libobjc/configure.ac 2010-12-06 01:50:04.000000000 +0100
1101 +++ gcc-4.6.2.aros/libobjc/configure.ac 2012-04-14 16:50:17.996003545 +0200
1102 @@ -217,7 +217,7 @@
1105 # Check if we have thread-local storage
1106 -GCC_CHECK_TLS
1107 +dnl GCC_CHECK_TLS
1109 AC_MSG_CHECKING([for exception model to use])
1110 AC_LANG_PUSH(C)
1111 diff -ruN gcc-4.6.2/libstdc++-v3/config/os/aros/ctype_base.h gcc-4.6.2.aros/libstdc++-v3/config/os/aros/ctype_base.h
1112 --- gcc-4.6.2/libstdc++-v3/config/os/aros/ctype_base.h 1970-01-01 01:00:00.000000000 +0100
1113 +++ gcc-4.6.2.aros/libstdc++-v3/config/os/aros/ctype_base.h 2012-04-14 16:50:17.996003545 +0200
1114 @@ -0,0 +1,27 @@
1115 +namespace std _GLIBCXX_VISIBILITY(default)
1117 +_GLIBCXX_BEGIN_NAMESPACE_VERSION
1119 +struct ctype_base {
1120 + /* Non-standard typedefs */
1121 + typedef int * __to_type;
1123 + /* NB: Offsets into ctype<char>::_M_table force a particular size
1124 + on the mask type. Because of this, we don't use an enum. */
1125 + typedef unsigned short int mask;
1127 + static const mask upper = _ISupper;
1128 + static const mask lower = _ISlower;
1129 + static const mask alpha = _ISalpha;
1130 + static const mask digit = _ISdigit;
1131 + static const mask xdigit = _ISxdigit;
1132 + static const mask space = _ISspace;
1133 + static const mask print = _ISprint;
1134 + static const mask graph = _ISgraph;
1135 + static const mask cntrl = _IScntrl;
1136 + static const mask punct = _ISpunct;
1137 + static const mask alnum = _ISalnum;
1140 +_GLIBCXX_END_NAMESPACE_VERSION
1141 +} // namespace
1142 diff -ruN gcc-4.6.2/libstdc++-v3/config/os/aros/ctype_inline.h gcc-4.6.2.aros/libstdc++-v3/config/os/aros/ctype_inline.h
1143 --- gcc-4.6.2/libstdc++-v3/config/os/aros/ctype_inline.h 1970-01-01 01:00:00.000000000 +0100
1144 +++ gcc-4.6.2.aros/libstdc++-v3/config/os/aros/ctype_inline.h 2012-04-14 16:50:17.996003545 +0200
1145 @@ -0,0 +1,173 @@
1146 +// Locale support -*- C++ -*-
1148 +// Copyright (C) 2000, 2003 Free Software Foundation, Inc.
1150 +// This file is part of the GNU ISO C++ Library. This library is free
1151 +// software; you can redistribute it and/or modify it under the
1152 +// terms of the GNU General Public License as published by the
1153 +// Free Software Foundation; either version 2, or (at your option)
1154 +// any later version.
1156 +// This library is distributed in the hope that it will be useful,
1157 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
1158 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1159 +// GNU General Public License for more details.
1161 +// You should have received a copy of the GNU General Public License along
1162 +// with this library; see the file COPYING. If not, write to the Free
1163 +// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
1164 +// USA.
1166 +// As a special exception, you may use this file as part of a free software
1167 +// library without restriction. Specifically, if other files instantiate
1168 +// templates or use macros or inline functions from this file, or you compile
1169 +// this file and link it with other files to produce an executable, this
1170 +// file does not by itself cause the resulting executable to be covered by
1171 +// the GNU General Public License. This exception does not however
1172 +// invalidate any other reasons why the executable file might be covered by
1173 +// the GNU General Public License.
1175 +/** @file ctype_inline.h
1176 + * This is an internal header file, included by other library headers.
1177 + * You should not attempt to use it directly.
1178 + */
1181 +// ISO C++ 14882: 22.1 Locales
1184 +// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*)
1185 +// functions go in ctype.cc
1187 +// The following definitions are portable, but insanely slow. If one
1188 +// cares at all about performance, then specialized ctype
1189 +// functionality should be added for the native os in question: see
1190 +// the config/os/bits/ctype_*.h files.
1192 +// Constructing a synthetic "C" table should be seriously considered...
1194 +namespace std _GLIBCXX_VISIBILITY(default)
1196 +_GLIBCXX_BEGIN_NAMESPACE_VERSION
1198 + bool
1199 + ctype<char>::
1200 + is(mask __m, char __c) const
1201 + {
1202 + if (_M_table)
1203 + return _M_table[static_cast<unsigned char>(__c)] & __m;
1204 + else
1206 + bool __ret = false;
1207 + const size_t __bitmasksize = 15;
1208 + size_t __bitcur = 0; // Lowest bitmask in ctype_base == 0
1209 + for (; __bitcur <= __bitmasksize; ++__bitcur)
1211 + const mask __bit = static_cast<mask>(1 << __bitcur);
1212 + if (__m & __bit)
1214 + bool __testis;
1215 + switch (__bit)
1217 + case space:
1218 + __testis = isspace(__c);
1219 + break;
1220 + case print:
1221 + __testis = isprint(__c);
1222 + break;
1223 + case cntrl:
1224 + __testis = iscntrl(__c);
1225 + break;
1226 + case upper:
1227 + __testis = isupper(__c);
1228 + break;
1229 + case lower:
1230 + __testis = islower(__c);
1231 + break;
1232 + case alpha:
1233 + __testis = isalpha(__c);
1234 + break;
1235 + case digit:
1236 + __testis = isdigit(__c);
1237 + break;
1238 + case punct:
1239 + __testis = ispunct(__c);
1240 + break;
1241 + case xdigit:
1242 + __testis = isxdigit(__c);
1243 + break;
1244 + case alnum:
1245 + __testis = isalnum(__c);
1246 + break;
1247 + case graph:
1248 + __testis = isgraph(__c);
1249 + break;
1250 + default:
1251 + __testis = false;
1252 + break;
1254 + __ret |= __testis;
1257 + return __ret;
1261 + const char*
1262 + ctype<char>::
1263 + is(const char* __low, const char* __high, mask* __vec) const
1265 + if (_M_table)
1266 + while (__low < __high)
1267 + *__vec++ = _M_table[static_cast<unsigned char>(*__low++)];
1268 + else
1270 + // Highest bitmask in ctype_base == 10.
1271 + const size_t __bitmasksize = 15;
1272 + for (;__low < __high; ++__vec, ++__low)
1274 + mask __m = 0;
1275 + // Lowest bitmask in ctype_base == 0
1276 + size_t __i = 0;
1277 + for (;__i <= __bitmasksize; ++__i)
1279 + const mask __bit = static_cast<mask>(1 << __i);
1280 + if (this->is(__bit, *__low))
1281 + __m |= __bit;
1283 + *__vec = __m;
1286 + return __high;
1289 + const char*
1290 + ctype<char>::
1291 + scan_is(mask __m, const char* __low, const char* __high) const
1293 + if (_M_table)
1294 + while (__low < __high
1295 + && !(_M_table[static_cast<unsigned char>(*__low)] & __m))
1296 + ++__low;
1297 + else
1298 + while (__low < __high && !this->is(__m, *__low))
1299 + ++__low;
1300 + return __low;
1303 + const char*
1304 + ctype<char>::
1305 + scan_not(mask __m, const char* __low, const char* __high) const
1307 + if (_M_table)
1308 + while (__low < __high
1309 + && (_M_table[static_cast<unsigned char>(*__low)] & __m) != 0)
1310 + ++__low;
1311 + else
1312 + while (__low < __high && this->is(__m, *__low) != 0)
1313 + ++__low;
1314 + return __low;
1317 +_GLIBCXX_END_NAMESPACE_VERSION
1318 +} // namespace
1319 diff -ruN gcc-4.6.2/libstdc++-v3/config/os/aros/ctype_noninline.h gcc-4.6.2.aros/libstdc++-v3/config/os/aros/ctype_noninline.h
1320 --- gcc-4.6.2/libstdc++-v3/config/os/aros/ctype_noninline.h 1970-01-01 01:00:00.000000000 +0100
1321 +++ gcc-4.6.2.aros/libstdc++-v3/config/os/aros/ctype_noninline.h 2012-04-14 16:50:17.996003545 +0200
1322 @@ -0,0 +1,56 @@
1323 + const ctype_base::mask*
1324 + ctype<char>::classic_table() throw()
1325 + { return __ctype_b; }
1327 + ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
1328 + size_t __refs)
1329 + : facet(__refs), _M_del(__table != 0 && __del),
1330 + _M_toupper(NULL), _M_tolower(NULL),
1331 + _M_table(__table ? __table : classic_table())
1332 + {
1333 + memset(_M_widen, 0, sizeof(_M_widen));
1334 + _M_widen_ok = 0;
1335 + memset(_M_narrow, 0, sizeof(_M_narrow));
1336 + _M_narrow_ok = 0;
1339 + ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
1340 + : facet(__refs), _M_del(__table != 0 && __del),
1341 + _M_toupper(NULL), _M_tolower(NULL),
1342 + _M_table(__table ? __table : classic_table())
1343 + {
1344 + memset(_M_widen, 0, sizeof(_M_widen));
1345 + _M_widen_ok = 0;
1346 + memset(_M_narrow, 0, sizeof(_M_narrow));
1347 + _M_narrow_ok = 0;
1350 + char
1351 + ctype<char>::do_toupper(char __c) const
1352 + { return ::toupper((int) __c); }
1354 + const char*
1355 + ctype<char>::do_toupper(char* __low, const char* __high) const
1357 + while (__low < __high)
1359 + *__low = ::toupper((int) *__low);
1360 + ++__low;
1362 + return __high;
1365 + char
1366 + ctype<char>::do_tolower(char __c) const
1367 + { return ::tolower((int) __c); }
1369 + const char*
1370 + ctype<char>::do_tolower(char* __low, const char* __high) const
1372 + while (__low < __high)
1374 + *__low = ::tolower((int) *__low);
1375 + ++__low;
1377 + return __high;
1379 diff -ruN gcc-4.6.2/libstdc++-v3/config/os/aros/os_defines.h gcc-4.6.2.aros/libstdc++-v3/config/os/aros/os_defines.h
1380 --- gcc-4.6.2/libstdc++-v3/config/os/aros/os_defines.h 1970-01-01 01:00:00.000000000 +0100
1381 +++ gcc-4.6.2.aros/libstdc++-v3/config/os/aros/os_defines.h 2012-04-14 16:50:17.996003545 +0200
1382 @@ -0,0 +1,6 @@
1383 +#ifndef _GLIBCXX_OS_DEFINES
1384 +#define _GLIBCXX_OS_DEFINES
1386 +#define __off64_t off_t
1388 +#endif
1389 diff -ruN gcc-4.6.2/libstdc++-v3/configure gcc-4.6.2.aros/libstdc++-v3/configure
1390 --- gcc-4.6.2/libstdc++-v3/configure 2011-10-06 01:09:51.000000000 +0200
1391 +++ gcc-4.6.2.aros/libstdc++-v3/configure 2012-04-14 16:50:17.996003545 +0200
1392 @@ -5267,12 +5267,9 @@
1396 -if test "x${with_newlib}" != "xyes"; then
1397 - enable_dlopen=yes
1402 +#if test "x${with_newlib}" != "xyes"; then
1403 +# AC_LIBTOOL_DLOPEN
1404 +#fi
1405 case `pwd` in
1406 *\ * | *\ *)
1407 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
1408 @@ -7990,6 +7987,8 @@
1412 + enable_dlopen=no
1415 enable_win32_dll=no
1417 @@ -26484,6 +26483,58 @@
1419 # Base decisions on target environment.
1420 case "${host}" in
1421 + *-aros*)
1422 + for ac_header in nan.h ieeefp.h endian.h sys/isa_defs.h machine/endian.h \
1423 + machine/param.h sys/machine.h sys/types.h fp.h locale.h float.h inttypes.h
1424 +do :
1425 + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
1426 +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
1427 +eval as_val=\$$as_ac_Header
1428 + if test "x$as_val" = x""yes; then :
1429 + cat >>confdefs.h <<_ACEOF
1430 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
1431 +_ACEOF
1435 +done
1438 + GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
1439 + GLIBCXX_CHECK_WCHAR_T_SUPPORT
1441 + $as_echo "#define HAVE_FINITE 1" >>confdefs.h
1443 + $as_echo "#define HAVE_FINITEF 1" >>confdefs.h
1445 + $as_echo "#define HAVE_FREXPF 1" >>confdefs.h
1447 + $as_echo "#define HAVE_HYPOTF 1" >>confdefs.h
1449 + $as_echo "#define HAVE_ISINF 1" >>confdefs.h
1451 + $as_echo "#define HAVE_ISINFF 1" >>confdefs.h
1453 + $as_echo "#define HAVE_ISNAN 1" >>confdefs.h
1455 + $as_echo "#define HAVE_ISNANF 1" >>confdefs.h
1457 + $as_echo "#define HAVE_SINCOS 1" >>confdefs.h
1459 + $as_echo "#define HAVE_SINCOSF 1" >>confdefs.h
1461 + if test x"long_double_math_on_this_cpu" = x"yes"; then
1462 + $as_echo "#define HAVE_FINITEL 1" >>confdefs.h
1464 + $as_echo "#define HAVE_HYPOTL 1" >>confdefs.h
1466 + $as_echo "#define HAVE_ISINFL 1" >>confdefs.h
1468 + $as_echo "#define HAVE_ISNANL 1" >>confdefs.h
1470 + fi
1471 + ;;
1473 arm*-*-symbianelf*)
1474 # This is a freestanding configuration; there is nothing to do here.
1476 diff -ruN gcc-4.6.2/libstdc++-v3/configure.ac gcc-4.6.2.aros/libstdc++-v3/configure.ac
1477 --- gcc-4.6.2/libstdc++-v3/configure.ac 2011-10-06 01:09:51.000000000 +0200
1478 +++ gcc-4.6.2.aros/libstdc++-v3/configure.ac 2012-04-14 16:50:17.996003545 +0200
1479 @@ -88,9 +88,9 @@
1480 # up critical shell variables.
1481 GLIBCXX_CONFIGURE
1483 -if test "x${with_newlib}" != "xyes"; then
1484 - AC_LIBTOOL_DLOPEN
1486 +#if test "x${with_newlib}" != "xyes"; then
1487 +# AC_LIBTOOL_DLOPEN
1488 +#fi
1489 AM_PROG_LIBTOOL
1490 ACX_LT_HOST_FLAGS
1491 AC_SUBST(enable_shared)
1492 diff -ruN gcc-4.6.2/libstdc++-v3/configure.host gcc-4.6.2.aros/libstdc++-v3/configure.host
1493 --- gcc-4.6.2/libstdc++-v3/configure.host 2010-12-06 01:50:04.000000000 +0100
1494 +++ gcc-4.6.2.aros/libstdc++-v3/configure.host 2012-04-14 16:50:17.996003545 +0200
1495 @@ -203,6 +203,9 @@
1496 os_include_dir="os/generic"
1497 atomicity_dir="cpu/generic"
1499 + aros*)
1500 + os_include_dir="os/aros"
1501 + ;;
1502 bsd*)
1503 # Plain BSD attempts to share FreeBSD files.
1504 os_include_dir="os/bsd/freebsd"
1505 diff -ruN gcc-4.6.2/libstdc++-v3/crossconfig.m4 gcc-4.6.2.aros/libstdc++-v3/crossconfig.m4
1506 --- gcc-4.6.2/libstdc++-v3/crossconfig.m4 2011-02-04 08:26:57.000000000 +0100
1507 +++ gcc-4.6.2.aros/libstdc++-v3/crossconfig.m4 2012-04-14 16:50:17.996003545 +0200
1508 @@ -5,6 +5,31 @@
1509 AC_DEFUN([GLIBCXX_CROSSCONFIG],[
1510 # Base decisions on target environment.
1511 case "${host}" in
1512 + *-aros*)
1513 + AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h machine/endian.h \
1514 + machine/param.h sys/machine.h sys/types.h fp.h locale.h float.h inttypes.h])
1516 + GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
1517 + GLIBCXX_CHECK_WCHAR_T_SUPPORT
1519 + AC_DEFINE(HAVE_FINITE)
1520 + AC_DEFINE(HAVE_FINITEF)
1521 + AC_DEFINE(HAVE_FREXPF)
1522 + AC_DEFINE(HAVE_HYPOTF)
1523 + AC_DEFINE(HAVE_ISINF)
1524 + AC_DEFINE(HAVE_ISINFF)
1525 + AC_DEFINE(HAVE_ISNAN)
1526 + AC_DEFINE(HAVE_ISNANF)
1527 + AC_DEFINE(HAVE_SINCOS)
1528 + AC_DEFINE(HAVE_SINCOSF)
1529 + if test x"long_double_math_on_this_cpu" = x"yes"; then
1530 + AC_DEFINE(HAVE_FINITEL)
1531 + AC_DEFINE(HAVE_HYPOTL)
1532 + AC_DEFINE(HAVE_ISINFL)
1533 + AC_DEFINE(HAVE_ISNANL)
1534 + fi
1535 + ;;
1537 arm*-*-symbianelf*)
1538 # This is a freestanding configuration; there is nothing to do here.
1540 diff -ruN gcc-4.6.2/libcpp/configure gcc-4.6.2.aros/libcpp/configure
1541 --- gcc-4.6.2/libcpp/configure 2011-10-26 11:30:24.000000000 +0200
1542 +++ gcc-4.6.2.aros/libcpp/configure 2012-07-04 18:36:53.274313088 +0200
1543 @@ -7091,6 +7091,7 @@
1544 alpha*-*-* | \
1545 arm*-*-*eabi* | \
1546 arm*-*-symbianelf* | \
1547 + arm*-*-aros | \
1548 x86_64-*-* | \
1549 ia64-*-* | \
1550 hppa*64*-*-* | \
1551 diff -ruN gcc-4.6.2/libcpp/configure.ac gcc-4.6.2.aros/libcpp/configure.ac
1552 --- gcc-4.6.2/libcpp/configure.ac 2010-11-18 08:35:34.000000000 +0100
1553 +++ gcc-4.6.2.aros/libcpp/configure.ac 2012-07-04 18:37:11.315102148 +0200
1554 @@ -141,6 +141,7 @@
1555 alpha*-*-* | \
1556 arm*-*-*eabi* | \
1557 arm*-*-symbianelf* | \
1558 + arm*-*-aros | \
1559 x86_64-*-* | \
1560 ia64-*-* | \
1561 hppa*64*-*-* | \
1562 diff -ruN gcc-4.6.2/gcc/config/m68k/t-aros gcc-4.6.2.aros/gcc/config/m68k/t-aros
1563 --- /dev/null
1564 +++ gcc-4.6.2.aros/gcc/config/m68k/t-aros
1565 @@ -0,0 +1,2 @@
1566 +# Custom multilibs for AROS
1567 +M68K_MLIB_CPU += && match(MLIB, "^68")
1568 diff -ruN gcc-4.6.2/gcc/gengtype.c gcc-4.6.2.aros/gcc/gengtype.c
1569 --- gcc-4.6.2/gcc/gengtype.c 2011-06-27 22:54:59.000000000 +0200
1570 +++ gcc-4.6.2.aros/gcc/gengtype.c 2012-11-28 16:50:17.996003545 +0200
1571 @@ -3594,13 +3594,13 @@ write_field_root (outf_p f, pair_p v, type_p type, const char *name,
1572 int has_length, struct fileloc *line, const char *if_marked,
1573 bool emit_pch, type_p field_type, const char *field_name)
1575 + struct pair newv;
1576 /* If the field reference is relative to V, rather than to some
1577 subcomponent of V, we can mark any subarrays with a single stride.
1578 We're effectively treating the field as a global variable in its
1579 own right. */
1580 if (v && type == v->type)
1582 - struct pair newv;
1584 newv = *v;
1585 newv.type = field_type;