oops .. forgot to offset from objects bounds
[AROS.git] / tools / crosstools / gcc-4.6.2-aros.diff
blobeb50ef3a72c684f42e34004e58e0325f607ce61b
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 2013-08-26 07:55:42.000000000 +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 2013-08-26 07:55:42.000000000 +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 2013-08-26 07:55:42.000000000 +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 2013-08-26 07:55:42.000000000 +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 2013-08-26 07:55:42.000000000 +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_aros"
133 +#else
134 +#define TARGET_LINKER_EMULATION "armelf_aros"
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_aros -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/arm/t-aros gcc-4.6.2.aros/gcc/config/arm/t-aros
151 --- gcc-4.6.2/gcc/config/arm/t-aros 1970-01-01 01:00:00.000000000 +0100
152 +++ gcc-4.6.2.aros/gcc/config/arm/t-aros 2013-08-26 11:26:23.000000000 +0200
153 @@ -0,0 +1,21 @@
154 +# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
155 +# 2008, 2010 Free Software Foundation, Inc.
157 +# This file is part of GCC.
159 +# GCC is free software; you can redistribute it and/or modify
160 +# it under the terms of the GNU General Public License as published by
161 +# the Free Software Foundation; either version 3, or (at your option)
162 +# any later version.
164 +# GCC is distributed in the hope that it will be useful,
165 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
166 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
167 +# GNU General Public License for more details.
169 +# You should have received a copy of the GNU General Public License
170 +# along with GCC; see the file COPYING3. If not see
171 +# <http://www.gnu.org/licenses/>.
173 +MULTILIB_OPTIONS = marm mfloat-abi=hard
174 +MULTILIB_DIRNAMES = arm fpu
175 diff -ruN gcc-4.6.2/gcc/config/arm/unwind-arm.c gcc-4.6.2.aros/gcc/config/arm/unwind-arm.c
176 --- gcc-4.6.2/gcc/config/arm/unwind-arm.c 2009-10-30 15:55:10.000000000 +0100
177 +++ gcc-4.6.2.aros/gcc/config/arm/unwind-arm.c 2013-08-26 07:55:42.000000000 +0200
178 @@ -40,8 +40,10 @@
179 bool is_reference,
180 void **matched_object);
182 +#if !defined(__AROS__)
183 _Unwind_Ptr __attribute__((weak))
184 __gnu_Unwind_Find_exidx (_Unwind_Ptr, int *);
185 +#endif
187 /* Misc constants. */
188 #define R_IP 12
189 @@ -598,6 +600,7 @@
190 instruction itself. */
191 return_address -= 2;
193 +#if !defined(__AROS__)
194 if (__gnu_Unwind_Find_exidx)
196 eitp = (const __EIT_entry *) __gnu_Unwind_Find_exidx (return_address,
197 @@ -609,6 +612,7 @@
200 else
201 +#endif
203 eitp = &__exidx_start;
204 nrec = &__exidx_end - &__exidx_start;
205 diff -ruN gcc-4.6.2/gcc/config/aros.h gcc-4.6.2.aros/gcc/config/aros.h
206 --- gcc-4.6.2/gcc/config/aros.h 1970-01-01 01:00:00.000000000 +0100
207 +++ gcc-4.6.2.aros/gcc/config/aros.h 2013-08-26 07:55:42.000000000 +0200
208 @@ -0,0 +1,100 @@
209 +/* Definitions for AROS
210 + Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
211 + Contributed by Fabio Alemagna
212 + Based upon linux.h, contributed by Eric Youngdale.
214 +This file is part of GNU CC.
216 +GNU CC is free software; you can redistribute it and/or modify
217 +it under the terms of the GNU General Public License as published by
218 +the Free Software Foundation; either version 2, or (at your option)
219 +any later version.
221 +GNU CC is distributed in the hope that it will be useful,
222 +but WITHOUT ANY WARRANTY; without even the implied warranty of
223 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
224 +GNU General Public License for more details.
226 +You should have received a copy of the GNU General Public License
227 +along with GNU CC; see the file COPYING. If not, write to
228 +the Free Software Foundation, 59 Temple Place - Suite 330,
229 +Boston, MA 02111-1307, USA. */
231 +/* Don't assume anything about the header files. */
232 +#define NO_IMPLICIT_EXTERN_C
234 +#undef SIZE_TYPE
235 +#define SIZE_TYPE "long unsigned int"
237 +#undef WCHAR_TYPE
238 +#define WCHAR_TYPE "char"
240 +#undef WCHAR_TYPE_SIZE
241 +#define WCHAR_TYPE_SIZE 8
243 +#undef PTRDIFF_TYPE
244 +#define PTRDIFF_TYPE "long int"
246 +#undef TARGET_OS_CPP_BUILTINS
247 +#define TARGET_OS_CPP_BUILTINS() \
248 + do \
249 + { \
250 + builtin_define_std ("AROS"); \
251 + builtin_define ("AMIGA"); \
252 + builtin_define ("_AMIGA"); \
253 + builtin_define ("__ELF__"); \
254 + builtin_assert ("system=posix"); \
255 + } \
256 + while (0)
258 +#undef ASM_APP_ON
259 +#define ASM_APP_ON "#APP\n"
261 +#undef ASM_APP_OFF
262 +#define ASM_APP_OFF "#NO_APP\n"
264 +#undef MD_EXEC_PREFIX
265 +#undef MD_STARTFILE_PREFIX
267 +/* Provide a STARTFILE_SPEC appropriate for AROS. AROS has its own
268 + set of startup files which also take care of handling C++
269 + constructors/destructors. */
271 +#undef STARTFILE_SPEC
272 +#define STARTFILE_SPEC \
273 + "%{detach:detach.o%s} startup.o%s %{nix:nixmain.o%s}"
275 +/* Provide a ENDFILE_SPEC appropriate for AROS. */
277 +#undef ENDFILE_SPEC
278 +#define ENDFILE_SPEC \
279 + "-lautoinit"
281 +#undef STANDARD_INCLUDE_DIR
282 +#define STANDARD_INCLUDE_DIR "/include"
284 +#undef LOCAL_INCLUDE_DIR
285 +#define LOCAL_INCLUDE_DIR "/local/include"
287 +/* This is for -profile to use -lc_p instead of -lc. */
288 +#ifndef CC1_SPEC
289 +#define CC1_SPEC "%{profile:-p}"
290 +#endif
292 +/* The GNU C++ standard library requires that these macros be defined. */
293 +#undef CPLUSPLUS_CPP_SPEC
294 +#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
296 +#undef LIB_SPEC
297 +#define LIB_SPEC \
298 + "-lmui -larossupport -lamiga -larosc%{noarosc:.static} -lm -lcodesets -lkeymap -lexpansion -lcommodities -ldiskfont -lasl -lmuimaster -ldatatypes -lcybergraphics -lworkbench -licon -lintuition -lgadtools -llayers -laros -lpartition -liffparse -lgraphics -llocale -ldos -lutility -loop %{!nosysbase:-lexec} -lautoinit -llibinit -lautoinit"
300 +#if !defined(USE_GNULIBC_1) && defined(HAVE_LD_EH_FRAME_HDR)
301 +#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
302 +#endif
304 +/* AROS uses its own collect-like program for the moment. */
305 +#undef LINKER_NAME
306 +#define LINKER_NAME "collect-aros"
308 +#define TARGET_HAS_F_SETLKW
309 diff -ruN gcc-4.6.2/gcc/config/i386/aros64.h gcc-4.6.2.aros/gcc/config/i386/aros64.h
310 --- gcc-4.6.2/gcc/config/i386/aros64.h 1970-01-01 01:00:00.000000000 +0100
311 +++ gcc-4.6.2.aros/gcc/config/i386/aros64.h 2013-08-26 07:55:42.000000000 +0200
312 @@ -0,0 +1,43 @@
313 +/* Definitions for AMD x86_64 running AROS systems with ELF64 format.
314 + Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002
315 + Free Software Foundation, Inc.
316 + Contributed by Stanislaw Szymczyk <sszymczy@gmail.com>. Based on aros.h.
318 +This file is part of GNU CC.
320 +GNU CC is free software; you can redistribute it and/or modify
321 +it under the terms of the GNU General Public License as published by
322 +the Free Software Foundation; either version 2, or (at your option)
323 +any later version.
325 +GNU CC is distributed in the hope that it will be useful,
326 +but WITHOUT ANY WARRANTY; without even the implied warranty of
327 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
328 +GNU General Public License for more details.
330 +You should have received a copy of the GNU General Public License
331 +along with GNU CC; see the file COPYING. If not, write to
332 +the Free Software Foundation, 59 Temple Place - Suite 330,
333 +Boston, MA 02111-1307, USA. */
335 +/* Output at beginning of assembler file. */
336 +/* The .file command should always begin the output. */
338 +#undef TARGET_VERSION
339 +#define TARGET_VERSION fprintf (stderr, " (x86_64 AROS/ELF)");
341 +#undef CPP_SPEC
342 +#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
344 +/* The svr4 ABI for the i386 says that records and unions are returned
345 + in memory. In the 64bit compilation we will turn this flag off in
346 + override_options, as we never do pcc_struct_return scheme on this target. */
347 +#undef DEFAULT_PCC_STRUCT_RETURN
348 +#define DEFAULT_PCC_STRUCT_RETURN 1
350 +/* Provide a LINK_SPEC appropriate for AROS. */
352 +#undef LINK_SPEC
353 +#define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} -L %R/lib"
355 +/* FIXME: AROS doesn't support dw2 unwinding yet. */
356 diff -ruN gcc-4.6.2/gcc/config/i386/aros.h gcc-4.6.2.aros/gcc/config/i386/aros.h
357 --- gcc-4.6.2/gcc/config/i386/aros.h 1970-01-01 01:00:00.000000000 +0100
358 +++ gcc-4.6.2.aros/gcc/config/i386/aros.h 2013-08-26 07:55:42.000000000 +0200
359 @@ -0,0 +1,28 @@
360 +/* Definitions for Intel 386 running AROS systems with ELF format.
361 + Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002
362 + Free Software Foundation, Inc.
363 + Contributed by Fabio Alemagna.
364 + Based upon i386/linux.h by Eric Youngdale.
366 +This file is part of GNU CC.
368 +GNU CC is free software; you can redistribute it and/or modify
369 +it under the terms of the GNU General Public License as published by
370 +the Free Software Foundation; either version 2, or (at your option)
371 +any later version.
373 +GNU CC is distributed in the hope that it will be useful,
374 +but WITHOUT ANY WARRANTY; without even the implied warranty of
375 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
376 +GNU General Public License for more details.
378 +You should have received a copy of the GNU General Public License
379 +along with GNU CC; see the file COPYING. If not, write to
380 +the Free Software Foundation, 59 Temple Place - Suite 330,
381 +Boston, MA 02111-1307, USA. */
383 +#undef TARGET_VERSION
384 +#define TARGET_VERSION fprintf (stderr, " (i386 AROS/ELF)");
386 +#undef LINK_SPEC
387 +#define LINK_SPEC "-m elf_i386 -L%R/lib"
388 diff -ruN gcc-4.6.2/gcc/config/m68k/m68k.c gcc-4.6.2.aros/gcc/config/m68k/m68k.c
389 --- gcc-4.6.2/gcc/config/m68k/m68k.c 2011-07-31 17:09:25.000000000 +0200
390 +++ gcc-4.6.2.aros/gcc/config/m68k/m68k.c 2013-08-26 07:55:42.000000000 +0200
391 @@ -4522,7 +4522,7 @@
392 else if (letter == '/')
393 asm_fprintf (file, "%R");
394 else if (letter == '?')
395 - asm_fprintf (file, m68k_library_id_string);
396 + asm_fprintf (file, "%s", m68k_library_id_string);
397 else if (letter == 'p')
399 output_addr_const (file, op);
400 diff -ruN gcc-4.6.2/gcc/config/m68k/m68k.h gcc-4.6.2.aros/gcc/config/m68k/m68k.h
401 --- gcc-4.6.2/gcc/config/m68k/m68k.h 2010-11-22 02:57:50.000000000 +0100
402 +++ gcc-4.6.2.aros/gcc/config/m68k/m68k.h 2013-08-26 07:55:42.000000000 +0200
403 @@ -342,7 +342,9 @@
404 register elimination. */
405 #define FIRST_PSEUDO_REGISTER 25
407 -/* All m68k targets (except AmigaOS) use %a5 as the PIC register */
408 +/* All m68k targets (except AmigaOS) use %a5 as the PIC register.
409 + * On AmigaOS, we use %a4
410 + */
411 #define PIC_OFFSET_TABLE_REGNUM \
412 (!flag_pic ? INVALID_REGNUM \
413 : reload_completed ? REGNO (pic_offset_table_rtx) \
414 @@ -432,7 +434,8 @@
415 /* Most m68k targets use %a6 as a frame pointer. The AmigaOS
416 ABI uses %a6 for shared library calls, therefore the frame
417 pointer is shifted to %a5 on this target. */
418 -#define FRAME_POINTER_REGNUM A6_REG
419 +#define FRAME_POINTER_REGNUM A5_REG
420 +#define PIC_REG A4_REG
422 /* Base register for access to arguments of the function.
423 * This isn't a hardware register. It will be eliminated to the
424 diff -ruN gcc-4.6.2/gcc/config/m68k/m68k.md gcc-4.6.2.aros/gcc/config/m68k/m68k.md
425 --- gcc-4.6.2/gcc/config/m68k/m68k.md 2009-12-31 00:03:46.000000000 +0100
426 +++ gcc-4.6.2.aros/gcc/config/m68k/m68k.md 2013-08-26 07:55:42.000000000 +0200
427 @@ -131,7 +131,8 @@
428 [(D0_REG 0)
429 (A0_REG 8)
430 (A1_REG 9)
431 - (PIC_REG 13)
432 + (A4_REG 12)
433 + (A5_REG 13)
434 (A6_REG 14)
435 (SP_REG 15)
436 (FP0_REG 16)
437 @@ -7295,7 +7296,7 @@
439 if (TARGET_ID_SHARED_LIBRARY)
441 - operands[1] = gen_rtx_REG (Pmode, PIC_REG);
442 + operands[1] = gen_rtx_REG (Pmode, A4_REG);
443 return MOTOROLA ? "move.l %?(%1),%0" : "movel %1@(%?), %0";
445 else if (MOTOROLA)
446 diff -ruN gcc-4.6.2/gcc/config/m68k/t-aros gcc-4.6.2.aros/gcc/config/m68k/t-aros
447 --- gcc-4.6.2/gcc/config/m68k/t-aros 1970-01-01 01:00:00.000000000 +0100
448 +++ gcc-4.6.2.aros/gcc/config/m68k/t-aros 2013-08-26 07:55:42.000000000 +0200
449 @@ -0,0 +1,2 @@
450 +# Custom multilibs for AROS
451 +M68K_MLIB_CPU += && match(MLIB, "^68")
452 diff -ruN gcc-4.6.2/gcc/config/rs6000/aros.h gcc-4.6.2.aros/gcc/config/rs6000/aros.h
453 --- gcc-4.6.2/gcc/config/rs6000/aros.h 1970-01-01 01:00:00.000000000 +0100
454 +++ gcc-4.6.2.aros/gcc/config/rs6000/aros.h 2013-08-26 07:55:42.000000000 +0200
455 @@ -0,0 +1,164 @@
456 +/* Definitions for Powerpc running AROS systems with ELF format.
457 + Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002
458 + Free Software Foundation, Inc.
459 + Contributed by Markus Weiss.
460 + Based upon i386/aros.h by Fabio Alemagna.
462 +This file is part of GNU CC.
464 +GNU CC is free software; you can redistribute it and/or modify
465 +it under the terms of the GNU General Public License as published by
466 +the Free Software Foundation; either version 2, or (at your option)
467 +any later version.
469 +GNU CC is distributed in the hope that it will be useful,
470 +but WITHOUT ANY WARRANTY; without even the implied warranty of
471 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
472 +GNU General Public License for more details.
474 +You should have received a copy of the GNU General Public License
475 +along with GNU CC; see the file COPYING. If not, write to
476 +the Free Software Foundation, 59 Temple Place - Suite 330,
477 +Boston, MA 02111-1307, USA. */
479 +/* Symbols missing in comparison to i386/aros.h are either
480 + defined in elfos.h, rs6000/rs6000.h rs6000/sysv4.h
481 + or not needed for PowerPC.
484 +/* We need to define __powerpc__. */
486 +#undef TARGET_OS_CPP_BUILTINS
487 +#define TARGET_OS_CPP_BUILTINS() \
488 + do \
489 + { \
490 + builtin_define_std ("AROS"); \
491 + builtin_define ("AMIGA"); \
492 + builtin_define ("_AMIGA"); \
493 + builtin_define ("__powerpc__"); \
494 + builtin_define ("__ELF__"); \
495 + builtin_assert ("system=posix"); \
496 + if (flag_pic) \
497 + { \
498 + builtin_define ("__PIC__"); \
499 + builtin_define ("__pic__"); \
500 + } \
501 + } \
502 + while (0)
504 +/* This one taken from linux.h. */
505 +/* We are 32-bit all the time, so optimize a little. */
506 +#undef TARGET_64BIT
507 +#define TARGET_64BIT 0
509 +/* Output at beginning of assembler file. */
510 +/* The .file command should always begin the output. */
511 +/*#undef TARGET_ASM_FILE_START_FILE_DIRECTIVE
512 +#define TARGET_ASM_FILE_START_FILE_DIRECTIVE true
513 +defined in elfos.h
516 +#undef TARGET_VERSION
517 +#define TARGET_VERSION fprintf (stderr, " (PowerPC AROS/ELF)");
519 +/* The svr4 ABI for the i386 says that records and unions are returned
520 + in memory. */
521 +/*#undef DEFAULT_PCC_STRUCT_RETURN
522 +#define DEFAULT_PCC_STRUCT_RETURN 1
523 +see rs6000/rs6000.h
527 +#undef ASM_COMMENT_START
528 +#define ASM_COMMENT_START "#"
529 +see rs6000/rs6000.h
533 +#undef DBX_REGISTER_NUMBER
534 +#define DBX_REGISTER_NUMBER(n) \
535 + (TARGET_64BIT ? dbx64_register_map[n] : svr4_dbx_register_map[n])
536 +see rs6000/sysv4.h
539 +/* Output assembler code to FILE to call the profiler.
540 + To the best of my knowledge, no Linux libc has required the label
541 + argument to mcount. */
544 +#define NO_PROFILE_COUNTERS 1
545 +not used by other similar ppc compilers
546 +only in darwin.h rs6000/linux64.h rs6000/rs6000.c
550 +#undef MCOUNT_NAME
551 +#define MCOUNT_NAME "mcount"
552 +see rs6000/sysv4.h RS6000_MCOUNT
555 +/* The GLIBC version of mcount for the x86 assumes that there is a
556 + frame, so we cannot allow profiling without a frame pointer. */
558 +#undef SUBTARGET_FRAME_POINTER_REQUIRED
559 +#define SUBTARGET_FRAME_POINTER_REQUIRED crtl->profile
560 +seems to be handled by rs6000/rs6000.h
563 +#undef CPP_SPEC
564 +#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
566 +#undef CC1_SPEC
567 +#define CC1_SPEC "%(cc1_cpu) %{profile:-p}"
569 +/* Provide a LINK_SPEC appropriate for AROS. */
571 +#undef LINK_SPEC
572 +#define LINK_SPEC "-m elf32ppc -L %R/lib"
574 +/* A C statement (sans semicolon) to output to the stdio stream
575 + FILE the assembler definition of uninitialized global DECL named
576 + NAME whose size is SIZE bytes and alignment is ALIGN bytes.
577 + Try to use asm_output_aligned_bss to implement this macro. */
579 +#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
580 + asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
581 +see rs6000/sysv4.h
584 +/* A C statement to output to the stdio stream FILE an assembler
585 + command to advance the location counter to a multiple of 1<<LOG
586 + bytes if it is within MAX_SKIP bytes.
588 + This is used to align code labels according to Intel recommendations. */
590 +#ifdef HAVE_GAS_MAX_SKIP_P2ALIGN
591 +#define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE,LOG,MAX_SKIP) \
592 + do { \
593 + if ((LOG) != 0) { \
594 + if ((MAX_SKIP) == 0) fprintf ((FILE), "\t.p2align %d\n", (LOG)); \
595 + else fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)); \
596 + } \
597 + } while (0)
598 +#endif
599 +see rs6000/sysv4.h
602 +/* Handle special EH pointer encodings. Absolute, pc-relative, and
603 + indirect are handled automatically. */
605 +#define ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX(FILE, ENCODING, SIZE, ADDR, DONE) \
606 + do { \
607 + if ((SIZE) == 4 && ((ENCODING) & 0x70) == DW_EH_PE_datarel) \
608 + { \
609 + fputs (ASM_LONG, FILE); \
610 + assemble_name (FILE, XSTR (ADDR, 0)); \
611 + fputs (((ENCODING) & DW_EH_PE_indirect ? "@GOT" : "@GOTOFF"), FILE); \
612 + goto DONE; \
613 + } \
614 + } while (0)
615 +not used for PowerPC
618 +/* FIXME: AROS doesn't support dw2 unwinding yet. */
619 +#undef MD_FALLBACK_FRAME_STATE_FOR
620 diff -ruN gcc-4.6.2/gcc/config/rs6000/rs6000.c gcc-4.6.2.aros/gcc/config/rs6000/rs6000.c
621 --- gcc-4.6.2/gcc/config/rs6000/rs6000.c 2011-09-19 00:01:56.000000000 +0200
622 +++ gcc-4.6.2.aros/gcc/config/rs6000/rs6000.c 2013-08-26 07:55:42.000000000 +0200
623 @@ -1308,6 +1308,7 @@
624 { "altivec", 1, 1, false, true, false, rs6000_handle_altivec_attribute },
625 { "longcall", 0, 0, false, true, true, rs6000_handle_longcall_attribute },
626 { "shortcall", 0, 0, false, true, true, rs6000_handle_longcall_attribute },
627 + { "stackparm", 0, 0, false, true, true, rs6000_handle_longcall_attribute },
628 { "ms_struct", 0, 0, false, false, false, rs6000_handle_struct_attribute },
629 { "gcc_struct", 0, 0, false, false, false, rs6000_handle_struct_attribute },
630 #ifdef SUBTARGET_ATTRIBUTE_TABLE
631 @@ -8063,6 +8064,9 @@
632 && !lookup_attribute ("shortcall", TYPE_ATTRIBUTES (fntype))))
633 cum->call_cookie |= CALL_LONG;
635 + cum->stackparm = fntype && lookup_attribute("stackparm",
636 + TYPE_ATTRIBUTES(fntype));
638 if (TARGET_DEBUG_ARG)
640 fprintf (stderr, "\ninit_cumulative_args:");
641 @@ -9038,6 +9042,9 @@
642 return GEN_INT (cum->call_cookie);
645 + if (cum->stackparm)
646 + return NULL_RTX;
648 if (TARGET_MACHO && rs6000_darwin64_struct_check_p (mode, type))
650 rtx rslt = rs6000_darwin64_record_arg (cum, type, named, /*retval= */false);
651 @@ -9453,6 +9460,9 @@
652 int first_reg_offset;
653 alias_set_type set;
655 + if (cum->stackparm)
656 + return;
658 /* Skip the last named argument. */
659 next_cum = *cum;
660 rs6000_function_arg_advance_1 (&next_cum, mode, type, true, 0);
661 diff -ruN gcc-4.6.2/gcc/config/rs6000/rs6000.h gcc-4.6.2.aros/gcc/config/rs6000/rs6000.h
662 --- gcc-4.6.2/gcc/config/rs6000/rs6000.h 2011-07-27 20:17:15.000000000 +0200
663 +++ gcc-4.6.2.aros/gcc/config/rs6000/rs6000.h 2013-08-26 07:55:42.000000000 +0200
664 @@ -1563,6 +1563,7 @@
665 int nargs_prototype; /* # args left in the current prototype */
666 int prototype; /* Whether a prototype was defined */
667 int stdarg; /* Whether function is a stdarg function. */
668 + int stackparm; /* Whether function has all args on the stack */
669 int call_cookie; /* Do special things for this call */
670 int sysv_gregno; /* next available GP register */
671 int intoffset; /* running offset in struct (darwin64) */
672 diff -ruN gcc-4.6.2/gcc/config/t-aros gcc-4.6.2.aros/gcc/config/t-aros
673 --- gcc-4.6.2/gcc/config/t-aros 1970-01-01 01:00:00.000000000 +0100
674 +++ gcc-4.6.2.aros/gcc/config/t-aros 2013-08-26 07:55:42.000000000 +0200
675 @@ -0,0 +1,29 @@
676 +# In AROS, "/usr" is a four-letter word.
677 +# Must match STANDARD_INCLUDE_DIR in aros.h !
678 +NATIVE_SYSTEM_HEADER_DIR = /include
680 +# Don't add AROS target include path when compiling host compiler
681 +CPPFLAGS =
683 +# Copy AROS specific include replacement files
684 +LIBGCC_DEPS += stmp-aros-hrds
686 +EXTRA_AROS_HEADERS = aros/types/size_t.h aros/types/ptrdiff_t.h \
687 + aros/types/wchar_t.h aros/types/wint_t.h aros/types/null.h
689 +stmp-int-hdrs : | include/aros/types
691 +include/aros/types : $(addprefix $(srcdir)/ginclude/,$(EXTRA_AROS_HEADERS))
692 + -if [ -d include ] ; then true; else mkdir include; chmod a+rx include; fi
693 + -if [ -d include/aros/types ] ; \
694 + then true; \
695 + else \
696 + mkdir include/aros; chmod a+rx include/aros; \
697 + mkdir include/aros/types; chmod a+rx include/aros/types; \
698 + fi
699 + for file in $(EXTRA_AROS_HEADERS); do \
700 + $(STAMP) include/$$file; \
701 + rm -fr include/$$file; \
702 + cp $(srcdir)/ginclude/$$file include/$$file; \
703 + chmod a+r include/$$file; \
704 + done
705 diff -ruN gcc-4.6.2/gcc/config.build gcc-4.6.2.aros/gcc/config.build
706 --- gcc-4.6.2/gcc/config.build 2010-04-12 20:36:30.000000000 +0200
707 +++ gcc-4.6.2.aros/gcc/config.build 2013-08-26 07:55:42.000000000 +0200
708 @@ -124,6 +124,9 @@
709 # HP 9000 series 300
710 build_install_headers_dir=install-headers-cpio
712 + *-*-aros*)
713 + build_xm_file=xm-aros.h
714 + ;;
715 *-*-sysv*)
716 # All other System V variants.
717 build_install_headers_dir=install-headers-cpio
718 diff -ruN gcc-4.6.2/gcc/config.gcc gcc-4.6.2.aros/gcc/config.gcc
719 --- gcc-4.6.2/gcc/config.gcc 2011-07-22 18:44:50.000000000 +0200
720 +++ gcc-4.6.2.aros/gcc/config.gcc 2013-08-26 07:55:42.000000000 +0200
721 @@ -656,6 +656,14 @@
723 esac
725 +*-*-aros*)
726 + gas=yes
727 + gnu_ld=yes
728 + thread_file=single
729 + use_collect2=no
730 + xm_defines='STDC_HEADERS=1'
731 + ;;
733 *-*-openbsd*)
734 tmake_file="t-libc-ok t-openbsd t-libgcc-pic"
735 case ${enable_threads} in
736 @@ -793,6 +801,16 @@
737 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
738 extra_parts="crtinit.o crtfini.o"
740 +arm*-*-aros*)
741 + tm_file="dbxelf.h elfos.h arm/elf.h arm/bpabi.h aros.h arm/aros.h arm/aout.h arm/arm.h"
742 + tm_file="$tm_file ../../libgcc/config/arm/bpabi-lib.h"
743 + tmake_file="${tmake_file} arm/t-arm arm/t-arm-elf arm/t-arm-softfp arm/t-bpabi arm/t-aros t-aros"
744 + xm_file="xm-aros.h"
745 + # The BPABI long long divmod functions return a 128-bit value in
746 + # registers r0-r3. Correctly modeling that requires the use of
747 + # TImode.
748 + need_64bit_hwint=yes
749 + ;;
750 arm-wrs-vxworks)
751 tm_file="elfos.h arm/elf.h arm/aout.h ${tm_file} vx-common.h vxworks.h arm/vxworks.h"
752 extra_options="${extra_options} arm/vxworks.opt"
753 @@ -1312,6 +1330,16 @@
754 esac
755 tmake_file="${tmake_file} i386/t-linux64 i386/t-crtstuff i386/t-crtpc i386/t-crtfm t-dfprules"
757 +i[34567]86-*-aros*)
758 + tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/i386elf.h aros.h i386/aros.h"
759 + xm_file=xm-aros.h
760 + tmake_file="${tmake_file} i386/t-i386elf t-aros"
761 + ;;
762 +x86_64-*-aros*)
763 + 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"
764 + tmake_file="${tmake_file} i386/t-i386elf t-aros"
765 + xm_file=xm-aros.h
766 + ;;
767 i[34567]86-pc-msdosdjgpp*)
768 xm_file=i386/xm-djgpp.h
769 tm_file="dbxcoff.h ${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/djgpp.h i386/djgpp-stdint.h"
770 @@ -1720,6 +1748,16 @@
771 extra_options="${extra_options} m68hc11/m68hc11.opt"
772 use_gcc_stdint=wrap
774 +m68k-*-aros*)
775 + default_m68k_cpu=68000
776 + default_cf_cpu=5206
777 + 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"
778 + tm_file="${tm_file} aros.h"
779 + tm_defines="${tm_defines} MOTOROLA=1"
780 + tmake_file="m68k/t-floatlib m68k/t-m68kbare m68k/t-m68kelf"
781 + tmake_file="$tmake_file m68k/t-aros m68k/t-mlibs t-aros"
782 + extra_parts="crtbegin.o crtend.o"
783 + ;;
784 m68k-*-elf* | fido-*-elf*)
785 case ${target} in
786 fido-*-elf*)
787 @@ -2143,6 +2181,13 @@
788 extra_options="${extra_options} rs6000/sysv4.opt"
789 tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-rtems t-rtems rs6000/t-ppccomm"
791 +powerpc-*-aros*)
792 + tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h aros.h"
793 + extra_options="${extra_options} rs6000/sysv4.opt"
794 + tm_file="${tm_file} rs6000/aros.h"
795 + xm_file=xm-aros.h
796 + tmake_file="$tmake_file t-aros"
797 + ;;
798 powerpc-*-linux* | powerpc64-*-linux*)
799 tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h"
800 extra_options="${extra_options} rs6000/sysv4.opt"
801 diff -ruN gcc-4.6.2/gcc/config.host gcc-4.6.2.aros/gcc/config.host
802 --- gcc-4.6.2/gcc/config.host 2011-02-15 10:49:14.000000000 +0100
803 +++ gcc-4.6.2.aros/gcc/config.host 2013-08-26 07:55:42.000000000 +0200
804 @@ -277,4 +277,8 @@
805 out_host_hook_obj=host-hpux.o
806 host_xmake_file="${host_xmake_file} x-hpux"
808 + *-*-aros*)
809 + host_can_use_collect2=no
810 + host_xm_file=xm-aros.h
811 + ;;
812 esac
813 diff -ruN gcc-4.6.2/gcc/doc/cppopts.texi gcc-4.6.2.aros/gcc/doc/cppopts.texi
814 --- gcc-4.6.2/gcc/doc/cppopts.texi 2010-12-20 08:26:12.000000000 +0100
815 +++ gcc-4.6.2.aros/gcc/doc/cppopts.texi 2013-08-26 07:55:42.000000000 +0200
816 @@ -769,7 +769,7 @@
817 Enable special code to work around file systems which only permit very
818 short file names, such as MS-DOS@.
820 -@itemx --help
821 +@item --help
822 @itemx --target-help
823 @opindex help
824 @opindex target-help
825 diff -ruN gcc-4.6.2/gcc/doc/generic.texi gcc-4.6.2.aros/gcc/doc/generic.texi
826 --- gcc-4.6.2/gcc/doc/generic.texi 2011-01-02 02:30:55.000000000 +0100
827 +++ gcc-4.6.2.aros/gcc/doc/generic.texi 2013-08-26 07:55:42.000000000 +0200
828 @@ -1421,7 +1421,7 @@
829 integer type compatible with sizetype. This is the only binary
830 arithmetic operand that can operate on pointer types.
832 -@itemx PLUS_EXPR
833 +@item PLUS_EXPR
834 @itemx MINUS_EXPR
835 @itemx MULT_EXPR
836 These nodes represent various binary arithmetic operations.
837 diff -ruN gcc-4.6.2/gcc/doc/invoke.texi gcc-4.6.2.aros/gcc/doc/invoke.texi
838 --- gcc-4.6.2/gcc/doc/invoke.texi 2011-10-24 14:22:21.000000000 +0200
839 +++ gcc-4.6.2.aros/gcc/doc/invoke.texi 2013-08-26 07:55:42.000000000 +0200
840 @@ -165,7 +165,7 @@
841 -pipe -pass-exit-codes @gol
842 -x @var{language} -v -### --help@r{[}=@var{class}@r{[},@dots{}@r{]]} --target-help @gol
843 --version -wrapper @@@var{file} -fplugin=@var{file} -fplugin-arg-@var{name}=@var{arg} @gol
844 --fdump-ada-spec@r{[}-slim@r{]}} -fdump-go-spec=@var{file}
845 +-fdump-ada-spec@r{[}-slim@r{]} -fdump-go-spec=@var{file}}
847 @item C Language Options
848 @xref{C Dialect Options,,Options Controlling C Dialect}.
849 @@ -5085,11 +5085,11 @@
850 @option{-fdump-rtl-ce3} enable dumping after the three
851 if conversion passes.
853 -@itemx -fdump-rtl-cprop_hardreg
854 +@item -fdump-rtl-cprop_hardreg
855 @opindex fdump-rtl-cprop_hardreg
856 Dump after hard register copy propagation.
858 -@itemx -fdump-rtl-csa
859 +@item -fdump-rtl-csa
860 @opindex fdump-rtl-csa
861 Dump after combining stack adjustments.
863 @@ -5100,11 +5100,11 @@
864 @option{-fdump-rtl-cse1} and @option{-fdump-rtl-cse2} enable dumping after
865 the two common sub-expression elimination passes.
867 -@itemx -fdump-rtl-dce
868 +@item -fdump-rtl-dce
869 @opindex fdump-rtl-dce
870 Dump after the standalone dead code elimination passes.
872 -@itemx -fdump-rtl-dbr
873 +@item -fdump-rtl-dbr
874 @opindex fdump-rtl-dbr
875 Dump after delayed branch scheduling.
877 @@ -5149,7 +5149,7 @@
878 @opindex fdump-rtl-initvals
879 Dump after the computation of the initial value sets.
881 -@itemx -fdump-rtl-into_cfglayout
882 +@item -fdump-rtl-into_cfglayout
883 @opindex fdump-rtl-into_cfglayout
884 Dump after converting to cfglayout mode.
886 @@ -5179,7 +5179,7 @@
887 @opindex fdump-rtl-rnreg
888 Dump after register renumbering.
890 -@itemx -fdump-rtl-outof_cfglayout
891 +@item -fdump-rtl-outof_cfglayout
892 @opindex fdump-rtl-outof_cfglayout
893 Dump after converting from cfglayout mode.
895 @@ -5191,7 +5191,7 @@
896 @opindex fdump-rtl-postreload
897 Dump after post-reload optimizations.
899 -@itemx -fdump-rtl-pro_and_epilogue
900 +@item -fdump-rtl-pro_and_epilogue
901 @opindex fdump-rtl-pro_and_epilogue
902 Dump after generating the function pro and epilogues.
904 diff -ruN gcc-4.6.2/gcc/doc/sourcebuild.texi gcc-4.6.2.aros/gcc/doc/sourcebuild.texi
905 --- gcc-4.6.2/gcc/doc/sourcebuild.texi 2011-02-11 11:01:29.000000000 +0100
906 +++ gcc-4.6.2.aros/gcc/doc/sourcebuild.texi 2013-08-26 07:55:42.000000000 +0200
907 @@ -676,7 +676,7 @@
908 @code{lang_checks}.
910 @table @code
911 -@itemx all.cross
912 +@item all.cross
913 @itemx start.encap
914 @itemx rest.encap
915 FIXME: exactly what goes in each of these targets?
916 diff -ruN gcc-4.6.2/gcc/gengtype.c gcc-4.6.2.aros/gcc/gengtype.c
917 --- gcc-4.6.2/gcc/gengtype.c 2010-11-25 20:03:27.000000000 +0100
918 +++ gcc-4.6.2.aros/gcc/gengtype.c 2013-08-26 07:55:42.000000000 +0200
919 @@ -3594,13 +3594,13 @@
920 int has_length, struct fileloc *line, const char *if_marked,
921 bool emit_pch, type_p field_type, const char *field_name)
923 + struct pair newv;
924 /* If the field reference is relative to V, rather than to some
925 subcomponent of V, we can mark any subarrays with a single stride.
926 We're effectively treating the field as a global variable in its
927 own right. */
928 if (v && type == v->type)
930 - struct pair newv;
932 newv = *v;
933 newv.type = field_type;
934 diff -ruN gcc-4.6.2/gcc/ginclude/aros/types/null.h gcc-4.6.2.aros/gcc/ginclude/aros/types/null.h
935 --- gcc-4.6.2/gcc/ginclude/aros/types/null.h 1970-01-01 01:00:00.000000000 +0100
936 +++ gcc-4.6.2.aros/gcc/ginclude/aros/types/null.h 2013-08-26 07:55:42.000000000 +0200
937 @@ -0,0 +1,3 @@
938 +/* Replace AROS' NULL definition with gcc's one */
939 +#define __need_NULL
940 +#include <stddef.h>
941 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
942 --- gcc-4.6.2/gcc/ginclude/aros/types/ptrdiff_t.h 1970-01-01 01:00:00.000000000 +0100
943 +++ gcc-4.6.2.aros/gcc/ginclude/aros/types/ptrdiff_t.h 2013-08-26 07:55:42.000000000 +0200
944 @@ -0,0 +1,3 @@
945 +/* Replace AROS' ptrdiff_t definition with gcc's one */
946 +#define __need_ptrdiff_t
947 +#include <stddef.h>
948 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
949 --- gcc-4.6.2/gcc/ginclude/aros/types/size_t.h 1970-01-01 01:00:00.000000000 +0100
950 +++ gcc-4.6.2.aros/gcc/ginclude/aros/types/size_t.h 2013-08-26 07:55:42.000000000 +0200
951 @@ -0,0 +1,3 @@
952 +/* Replace AROS' size_t definition with gcc's one */
953 +#define __need_size_t
954 +#include <stddef.h>
955 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
956 --- gcc-4.6.2/gcc/ginclude/aros/types/wchar_t.h 1970-01-01 01:00:00.000000000 +0100
957 +++ gcc-4.6.2.aros/gcc/ginclude/aros/types/wchar_t.h 2013-08-26 07:55:42.000000000 +0200
958 @@ -0,0 +1,3 @@
959 +/* Replace AROS' wchar_t definition with gcc's one */
960 +#define __need_wchar_t
961 +#include <stddef.h>
962 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
963 --- gcc-4.6.2/gcc/ginclude/aros/types/wint_t.h 1970-01-01 01:00:00.000000000 +0100
964 +++ gcc-4.6.2.aros/gcc/ginclude/aros/types/wint_t.h 2013-08-26 07:55:42.000000000 +0200
965 @@ -0,0 +1,3 @@
966 +/* Replace AROS' wint_t definition with gcc's one */
967 +#define __need_wint_t
968 +#include <stddef.h>
969 diff -ruN gcc-4.6.2/gcc/ginclude/stddef.h gcc-4.6.2.aros/gcc/ginclude/stddef.h
970 --- gcc-4.6.2/gcc/ginclude/stddef.h 2011-01-29 23:15:52.000000000 +0100
971 +++ gcc-4.6.2.aros/gcc/ginclude/stddef.h 2013-08-26 07:55:42.000000000 +0200
972 @@ -134,6 +134,7 @@
973 #ifndef __PTRDIFF_T
974 #ifndef _PTRDIFF_T_
975 #ifndef _BSD_PTRDIFF_T_
976 +#ifndef _AROS_TYPES_PTRDIFF_T_H
977 #ifndef ___int_ptrdiff_t_h
978 #ifndef _GCC_PTRDIFF_T
979 #define _PTRDIFF_T
980 @@ -142,6 +143,7 @@
981 #define __PTRDIFF_T
982 #define _PTRDIFF_T_
983 #define _BSD_PTRDIFF_T_
984 +#define _AROS_TYPES_PTRDIFF_T_H
985 #define ___int_ptrdiff_t_h
986 #define _GCC_PTRDIFF_T
987 #ifndef __PTRDIFF_TYPE__
988 @@ -150,6 +152,7 @@
989 typedef __PTRDIFF_TYPE__ ptrdiff_t;
990 #endif /* _GCC_PTRDIFF_T */
991 #endif /* ___int_ptrdiff_t_h */
992 +#endif /* _AROS_TYPES_PTRDIFF_T_H */
993 #endif /* _BSD_PTRDIFF_T_ */
994 #endif /* _PTRDIFF_T_ */
995 #endif /* __PTRDIFF_T */
996 @@ -176,6 +179,7 @@
997 #ifndef __SIZE_T
998 #ifndef _SIZE_T_
999 #ifndef _BSD_SIZE_T_
1000 +#ifndef _AROS_TYPES_SIZE_T_H
1001 #ifndef _SIZE_T_DEFINED_
1002 #ifndef _SIZE_T_DEFINED
1003 #ifndef _BSD_SIZE_T_DEFINED_ /* Darwin */
1004 @@ -193,6 +197,7 @@
1005 #define __SIZE_T
1006 #define _SIZE_T_
1007 #define _BSD_SIZE_T_
1008 +#define _AROS_TYPES_SIZE_T_H
1009 #define _SIZE_T_DEFINED_
1010 #define _SIZE_T_DEFINED
1011 #define _BSD_SIZE_T_DEFINED_ /* Darwin */
1012 @@ -222,6 +227,7 @@
1013 #endif /* _BSD_SIZE_T_DEFINED_ */
1014 #endif /* _SIZE_T_DEFINED */
1015 #endif /* _SIZE_T_DEFINED_ */
1016 +#endif /* _AROS_TYPES_SIZE_T_H */
1017 #endif /* _BSD_SIZE_T_ */
1018 #endif /* _SIZE_T_ */
1019 #endif /* __SIZE_T */
1020 diff -ruN gcc-4.6.2/include/filenames.h gcc-4.6.2.aros/include/filenames.h
1021 --- gcc-4.6.2/include/filenames.h 2011-02-28 19:23:25.000000000 +0100
1022 +++ gcc-4.6.2.aros/include/filenames.h 2013-08-26 07:55:42.000000000 +0200
1023 @@ -37,6 +37,10 @@
1024 # define HAS_DRIVE_SPEC(f) HAS_DOS_DRIVE_SPEC (f)
1025 # define IS_DIR_SEPARATOR(c) IS_DOS_DIR_SEPARATOR (c)
1026 # define IS_ABSOLUTE_PATH(f) IS_DOS_ABSOLUTE_PATH (f)
1027 +#elif defined __AROS__
1028 +# define IS_DIR_SEPARATOR(c) ((c) == '/' || (c) == ':')
1029 +# define IS_ABSOLUTE_PATH(f) (IS_DIR_SEPARATOR((f)[0]) || (strchr((f), ':')))
1030 +# define HAVE_CASE_INSENSITIVE_FILE_SYSTEM
1031 #else /* not DOSish */
1032 # define HAS_DRIVE_SPEC(f) (0)
1033 # define IS_DIR_SEPARATOR(c) IS_UNIX_DIR_SEPARATOR (c)
1034 diff -ruN gcc-4.6.2/libcpp/configure gcc-4.6.2.aros/libcpp/configure
1035 --- gcc-4.6.2/libcpp/configure 2011-10-26 11:30:24.000000000 +0200
1036 +++ gcc-4.6.2.aros/libcpp/configure 2013-08-26 07:55:42.000000000 +0200
1037 @@ -7091,6 +7091,7 @@
1038 alpha*-*-* | \
1039 arm*-*-*eabi* | \
1040 arm*-*-symbianelf* | \
1041 + arm*-*-aros | \
1042 x86_64-*-* | \
1043 ia64-*-* | \
1044 hppa*64*-*-* | \
1045 diff -ruN gcc-4.6.2/libcpp/configure.ac gcc-4.6.2.aros/libcpp/configure.ac
1046 --- gcc-4.6.2/libcpp/configure.ac 2010-11-18 08:35:34.000000000 +0100
1047 +++ gcc-4.6.2.aros/libcpp/configure.ac 2013-08-26 07:55:42.000000000 +0200
1048 @@ -141,6 +141,7 @@
1049 alpha*-*-* | \
1050 arm*-*-*eabi* | \
1051 arm*-*-symbianelf* | \
1052 + arm*-*-aros | \
1053 x86_64-*-* | \
1054 ia64-*-* | \
1055 hppa*64*-*-* | \
1056 diff -ruN gcc-4.6.2/libgcc/config.host gcc-4.6.2.aros/libgcc/config.host
1057 --- gcc-4.6.2/libgcc/config.host 2011-03-14 07:06:23.000000000 +0100
1058 +++ gcc-4.6.2.aros/libgcc/config.host 2013-08-26 07:55:42.000000000 +0200
1059 @@ -599,6 +599,8 @@
1061 mep*-*-*)
1063 +*-*-aros*)
1064 + ;;
1066 echo "*** Configuration ${host} not supported" 1>&2
1067 exit 1
1068 diff -ruN gcc-4.6.2/libiberty/filename_cmp.c gcc-4.6.2.aros/libiberty/filename_cmp.c
1069 --- gcc-4.6.2/libiberty/filename_cmp.c 2011-02-28 19:23:25.000000000 +0100
1070 +++ gcc-4.6.2.aros/libiberty/filename_cmp.c 2013-08-26 07:55:42.000000000 +0200
1071 @@ -51,7 +51,11 @@
1072 filename_cmp (const char *s1, const char *s2)
1074 #ifndef HAVE_DOS_BASED_FILE_SYSTEM
1075 +#ifdef HAVE_CASE_INSENSITIVE_FILE_SYSTEM
1076 + return strcasecmp(s1, s2);
1077 +#else
1078 return strcmp(s1, s2);
1079 +#endif
1080 #else
1081 for (;;)
1083 diff -ruN gcc-4.6.2/libobjc/configure gcc-4.6.2.aros/libobjc/configure
1084 --- gcc-4.6.2/libobjc/configure 2011-02-13 12:45:53.000000000 +0100
1085 +++ gcc-4.6.2.aros/libobjc/configure 2013-08-26 07:55:42.000000000 +0200
1086 @@ -11249,215 +11249,7 @@
1090 -# Check if we have thread-local storage
1093 - # Check whether --enable-tls was given.
1094 -if test "${enable_tls+set}" = set; then :
1095 - enableval=$enable_tls;
1096 - case "$enableval" in
1097 - yes|no) ;;
1098 - *) as_fn_error "Argument to enable/disable tls must be yes or no" "$LINENO" 5 ;;
1099 - esac
1101 -else
1102 - enable_tls=yes
1106 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the target supports thread-local storage" >&5
1107 -$as_echo_n "checking whether the target supports thread-local storage... " >&6; }
1108 -if test "${gcc_cv_have_tls+set}" = set; then :
1109 - $as_echo_n "(cached) " >&6
1110 -else
1112 - if test "$cross_compiling" = yes; then :
1113 - if test x$gcc_no_link = xyes; then
1114 - as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
1116 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1117 -/* end confdefs.h. */
1118 -__thread int a; int b; int main() { return a = b; }
1119 -_ACEOF
1120 -if ac_fn_c_try_link "$LINENO"; then :
1121 - chktls_save_LDFLAGS="$LDFLAGS"
1122 - case $host in
1123 - *-*-linux*)
1124 - LDFLAGS="-shared -Wl,--no-undefined $LDFLAGS"
1125 - ;;
1126 - esac
1127 - chktls_save_CFLAGS="$CFLAGS"
1128 - CFLAGS="-fPIC $CFLAGS"
1129 - if test x$gcc_no_link = xyes; then
1130 - as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
1132 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1133 -/* end confdefs.h. */
1134 -int f() { return 0; }
1135 -_ACEOF
1136 -if ac_fn_c_try_link "$LINENO"; then :
1137 - if test x$gcc_no_link = xyes; then
1138 - as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
1140 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1141 -/* end confdefs.h. */
1142 -__thread int a; int b; int f() { return a = b; }
1143 -_ACEOF
1144 -if ac_fn_c_try_link "$LINENO"; then :
1145 - gcc_cv_have_tls=yes
1146 -else
1147 - gcc_cv_have_tls=no
1149 -rm -f core conftest.err conftest.$ac_objext \
1150 - conftest$ac_exeext conftest.$ac_ext
1151 -else
1152 - gcc_cv_have_tls=yes
1154 -rm -f core conftest.err conftest.$ac_objext \
1155 - conftest$ac_exeext conftest.$ac_ext
1156 - CFLAGS="$chktls_save_CFLAGS"
1157 - LDFLAGS="$chktls_save_LDFLAGS"
1158 -else
1159 - gcc_cv_have_tls=no
1161 -rm -f core conftest.err conftest.$ac_objext \
1162 - conftest$ac_exeext conftest.$ac_ext
1165 -else
1166 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1167 -/* end confdefs.h. */
1168 -__thread int a; int b; int main() { return a = b; }
1169 -_ACEOF
1170 -if ac_fn_c_try_run "$LINENO"; then :
1171 - chktls_save_LDFLAGS="$LDFLAGS"
1172 - LDFLAGS="-static $LDFLAGS"
1173 - if test x$gcc_no_link = xyes; then
1174 - as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
1176 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1177 -/* end confdefs.h. */
1178 -int main() { return 0; }
1179 -_ACEOF
1180 -if ac_fn_c_try_link "$LINENO"; then :
1181 - if test "$cross_compiling" = yes; then :
1182 - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
1183 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1184 -as_fn_error "cannot run test program while cross compiling
1185 -See \`config.log' for more details." "$LINENO" 5; }
1186 -else
1187 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1188 -/* end confdefs.h. */
1189 -__thread int a; int b; int main() { return a = b; }
1190 -_ACEOF
1191 -if ac_fn_c_try_run "$LINENO"; then :
1192 - gcc_cv_have_tls=yes
1193 -else
1194 - gcc_cv_have_tls=no
1196 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
1197 - conftest.$ac_objext conftest.beam conftest.$ac_ext
1200 -else
1201 - gcc_cv_have_tls=yes
1203 -rm -f core conftest.err conftest.$ac_objext \
1204 - conftest$ac_exeext conftest.$ac_ext
1205 - LDFLAGS="$chktls_save_LDFLAGS"
1206 - if test $gcc_cv_have_tls = yes; then
1207 - chktls_save_CFLAGS="$CFLAGS"
1208 - thread_CFLAGS=failed
1209 - for flag in '' '-pthread' '-lpthread'; do
1210 - CFLAGS="$flag $chktls_save_CFLAGS"
1211 - if test x$gcc_no_link = xyes; then
1212 - as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
1214 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1215 -/* end confdefs.h. */
1216 -#include <pthread.h>
1217 - void *g(void *d) { return NULL; }
1218 -int
1219 -main ()
1221 -pthread_t t; pthread_create(&t,NULL,g,NULL);
1223 - return 0;
1225 -_ACEOF
1226 -if ac_fn_c_try_link "$LINENO"; then :
1227 - thread_CFLAGS="$flag"
1229 -rm -f core conftest.err conftest.$ac_objext \
1230 - conftest$ac_exeext conftest.$ac_ext
1231 - if test "X$thread_CFLAGS" != Xfailed; then
1232 - break
1233 - fi
1234 - done
1235 - CFLAGS="$chktls_save_CFLAGS"
1236 - if test "X$thread_CFLAGS" != Xfailed; then
1237 - CFLAGS="$thread_CFLAGS $chktls_save_CFLAGS"
1238 - if test "$cross_compiling" = yes; then :
1239 - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
1240 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1241 -as_fn_error "cannot run test program while cross compiling
1242 -See \`config.log' for more details." "$LINENO" 5; }
1243 -else
1244 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1245 -/* end confdefs.h. */
1246 -#include <pthread.h>
1247 - __thread int a;
1248 - static int *volatile a_in_other_thread;
1249 - static void *
1250 - thread_func (void *arg)
1252 - a_in_other_thread = &a;
1253 - return (void *)0;
1255 -int
1256 -main ()
1258 -pthread_t thread;
1259 - void *thread_retval;
1260 - int *volatile a_in_main_thread;
1261 - a_in_main_thread = &a;
1262 - if (pthread_create (&thread, (pthread_attr_t *)0,
1263 - thread_func, (void *)0))
1264 - return 0;
1265 - if (pthread_join (thread, &thread_retval))
1266 - return 0;
1267 - return (a_in_other_thread == a_in_main_thread);
1269 - return 0;
1271 -_ACEOF
1272 -if ac_fn_c_try_run "$LINENO"; then :
1273 - gcc_cv_have_tls=yes
1274 -else
1275 - gcc_cv_have_tls=no
1277 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
1278 - conftest.$ac_objext conftest.beam conftest.$ac_ext
1281 - CFLAGS="$chktls_save_CFLAGS"
1282 - fi
1283 - fi
1284 -else
1285 - gcc_cv_have_tls=no
1287 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
1288 - conftest.$ac_objext conftest.beam conftest.$ac_ext
1292 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_have_tls" >&5
1293 -$as_echo "$gcc_cv_have_tls" >&6; }
1294 - if test "$enable_tls $gcc_cv_have_tls" = "yes yes"; then
1296 -$as_echo "#define HAVE_TLS 1" >>confdefs.h
1298 - fi
1299 +#dnl GCC_ENABLE_TLS
1301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for exception model to use" >&5
1302 $as_echo_n "checking for exception model to use... " >&6; }
1303 diff -ruN gcc-4.6.2/libobjc/configure.ac gcc-4.6.2.aros/libobjc/configure.ac
1304 --- gcc-4.6.2/libobjc/configure.ac 2010-12-06 01:50:04.000000000 +0100
1305 +++ gcc-4.6.2.aros/libobjc/configure.ac 2013-08-26 07:55:42.000000000 +0200
1306 @@ -217,7 +217,7 @@
1309 # Check if we have thread-local storage
1310 -GCC_CHECK_TLS
1311 +dnl GCC_CHECK_TLS
1313 AC_MSG_CHECKING([for exception model to use])
1314 AC_LANG_PUSH(C)
1315 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
1316 --- gcc-4.6.2/libstdc++-v3/config/os/aros/ctype_base.h 1970-01-01 01:00:00.000000000 +0100
1317 +++ gcc-4.6.2.aros/libstdc++-v3/config/os/aros/ctype_base.h 2013-08-26 07:55:42.000000000 +0200
1318 @@ -0,0 +1,27 @@
1319 +namespace std _GLIBCXX_VISIBILITY(default)
1321 +_GLIBCXX_BEGIN_NAMESPACE_VERSION
1323 +struct ctype_base {
1324 + /* Non-standard typedefs */
1325 + typedef int * __to_type;
1327 + /* NB: Offsets into ctype<char>::_M_table force a particular size
1328 + on the mask type. Because of this, we don't use an enum. */
1329 + typedef unsigned short int mask;
1331 + static const mask upper = _ISupper;
1332 + static const mask lower = _ISlower;
1333 + static const mask alpha = _ISalpha;
1334 + static const mask digit = _ISdigit;
1335 + static const mask xdigit = _ISxdigit;
1336 + static const mask space = _ISspace;
1337 + static const mask print = _ISprint;
1338 + static const mask graph = _ISgraph;
1339 + static const mask cntrl = _IScntrl;
1340 + static const mask punct = _ISpunct;
1341 + static const mask alnum = _ISalnum;
1344 +_GLIBCXX_END_NAMESPACE_VERSION
1345 +} // namespace
1346 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
1347 --- gcc-4.6.2/libstdc++-v3/config/os/aros/ctype_inline.h 1970-01-01 01:00:00.000000000 +0100
1348 +++ gcc-4.6.2.aros/libstdc++-v3/config/os/aros/ctype_inline.h 2013-08-26 07:55:42.000000000 +0200
1349 @@ -0,0 +1,173 @@
1350 +// Locale support -*- C++ -*-
1352 +// Copyright (C) 2000, 2003 Free Software Foundation, Inc.
1354 +// This file is part of the GNU ISO C++ Library. This library is free
1355 +// software; you can redistribute it and/or modify it under the
1356 +// terms of the GNU General Public License as published by the
1357 +// Free Software Foundation; either version 2, or (at your option)
1358 +// any later version.
1360 +// This library is distributed in the hope that it will be useful,
1361 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
1362 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1363 +// GNU General Public License for more details.
1365 +// You should have received a copy of the GNU General Public License along
1366 +// with this library; see the file COPYING. If not, write to the Free
1367 +// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
1368 +// USA.
1370 +// As a special exception, you may use this file as part of a free software
1371 +// library without restriction. Specifically, if other files instantiate
1372 +// templates or use macros or inline functions from this file, or you compile
1373 +// this file and link it with other files to produce an executable, this
1374 +// file does not by itself cause the resulting executable to be covered by
1375 +// the GNU General Public License. This exception does not however
1376 +// invalidate any other reasons why the executable file might be covered by
1377 +// the GNU General Public License.
1379 +/** @file ctype_inline.h
1380 + * This is an internal header file, included by other library headers.
1381 + * You should not attempt to use it directly.
1382 + */
1385 +// ISO C++ 14882: 22.1 Locales
1388 +// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*)
1389 +// functions go in ctype.cc
1391 +// The following definitions are portable, but insanely slow. If one
1392 +// cares at all about performance, then specialized ctype
1393 +// functionality should be added for the native os in question: see
1394 +// the config/os/bits/ctype_*.h files.
1396 +// Constructing a synthetic "C" table should be seriously considered...
1398 +namespace std _GLIBCXX_VISIBILITY(default)
1400 +_GLIBCXX_BEGIN_NAMESPACE_VERSION
1402 + bool
1403 + ctype<char>::
1404 + is(mask __m, char __c) const
1405 + {
1406 + if (_M_table)
1407 + return _M_table[static_cast<unsigned char>(__c)] & __m;
1408 + else
1410 + bool __ret = false;
1411 + const size_t __bitmasksize = 15;
1412 + size_t __bitcur = 0; // Lowest bitmask in ctype_base == 0
1413 + for (; __bitcur <= __bitmasksize; ++__bitcur)
1415 + const mask __bit = static_cast<mask>(1 << __bitcur);
1416 + if (__m & __bit)
1418 + bool __testis;
1419 + switch (__bit)
1421 + case space:
1422 + __testis = isspace(__c);
1423 + break;
1424 + case print:
1425 + __testis = isprint(__c);
1426 + break;
1427 + case cntrl:
1428 + __testis = iscntrl(__c);
1429 + break;
1430 + case upper:
1431 + __testis = isupper(__c);
1432 + break;
1433 + case lower:
1434 + __testis = islower(__c);
1435 + break;
1436 + case alpha:
1437 + __testis = isalpha(__c);
1438 + break;
1439 + case digit:
1440 + __testis = isdigit(__c);
1441 + break;
1442 + case punct:
1443 + __testis = ispunct(__c);
1444 + break;
1445 + case xdigit:
1446 + __testis = isxdigit(__c);
1447 + break;
1448 + case alnum:
1449 + __testis = isalnum(__c);
1450 + break;
1451 + case graph:
1452 + __testis = isgraph(__c);
1453 + break;
1454 + default:
1455 + __testis = false;
1456 + break;
1458 + __ret |= __testis;
1461 + return __ret;
1465 + const char*
1466 + ctype<char>::
1467 + is(const char* __low, const char* __high, mask* __vec) const
1469 + if (_M_table)
1470 + while (__low < __high)
1471 + *__vec++ = _M_table[static_cast<unsigned char>(*__low++)];
1472 + else
1474 + // Highest bitmask in ctype_base == 10.
1475 + const size_t __bitmasksize = 15;
1476 + for (;__low < __high; ++__vec, ++__low)
1478 + mask __m = 0;
1479 + // Lowest bitmask in ctype_base == 0
1480 + size_t __i = 0;
1481 + for (;__i <= __bitmasksize; ++__i)
1483 + const mask __bit = static_cast<mask>(1 << __i);
1484 + if (this->is(__bit, *__low))
1485 + __m |= __bit;
1487 + *__vec = __m;
1490 + return __high;
1493 + const char*
1494 + ctype<char>::
1495 + scan_is(mask __m, const char* __low, const char* __high) const
1497 + if (_M_table)
1498 + while (__low < __high
1499 + && !(_M_table[static_cast<unsigned char>(*__low)] & __m))
1500 + ++__low;
1501 + else
1502 + while (__low < __high && !this->is(__m, *__low))
1503 + ++__low;
1504 + return __low;
1507 + const char*
1508 + ctype<char>::
1509 + scan_not(mask __m, const char* __low, const char* __high) const
1511 + if (_M_table)
1512 + while (__low < __high
1513 + && (_M_table[static_cast<unsigned char>(*__low)] & __m) != 0)
1514 + ++__low;
1515 + else
1516 + while (__low < __high && this->is(__m, *__low) != 0)
1517 + ++__low;
1518 + return __low;
1521 +_GLIBCXX_END_NAMESPACE_VERSION
1522 +} // namespace
1523 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
1524 --- gcc-4.6.2/libstdc++-v3/config/os/aros/ctype_noninline.h 1970-01-01 01:00:00.000000000 +0100
1525 +++ gcc-4.6.2.aros/libstdc++-v3/config/os/aros/ctype_noninline.h 2013-08-26 07:55:42.000000000 +0200
1526 @@ -0,0 +1,56 @@
1527 + const ctype_base::mask*
1528 + ctype<char>::classic_table() throw()
1529 + { return __ctype_b; }
1531 + ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
1532 + size_t __refs)
1533 + : facet(__refs), _M_del(__table != 0 && __del),
1534 + _M_toupper(NULL), _M_tolower(NULL),
1535 + _M_table(__table ? __table : classic_table())
1536 + {
1537 + memset(_M_widen, 0, sizeof(_M_widen));
1538 + _M_widen_ok = 0;
1539 + memset(_M_narrow, 0, sizeof(_M_narrow));
1540 + _M_narrow_ok = 0;
1543 + ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
1544 + : facet(__refs), _M_del(__table != 0 && __del),
1545 + _M_toupper(NULL), _M_tolower(NULL),
1546 + _M_table(__table ? __table : classic_table())
1547 + {
1548 + memset(_M_widen, 0, sizeof(_M_widen));
1549 + _M_widen_ok = 0;
1550 + memset(_M_narrow, 0, sizeof(_M_narrow));
1551 + _M_narrow_ok = 0;
1554 + char
1555 + ctype<char>::do_toupper(char __c) const
1556 + { return ::toupper((int) __c); }
1558 + const char*
1559 + ctype<char>::do_toupper(char* __low, const char* __high) const
1561 + while (__low < __high)
1563 + *__low = ::toupper((int) *__low);
1564 + ++__low;
1566 + return __high;
1569 + char
1570 + ctype<char>::do_tolower(char __c) const
1571 + { return ::tolower((int) __c); }
1573 + const char*
1574 + ctype<char>::do_tolower(char* __low, const char* __high) const
1576 + while (__low < __high)
1578 + *__low = ::tolower((int) *__low);
1579 + ++__low;
1581 + return __high;
1583 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
1584 --- gcc-4.6.2/libstdc++-v3/config/os/aros/os_defines.h 1970-01-01 01:00:00.000000000 +0100
1585 +++ gcc-4.6.2.aros/libstdc++-v3/config/os/aros/os_defines.h 2013-08-26 07:55:42.000000000 +0200
1586 @@ -0,0 +1,6 @@
1587 +#ifndef _GLIBCXX_OS_DEFINES
1588 +#define _GLIBCXX_OS_DEFINES
1590 +#define __off64_t off_t
1592 +#endif
1593 diff -ruN gcc-4.6.2/libstdc++-v3/configure gcc-4.6.2.aros/libstdc++-v3/configure
1594 --- gcc-4.6.2/libstdc++-v3/configure 2011-10-06 01:09:51.000000000 +0200
1595 +++ gcc-4.6.2.aros/libstdc++-v3/configure 2013-08-26 07:55:42.000000000 +0200
1596 @@ -5267,12 +5267,9 @@
1600 -if test "x${with_newlib}" != "xyes"; then
1601 - enable_dlopen=yes
1606 +#if test "x${with_newlib}" != "xyes"; then
1607 +# AC_LIBTOOL_DLOPEN
1608 +#fi
1609 case `pwd` in
1610 *\ * | *\ *)
1611 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
1612 @@ -7990,6 +7987,8 @@
1616 + enable_dlopen=no
1619 enable_win32_dll=no
1621 @@ -26484,6 +26483,58 @@
1623 # Base decisions on target environment.
1624 case "${host}" in
1625 + *-aros*)
1626 + for ac_header in nan.h ieeefp.h endian.h sys/isa_defs.h machine/endian.h \
1627 + machine/param.h sys/machine.h sys/types.h fp.h locale.h float.h inttypes.h
1628 +do :
1629 + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
1630 +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
1631 +eval as_val=\$$as_ac_Header
1632 + if test "x$as_val" = x""yes; then :
1633 + cat >>confdefs.h <<_ACEOF
1634 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
1635 +_ACEOF
1639 +done
1642 + GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
1643 + GLIBCXX_CHECK_WCHAR_T_SUPPORT
1645 + $as_echo "#define HAVE_FINITE 1" >>confdefs.h
1647 + $as_echo "#define HAVE_FINITEF 1" >>confdefs.h
1649 + $as_echo "#define HAVE_FREXPF 1" >>confdefs.h
1651 + $as_echo "#define HAVE_HYPOTF 1" >>confdefs.h
1653 + $as_echo "#define HAVE_ISINF 1" >>confdefs.h
1655 + $as_echo "#define HAVE_ISINFF 1" >>confdefs.h
1657 + $as_echo "#define HAVE_ISNAN 1" >>confdefs.h
1659 + $as_echo "#define HAVE_ISNANF 1" >>confdefs.h
1661 + $as_echo "#define HAVE_SINCOS 1" >>confdefs.h
1663 + $as_echo "#define HAVE_SINCOSF 1" >>confdefs.h
1665 + if test x"long_double_math_on_this_cpu" = x"yes"; then
1666 + $as_echo "#define HAVE_FINITEL 1" >>confdefs.h
1668 + $as_echo "#define HAVE_HYPOTL 1" >>confdefs.h
1670 + $as_echo "#define HAVE_ISINFL 1" >>confdefs.h
1672 + $as_echo "#define HAVE_ISNANL 1" >>confdefs.h
1674 + fi
1675 + ;;
1677 arm*-*-symbianelf*)
1678 # This is a freestanding configuration; there is nothing to do here.
1680 diff -ruN gcc-4.6.2/libstdc++-v3/configure.ac gcc-4.6.2.aros/libstdc++-v3/configure.ac
1681 --- gcc-4.6.2/libstdc++-v3/configure.ac 2011-10-06 01:09:51.000000000 +0200
1682 +++ gcc-4.6.2.aros/libstdc++-v3/configure.ac 2013-08-26 07:55:42.000000000 +0200
1683 @@ -88,9 +88,9 @@
1684 # up critical shell variables.
1685 GLIBCXX_CONFIGURE
1687 -if test "x${with_newlib}" != "xyes"; then
1688 - AC_LIBTOOL_DLOPEN
1690 +#if test "x${with_newlib}" != "xyes"; then
1691 +# AC_LIBTOOL_DLOPEN
1692 +#fi
1693 AM_PROG_LIBTOOL
1694 ACX_LT_HOST_FLAGS
1695 AC_SUBST(enable_shared)
1696 diff -ruN gcc-4.6.2/libstdc++-v3/configure.host gcc-4.6.2.aros/libstdc++-v3/configure.host
1697 --- gcc-4.6.2/libstdc++-v3/configure.host 2010-12-06 01:50:04.000000000 +0100
1698 +++ gcc-4.6.2.aros/libstdc++-v3/configure.host 2013-08-26 07:55:42.000000000 +0200
1699 @@ -203,6 +203,9 @@
1700 os_include_dir="os/generic"
1701 atomicity_dir="cpu/generic"
1703 + aros*)
1704 + os_include_dir="os/aros"
1705 + ;;
1706 bsd*)
1707 # Plain BSD attempts to share FreeBSD files.
1708 os_include_dir="os/bsd/freebsd"
1709 diff -ruN gcc-4.6.2/libstdc++-v3/crossconfig.m4 gcc-4.6.2.aros/libstdc++-v3/crossconfig.m4
1710 --- gcc-4.6.2/libstdc++-v3/crossconfig.m4 2011-02-04 08:26:57.000000000 +0100
1711 +++ gcc-4.6.2.aros/libstdc++-v3/crossconfig.m4 2013-08-26 07:55:42.000000000 +0200
1712 @@ -5,6 +5,31 @@
1713 AC_DEFUN([GLIBCXX_CROSSCONFIG],[
1714 # Base decisions on target environment.
1715 case "${host}" in
1716 + *-aros*)
1717 + AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h machine/endian.h \
1718 + machine/param.h sys/machine.h sys/types.h fp.h locale.h float.h inttypes.h])
1720 + GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
1721 + GLIBCXX_CHECK_WCHAR_T_SUPPORT
1723 + AC_DEFINE(HAVE_FINITE)
1724 + AC_DEFINE(HAVE_FINITEF)
1725 + AC_DEFINE(HAVE_FREXPF)
1726 + AC_DEFINE(HAVE_HYPOTF)
1727 + AC_DEFINE(HAVE_ISINF)
1728 + AC_DEFINE(HAVE_ISINFF)
1729 + AC_DEFINE(HAVE_ISNAN)
1730 + AC_DEFINE(HAVE_ISNANF)
1731 + AC_DEFINE(HAVE_SINCOS)
1732 + AC_DEFINE(HAVE_SINCOSF)
1733 + if test x"long_double_math_on_this_cpu" = x"yes"; then
1734 + AC_DEFINE(HAVE_FINITEL)
1735 + AC_DEFINE(HAVE_HYPOTL)
1736 + AC_DEFINE(HAVE_ISINFL)
1737 + AC_DEFINE(HAVE_ISNANL)
1738 + fi
1739 + ;;
1741 arm*-*-symbianelf*)
1742 # This is a freestanding configuration; there is nothing to do here.