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
6 noconfigdirs="$noconfigdirs patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl gnuserv"
9 + noconfigdirs="$noconfigdirs patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl tix gnuserv gdb"
12 noconfigdirs="$noconfigdirs tk itcl libgui gdb dejagnu readline"
15 # Build the stage2 and stage3 compilers with -fomit-frame-pointer.
16 host_makefile_frag="config/mh-x86omitfp"
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
28 noconfigdirs="$noconfigdirs patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl gnuserv"
31 + noconfigdirs="$noconfigdirs patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl tix gnuserv gdb"
34 noconfigdirs="$noconfigdirs tk itcl libgui gdb dejagnu readline"
37 # Build the stage2 and stage3 compilers with -fomit-frame-pointer.
38 host_makefile_frag="config/mh-x86omitfp"
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
53 i?86-*-msdosdjgpp* | \
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
64 i?86-*-msdosdjgpp* | \
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
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() \
99 + TARGET_BPABI_CPP_BUILTINS(); \
100 + builtin_define_std ("AROS"); \
101 + builtin_define ("AMIGA"); \
102 + builtin_define ("_AMIGA"); \
103 + builtin_assert ("system=posix"); \
106 + builtin_define ("__PIC__"); \
107 + builtin_define ("__pic__"); \
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
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"
134 +#define TARGET_LINKER_EMULATION "armelf_linux_eabi"
137 +#undef SUBTARGET_EXTRA_LINK_SPEC
138 +#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION
140 +/* Provide a LINK_SPEC appropriate for AROS. */
142 +#define LINK_SPEC "-m armelf_linux_eabi -L %R/lib"
144 +/* Use own supplement to libgcc. */
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
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)
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
180 +#define SIZE_TYPE "long unsigned int"
183 +#define WCHAR_TYPE "char"
185 +#undef WCHAR_TYPE_SIZE
186 +#define WCHAR_TYPE_SIZE 8
189 +#define PTRDIFF_TYPE "long int"
191 +#undef TARGET_OS_CPP_BUILTINS
192 +#define TARGET_OS_CPP_BUILTINS() \
195 + builtin_define_std ("AROS"); \
196 + builtin_define ("AMIGA"); \
197 + builtin_define ("_AMIGA"); \
198 + builtin_define ("__ELF__"); \
199 + builtin_assert ("system=posix"); \
204 +#define ASM_APP_ON "#APP\n"
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. */
223 +#define ENDFILE_SPEC \
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. */
234 +#define CC1_SPEC "%{profile:-p}"
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)"
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} "
249 +/* AROS uses its own collect-like program for the moment. */
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
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)
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)");
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. */
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
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)
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)");
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
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
356 #define PIC_OFFSET_TABLE_REGNUM \
357 (!flag_pic ? INVALID_REGNUM \
358 : reload_completed ? REGNO (pic_offset_table_rtx) \
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
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";
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
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)
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() \
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"); \
437 + builtin_define ("__PIC__"); \
438 + builtin_define ("__pic__"); \
443 +/* This one taken from linux.h. */
444 +/* We are 32-bit all the time, so optimize a little. */
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
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
460 +/*#undef DEFAULT_PCC_STRUCT_RETURN
461 +#define DEFAULT_PCC_STRUCT_RETURN 1
466 +#undef ASM_COMMENT_START
467 +#define ASM_COMMENT_START "#"
472 +#undef DBX_REGISTER_NUMBER
473 +#define DBX_REGISTER_NUMBER(n) \
474 + (TARGET_64BIT ? dbx64_register_map[n] : svr4_dbx_register_map[n])
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
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
503 +#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
506 +#define CC1_SPEC "%(cc1_cpu) %{profile:-p}"
508 +/* Provide a LINK_SPEC appropriate for AROS. */
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)
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) \
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)); \
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) \
546 + if ((SIZE) == 4 && ((ENCODING) & 0x70) == DW_EH_PE_datarel) \
548 + fputs (ASM_LONG, FILE); \
549 + assemble_name (FILE, XSTR (ADDR, 0)); \
550 + fputs (((ENCODING) & DW_EH_PE_indirect ? "@GOT" : "@GOTOFF"), FILE); \
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)
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;
594 + if (cum->stackparm)
597 /* Skip the last named argument. */
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
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
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 ] ; \
635 + mkdir include/aros; chmod a+rx include/aros; \
636 + mkdir include/aros/types; chmod a+rx include/aros/types; \
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; \
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
649 build_install_headers_dir=install-headers-cpio
652 + build_xm_file=xm-aros.h
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
669 + xm_defines='STDC_HEADERS=1'
673 tmake_file="t-libc-ok t-openbsd t-libgcc-pic"
674 case ${enable_threads} in
676 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
677 extra_parts="crtinit.o crtfini.o"
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
687 + need_64bit_hwint=yes
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 @@
694 tmake_file="${tmake_file} i386/t-linux64 i386/t-crtstuff i386/t-crtpc i386/t-crtfm t-dfprules"
697 + tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/i386elf.h aros.h i386/aros.h"
699 + tmake_file="${tmake_file} i386/t-i386elf t-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"
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"
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"
723 m68k-*-elf* | 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"
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"
735 + tmake_file="$tmake_file t-aros"
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
744 out_host_hook_obj=host-hpux.o
745 host_xmake_file="${host_xmake_file} x-hpux"
748 + host_can_use_collect2=no
749 + host_xm_file=xm-aros.h
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
756 +/* Replace AROS' NULL definition with gcc's one */
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
763 +/* Replace AROS' ptrdiff_t definition with gcc's one */
764 +#define __need_ptrdiff_t
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
770 +/* Replace AROS' size_t definition with gcc's one */
771 +#define __need_size_t
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
777 +/* Replace AROS' wchar_t definition with gcc's one */
778 +#define __need_wchar_t
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
784 +/* Replace AROS' wint_t definition with gcc's one */
785 +#define __need_wint_t
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
793 #ifndef _BSD_PTRDIFF_T_
794 +#ifndef _AROS_TYPES_PTRDIFF_T_H
795 #ifndef ___int_ptrdiff_t_h
796 #ifndef _GCC_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__
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 */
818 +#ifndef _AROS_TYPES_SIZE_T_H
819 #ifndef _SIZE_T_DEFINED_
820 #ifndef _SIZE_T_DEFINED
821 #ifndef _BSD_SIZE_T_DEFINED_ /* Darwin */
826 +#define _AROS_TYPES_SIZE_T_H
827 #define _SIZE_T_DEFINED_
828 #define _SIZE_T_DEFINED
829 #define _BSD_SIZE_T_DEFINED_ /* Darwin */
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
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
862 echo "*** Configuration ${host} not supported" 1>&2
864 diff -ruN gcc-4.6.2/libiberty/configure gcc-4.6.2.aros/libiberty/configure
865 --- gcc-4.6.2/libiberty/configure 2010-11-21 04:29:27.000000000 +0100
866 +++ gcc-4.6.2.aros/libiberty/configure 2012-04-14 16:50:17.996003545 +0200
867 @@ -5639,6 +5639,159 @@
871 + # The same goes for AROS
873 + case " $LIBOBJS " in
874 + *" asprintf.$ac_objext "* ) ;;
875 + *) LIBOBJS="$LIBOBJS asprintf.$ac_objext"
879 + case " $LIBOBJS " in
880 + *" basename.$ac_objext "* ) ;;
881 + *) LIBOBJS="$LIBOBJS basename.$ac_objext"
885 + case " $LIBOBJS " in
886 + *" bcmp.$ac_objext "* ) ;;
887 + *) LIBOBJS="$LIBOBJS bcmp.$ac_objext"
891 + case " $LIBOBJS " in
892 + *" bcopy.$ac_objext "* ) ;;
893 + *) LIBOBJS="$LIBOBJS bcopy.$ac_objext"
897 + case " $LIBOBJS " in
898 + *" bzero.$ac_objext "* ) ;;
899 + *) LIBOBJS="$LIBOBJS bzero.$ac_objext"
903 + case " $LIBOBJS " in
904 + *" clock.$ac_objext "* ) ;;
905 + *) LIBOBJS="$LIBOBJS clock.$ac_objext"
909 + case " $LIBOBJS " in
910 + *" ffs.$ac_objext "* ) ;;
911 + *) LIBOBJS="$LIBOBJS ffs.$ac_objext"
915 + case " $LIBOBJS " in
916 + *" getpagesize.$ac_objext "* ) ;;
917 + *) LIBOBJS="$LIBOBJS getpagesize.$ac_objext"
921 + case " $LIBOBJS " in
922 + *" index.$ac_objext "* ) ;;
923 + *) LIBOBJS="$LIBOBJS index.$ac_objext"
927 + case " $LIBOBJS " in
928 + *" insque.$ac_objext "* ) ;;
929 + *) LIBOBJS="$LIBOBJS insque.$ac_objext"
933 + case " $LIBOBJS " in
934 + *" mempcpy.$ac_objext "* ) ;;
935 + *) LIBOBJS="$LIBOBJS mempcpy.$ac_objext"
939 + case " $LIBOBJS " in
940 + *" mkstemps.$ac_objext "* ) ;;
941 + *) LIBOBJS="$LIBOBJS mkstemps.$ac_objext"
945 + case " $LIBOBJS " in
946 + *" random.$ac_objext "* ) ;;
947 + *) LIBOBJS="$LIBOBJS random.$ac_objext"
951 + case " $LIBOBJS " in
952 + *" rindex.$ac_objext "* ) ;;
953 + *) LIBOBJS="$LIBOBJS rindex.$ac_objext"
957 + case " $LIBOBJS " in
958 + *" sigsetmask.$ac_objext "* ) ;;
959 + *) LIBOBJS="$LIBOBJS sigsetmask.$ac_objext"
963 + case " $LIBOBJS " in
964 + *" stpcpy.$ac_objext "* ) ;;
965 + *) LIBOBJS="$LIBOBJS stpcpy.$ac_objext"
969 + case " $LIBOBJS " in
970 + *" stpncpy.$ac_objext "* ) ;;
971 + *) LIBOBJS="$LIBOBJS stpncpy.$ac_objext"
975 + case " $LIBOBJS " in
976 + *" strndup.$ac_objext "* ) ;;
977 + *) LIBOBJS="$LIBOBJS strndup.$ac_objext"
981 + case " $LIBOBJS " in
982 + *" strverscmp.$ac_objext "* ) ;;
983 + *) LIBOBJS="$LIBOBJS strverscmp.$ac_objext"
987 + case " $LIBOBJS " in
988 + *" vasprintf.$ac_objext "* ) ;;
989 + *) LIBOBJS="$LIBOBJS vasprintf.$ac_objext"
993 + case " $LIBOBJS " in
994 + *" waitpid.$ac_objext "* ) ;;
995 + *) LIBOBJS="$LIBOBJS waitpid.$ac_objext"
1000 + for f in $funcs; do
1002 + asprintf | basename | bcmp | bcopy | bzero | clock | ffs | getpagesize | index | insque | mempcpy | mkstemps | random | rindex | sigsetmask | stpcpy | stpncpy | strdup | strndup | strverscmp | vasprintf | waitpid)
1005 + n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1006 + cat >>confdefs.h <<_ACEOF
1014 + # AROS doesnt provide any of the variables in $vars, so we
1015 + # dont have to check them here.
1017 + # Of the functions in $checkfuncs, AROS only has strerror.
1018 + $as_echo "#define HAVE_STRERROR 1" >>confdefs.h
1025 case " $LIBOBJS " in
1026 *" vasprintf.$ac_objext "* ) ;;
1027 @@ -6557,6 +6710,7 @@
1028 *-*-mingw* | *-*-winnt*) pexecute=pex-win32 ;;
1029 *-*-msdosdjgpp*) pexecute=pex-djgpp ;;
1030 *-*-msdos*) pexecute=pex-msdos ;;
1031 + *-*-aros*) pexecute=pex-aros ;;
1032 *) pexecute=pex-unix ;;
1035 diff -ruN gcc-4.6.2/libiberty/configure.ac gcc-4.6.2.aros/libiberty/configure.ac
1036 --- gcc-4.6.2/libiberty/configure.ac 2010-11-21 04:29:27.000000000 +0100
1037 +++ gcc-4.6.2.aros/libiberty/configure.ac 2012-04-14 16:50:17.996003545 +0200
1038 @@ -483,6 +483,50 @@
1042 + # The same goes for AROS
1044 + AC_LIBOBJ([asprintf])
1045 + AC_LIBOBJ([basename])
1047 + AC_LIBOBJ([bcopy])
1048 + AC_LIBOBJ([bzero])
1049 + AC_LIBOBJ([clock])
1051 + AC_LIBOBJ([getpagesize])
1052 + AC_LIBOBJ([index])
1053 + AC_LIBOBJ([insque])
1054 + AC_LIBOBJ([mempcpy])
1055 + AC_LIBOBJ([mkstemps])
1056 + AC_LIBOBJ([random])
1057 + AC_LIBOBJ([rindex])
1058 + AC_LIBOBJ([sigsetmask])
1059 + AC_LIBOBJ([stpcpy])
1060 + AC_LIBOBJ([stpncpy])
1061 + AC_LIBOBJ([strndup])
1062 + AC_LIBOBJ([strverscmp])
1063 + AC_LIBOBJ([vasprintf])
1064 + AC_LIBOBJ([waitpid])
1066 + for f in $funcs; do
1068 + asprintf | basename | bcmp | bcopy | bzero | clock | ffs | getpagesize | index | insque | mempcpy | mkstemps | random | rindex | sigsetmask | stpcpy | stpncpy | strdup | strndup | strverscmp | vasprintf | waitpid)
1071 + n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1072 + AC_DEFINE_UNQUOTED($n)
1077 + # AROS doesnt provide any of the variables in $vars, so we
1078 + # dont have to check them here.
1080 + # Of the functions in $checkfuncs, AROS only has strerror.
1081 + AC_DEFINE(HAVE_STRERROR)
1087 AC_LIBOBJ([vasprintf])
1088 AC_LIBOBJ([vsnprintf])
1090 *-*-mingw* | *-*-winnt*) pexecute=pex-win32 ;;
1091 *-*-msdosdjgpp*) pexecute=pex-djgpp ;;
1092 *-*-msdos*) pexecute=pex-msdos ;;
1093 + *-*-aros*) pexecute=pex-aros ;;
1094 *) pexecute=pex-unix ;;
1097 diff -ruN gcc-4.6.2/libiberty/filename_cmp.c gcc-4.6.2.aros/libiberty/filename_cmp.c
1098 --- gcc-4.6.2/libiberty/filename_cmp.c 2011-02-28 19:23:25.000000000 +0100
1099 +++ gcc-4.6.2.aros/libiberty/filename_cmp.c 2012-04-14 16:50:17.996003545 +0200
1101 filename_cmp (const char *s1, const char *s2)
1103 #ifndef HAVE_DOS_BASED_FILE_SYSTEM
1104 +#ifdef HAVE_CASE_INSENSITIVE_FILE_SYSTEM
1105 + return strcasecmp(s1, s2);
1107 return strcmp(s1, s2);
1112 diff -ruN gcc-4.6.2/libiberty/Makefile.in gcc-4.6.2.aros/libiberty/Makefile.in
1113 --- gcc-4.6.2/libiberty/Makefile.in 2010-11-20 20:37:08.000000000 +0100
1114 +++ gcc-4.6.2.aros/libiberty/Makefile.in 2012-04-14 16:50:17.996003545 +0200
1116 objalloc.c obstack.c \
1117 partition.c pexecute.c \
1118 pex-common.c pex-djgpp.c pex-msdos.c pex-one.c \
1119 - pex-unix.c pex-win32.c \
1120 + pex-unix.c pex-win32.c pex-aros.c \
1121 physmem.c putenv.c \
1122 random.c regex.c rename.c rindex.c \
1123 safe-ctype.c setenv.c setproctitle.c sha1.c sigsetmask.c \
1125 ./mempcpy.$(objext) ./memset.$(objext) ./mkstemps.$(objext) \
1126 ./pex-djgpp.$(objext) ./pex-msdos.$(objext) \
1127 ./pex-unix.$(objext) ./pex-win32.$(objext) \
1128 + ./pex-aros.$(objext) \
1129 ./putenv.$(objext) \
1130 ./random.$(objext) ./rename.$(objext) ./rindex.$(objext) \
1131 ./setenv.$(objext) \
1132 @@ -905,6 +906,13 @@
1134 $(COMPILE.c) $(srcdir)/pexecute.c $(OUTPUT_OPTION)
1136 +./pex-aros.$(objext): $(srcdir)/pex-aros.c config.h $(INCDIR)/ansidecl.h \
1137 + $(INCDIR)/libiberty.h $(srcdir)/pex-common.h
1138 + if [ x"$(PICFLAG)" != x ]; then \
1139 + $(COMPILE.c) $(PICFLAG) $(srcdir)/pex-aros.c -o pic/$@; \
1141 + $(COMPILE.c) $(srcdir)/pex-aros.c $(OUTPUT_OPTION)
1143 ./physmem.$(objext): $(srcdir)/physmem.c config.h $(INCDIR)/ansidecl.h \
1144 $(INCDIR)/libiberty.h
1145 if [ x"$(PICFLAG)" != x ]; then \
1146 diff -ruN gcc-4.6.2/libiberty/pex-aros.c gcc-4.6.2.aros/libiberty/pex-aros.c
1147 --- gcc-4.6.2/libiberty/pex-aros.c 1970-01-01 01:00:00.000000000 +0100
1148 +++ gcc-4.6.2.aros/libiberty/pex-aros.c 2012-04-14 16:50:17.996003545 +0200
1150 +/* Utilities to execute a program in a subprocess (possibly linked by pipes
1151 + with other subprocesses), and wait for it. OS/2 specialization.
1152 + Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003
1153 + Free Software Foundation, Inc.
1155 +This file is part of the libiberty library.
1156 +Libiberty is free software; you can redistribute it and/or
1157 +modify it under the terms of the GNU Library General Public
1158 +License as published by the Free Software Foundation; either
1159 +version 2 of the License, or (at your option) any later version.
1161 +Libiberty is distributed in the hope that it will be useful,
1162 +but WITHOUT ANY WARRANTY; without even the implied warranty of
1163 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1164 +Library General Public License for more details.
1166 +You should have received a copy of the GNU Library General Public
1167 +License along with libiberty; see the file COPYING.LIB. If not,
1168 +write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
1169 +Boston, MA 02111-1307, USA. */
1171 +#include "config.h"
1172 +#include "libiberty.h"
1173 +#include "pex-common.h"
1176 +#include <signal.h>
1178 +#ifdef NEED_DECLARATION_ERRNO
1181 +#ifdef HAVE_STDLIB_H
1182 +#include <stdlib.h>
1184 +#ifdef HAVE_STRING_H
1185 +#include <string.h>
1187 +#ifdef HAVE_UNISTD_H
1188 +#include <unistd.h>
1191 +#include <sys/types.h>
1193 +#ifdef HAVE_FCNTL_H
1196 +#ifdef HAVE_SYS_WAIT_H
1197 +#include <sys/wait.h>
1199 +#ifdef HAVE_GETRUSAGE
1200 +#include <sys/time.h>
1201 +#include <sys/resource.h>
1203 +#ifdef HAVE_SYS_STAT_H
1204 +#include <sys/stat.h>
1207 +#include <process.h>
1210 +static int pex_aros_open_read (struct pex_obj *, const char *, int);
1211 +static int pex_aros_open_write (struct pex_obj *, const char *, int);
1212 +static long pex_aros_exec_child (struct pex_obj *, int, const char *,
1213 + char * const *, char * const *,
1214 + int, int, int, int,
1215 + const char **, int *);
1216 +static int pex_aros_close (struct pex_obj *, int);
1217 +static int pex_aros_wait (struct pex_obj *, long, int *, struct pex_time *,
1218 + int, const char **, int *);
1220 +/* The list of functions we pass to the common routines. */
1222 +const struct pex_funcs funcs =
1224 + pex_aros_open_read,
1225 + pex_aros_open_write,
1226 + pex_aros_exec_child,
1230 + NULL, /* fdopenr */
1231 + NULL, /* fdopenw */
1232 + NULL /* cleanup */
1235 +/* Return a newly initialized pex_obj structure. */
1238 +pex_init (int flags, const char *pname, const char *tempbase)
1240 + /* at the moment we do not support pipes */
1241 + flags &= ~ PEX_USE_PIPES;
1243 + return pex_init_common (flags, pname, tempbase, &funcs);
1246 +/* Open a file for reading. */
1249 +pex_aros_open_read (struct pex_obj *obj ATTRIBUTE_UNUSED, const char *name,
1250 + int binary ATTRIBUTE_UNUSED)
1252 + return open (name, O_RDONLY);
1255 +/* Open a file for writing. */
1258 +pex_aros_open_write (struct pex_obj *obj ATTRIBUTE_UNUSED, const char *name,
1259 + int binary ATTRIBUTE_UNUSED)
1261 + /* Note that we can't use O_EXCL here because gcc may have already
1262 + created the temporary file via make_temp_file. */
1263 + return open (name, O_WRONLY | O_CREAT | O_TRUNC);
1266 +/* Close a file. */
1269 +pex_aros_close (struct pex_obj *obj ATTRIBUTE_UNUSED, int fd)
1271 + return close (fd);
1274 +/* Execute a child. */
1277 +pex_aros_exec_child (struct pex_obj *obj, int flags, const char *executable,
1278 + char * const * argv, char * const * env ATTRIBUTE_UNUSED,
1279 + int in, int out, int errdes,
1280 + int toclose ATTRIBUTE_UNUSED, const char **errmsg, int *err)
1282 + int org_in, org_out, org_errdes;
1290 + if (in != STDIN_FILE_NO)
1292 + org_in = dup (STDIN_FILE_NO);
1299 + if (dup2 (in, STDIN_FILE_NO) < 0)
1305 + if (close (in) < 0)
1308 + *errmsg = "close";
1313 + if (out != STDOUT_FILE_NO)
1315 + org_out = dup (STDOUT_FILE_NO);
1322 + if (dup2 (out, STDOUT_FILE_NO) < 0)
1328 + if (close (out) < 0)
1331 + *errmsg = "close";
1336 + if (errdes != STDERR_FILE_NO
1337 + || (flags & PEX_STDERR_TO_STDOUT) != 0)
1339 + org_errdes = dup (STDERR_FILE_NO);
1340 + if (org_errdes < 0)
1346 + if (dup2 ((flags & PEX_STDERR_TO_STDOUT) != 0 ? STDOUT_FILE_NO : errdes,
1347 + STDERR_FILE_NO) < 0)
1353 + if (errdes != STDERR_FILE_NO)
1355 + if (close (errdes) < 0)
1358 + *errmsg = "close";
1364 + status = (((flags & PEX_SEARCH) != 0 ? spawnvp : spawnv)
1365 + (P_WAIT, executable, (char * const *) argv));
1370 + *errmsg = ((flags & PEX_SEARCH) != 0) ? "spawnvp" : "spawnv";
1373 + if (in != STDIN_FILE_NO)
1375 + if (dup2 (org_in, STDIN_FILE_NO) < 0)
1381 + if (close (org_in) < 0)
1384 + *errmsg = "close";
1389 + if (out != STDOUT_FILE_NO)
1391 + if (dup2 (org_out, STDOUT_FILE_NO) < 0)
1397 + if (close (org_out) < 0)
1400 + *errmsg = "close";
1405 + if (errdes != STDERR_FILE_NO
1406 + || (flags & PEX_STDERR_TO_STDOUT) != 0)
1408 + if (dup2 (org_errdes, STDERR_FILE_NO) < 0)
1414 + if (close (org_errdes) < 0)
1417 + *errmsg = "close";
1422 + /* Save the exit status for later. When we are called, obj->count
1423 + is the number of children which have executed before this
1425 + statuses = (int *) obj->sysdep;
1426 + statuses = XRESIZEVEC (int, statuses, obj->count + 1);
1427 + statuses[obj->count] = status;
1428 + obj->sysdep = (void *) statuses;
1430 + return obj->count;
1433 +/* Wait for a child process to complete. Actually the child process
1434 + has already completed, and we just need to return the exit
1438 +pex_aros_wait (struct pex_obj *obj, long pid, int *status,
1439 + struct pex_time *time, int done ATTRIBUTE_UNUSED,
1440 + const char **errmsg ATTRIBUTE_UNUSED,
1441 + int *err ATTRIBUTE_UNUSED)
1446 + memset (time, 0, sizeof (struct pex_time));
1448 + statuses = (int *) obj->sysdep;
1449 + *status = statuses[pid];
1453 diff -ruN gcc-4.6.2/libobjc/configure gcc-4.6.2.aros/libobjc/configure
1454 --- gcc-4.6.2/libobjc/configure 2011-02-13 12:45:53.000000000 +0100
1455 +++ gcc-4.6.2.aros/libobjc/configure 2012-04-14 16:50:17.996003545 +0200
1456 @@ -11249,215 +11249,7 @@
1460 -# Check if we have thread-local storage
1463 - # Check whether --enable-tls was given.
1464 -if test "${enable_tls+set}" = set; then :
1465 - enableval=$enable_tls;
1466 - case "$enableval" in
1468 - *) as_fn_error "Argument to enable/disable tls must be yes or no" "$LINENO" 5 ;;
1476 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the target supports thread-local storage" >&5
1477 -$as_echo_n "checking whether the target supports thread-local storage... " >&6; }
1478 -if test "${gcc_cv_have_tls+set}" = set; then :
1479 - $as_echo_n "(cached) " >&6
1482 - if test "$cross_compiling" = yes; then :
1483 - if test x$gcc_no_link = xyes; then
1484 - as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
1486 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1487 -/* end confdefs.h. */
1488 -__thread int a; int b; int main() { return a = b; }
1490 -if ac_fn_c_try_link "$LINENO"; then :
1491 - chktls_save_LDFLAGS="$LDFLAGS"
1494 - LDFLAGS="-shared -Wl,--no-undefined $LDFLAGS"
1497 - chktls_save_CFLAGS="$CFLAGS"
1498 - CFLAGS="-fPIC $CFLAGS"
1499 - if test x$gcc_no_link = xyes; then
1500 - as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
1502 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1503 -/* end confdefs.h. */
1504 -int f() { return 0; }
1506 -if ac_fn_c_try_link "$LINENO"; then :
1507 - if test x$gcc_no_link = xyes; then
1508 - as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
1510 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1511 -/* end confdefs.h. */
1512 -__thread int a; int b; int f() { return a = b; }
1514 -if ac_fn_c_try_link "$LINENO"; then :
1515 - gcc_cv_have_tls=yes
1517 - gcc_cv_have_tls=no
1519 -rm -f core conftest.err conftest.$ac_objext \
1520 - conftest$ac_exeext conftest.$ac_ext
1522 - gcc_cv_have_tls=yes
1524 -rm -f core conftest.err conftest.$ac_objext \
1525 - conftest$ac_exeext conftest.$ac_ext
1526 - CFLAGS="$chktls_save_CFLAGS"
1527 - LDFLAGS="$chktls_save_LDFLAGS"
1529 - gcc_cv_have_tls=no
1531 -rm -f core conftest.err conftest.$ac_objext \
1532 - conftest$ac_exeext conftest.$ac_ext
1536 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1537 -/* end confdefs.h. */
1538 -__thread int a; int b; int main() { return a = b; }
1540 -if ac_fn_c_try_run "$LINENO"; then :
1541 - chktls_save_LDFLAGS="$LDFLAGS"
1542 - LDFLAGS="-static $LDFLAGS"
1543 - if test x$gcc_no_link = xyes; then
1544 - as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
1546 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1547 -/* end confdefs.h. */
1548 -int main() { return 0; }
1550 -if ac_fn_c_try_link "$LINENO"; then :
1551 - if test "$cross_compiling" = yes; then :
1552 - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
1553 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1554 -as_fn_error "cannot run test program while cross compiling
1555 -See \`config.log' for more details." "$LINENO" 5; }
1557 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1558 -/* end confdefs.h. */
1559 -__thread int a; int b; int main() { return a = b; }
1561 -if ac_fn_c_try_run "$LINENO"; then :
1562 - gcc_cv_have_tls=yes
1564 - gcc_cv_have_tls=no
1566 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
1567 - conftest.$ac_objext conftest.beam conftest.$ac_ext
1571 - gcc_cv_have_tls=yes
1573 -rm -f core conftest.err conftest.$ac_objext \
1574 - conftest$ac_exeext conftest.$ac_ext
1575 - LDFLAGS="$chktls_save_LDFLAGS"
1576 - if test $gcc_cv_have_tls = yes; then
1577 - chktls_save_CFLAGS="$CFLAGS"
1578 - thread_CFLAGS=failed
1579 - for flag in '' '-pthread' '-lpthread'; do
1580 - CFLAGS="$flag $chktls_save_CFLAGS"
1581 - if test x$gcc_no_link = xyes; then
1582 - as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
1584 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1585 -/* end confdefs.h. */
1586 -#include <pthread.h>
1587 - void *g(void *d) { return NULL; }
1591 -pthread_t t; pthread_create(&t,NULL,g,NULL);
1596 -if ac_fn_c_try_link "$LINENO"; then :
1597 - thread_CFLAGS="$flag"
1599 -rm -f core conftest.err conftest.$ac_objext \
1600 - conftest$ac_exeext conftest.$ac_ext
1601 - if test "X$thread_CFLAGS" != Xfailed; then
1605 - CFLAGS="$chktls_save_CFLAGS"
1606 - if test "X$thread_CFLAGS" != Xfailed; then
1607 - CFLAGS="$thread_CFLAGS $chktls_save_CFLAGS"
1608 - if test "$cross_compiling" = yes; then :
1609 - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
1610 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1611 -as_fn_error "cannot run test program while cross compiling
1612 -See \`config.log' for more details." "$LINENO" 5; }
1614 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1615 -/* end confdefs.h. */
1616 -#include <pthread.h>
1618 - static int *volatile a_in_other_thread;
1620 - thread_func (void *arg)
1622 - a_in_other_thread = &a;
1629 - void *thread_retval;
1630 - int *volatile a_in_main_thread;
1631 - a_in_main_thread = &a;
1632 - if (pthread_create (&thread, (pthread_attr_t *)0,
1633 - thread_func, (void *)0))
1635 - if (pthread_join (thread, &thread_retval))
1637 - return (a_in_other_thread == a_in_main_thread);
1642 -if ac_fn_c_try_run "$LINENO"; then :
1643 - gcc_cv_have_tls=yes
1645 - gcc_cv_have_tls=no
1647 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
1648 - conftest.$ac_objext conftest.beam conftest.$ac_ext
1651 - CFLAGS="$chktls_save_CFLAGS"
1655 - gcc_cv_have_tls=no
1657 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
1658 - conftest.$ac_objext conftest.beam conftest.$ac_ext
1662 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_have_tls" >&5
1663 -$as_echo "$gcc_cv_have_tls" >&6; }
1664 - if test "$enable_tls $gcc_cv_have_tls" = "yes yes"; then
1666 -$as_echo "#define HAVE_TLS 1" >>confdefs.h
1669 +#dnl GCC_ENABLE_TLS
1671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for exception model to use" >&5
1672 $as_echo_n "checking for exception model to use... " >&6; }
1673 diff -ruN gcc-4.6.2/libobjc/configure.ac gcc-4.6.2.aros/libobjc/configure.ac
1674 --- gcc-4.6.2/libobjc/configure.ac 2010-12-06 01:50:04.000000000 +0100
1675 +++ gcc-4.6.2.aros/libobjc/configure.ac 2012-04-14 16:50:17.996003545 +0200
1679 # Check if we have thread-local storage
1683 AC_MSG_CHECKING([for exception model to use])
1685 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
1686 --- gcc-4.6.2/libstdc++-v3/config/os/aros/ctype_base.h 1970-01-01 01:00:00.000000000 +0100
1687 +++ gcc-4.6.2.aros/libstdc++-v3/config/os/aros/ctype_base.h 2012-04-14 16:50:17.996003545 +0200
1689 +namespace std _GLIBCXX_VISIBILITY(default)
1691 +_GLIBCXX_BEGIN_NAMESPACE_VERSION
1693 +struct ctype_base {
1694 + /* Non-standard typedefs */
1695 + typedef int * __to_type;
1697 + /* NB: Offsets into ctype<char>::_M_table force a particular size
1698 + on the mask type. Because of this, we don't use an enum. */
1699 + typedef unsigned short int mask;
1701 + static const mask upper = _ISupper;
1702 + static const mask lower = _ISlower;
1703 + static const mask alpha = _ISalpha;
1704 + static const mask digit = _ISdigit;
1705 + static const mask xdigit = _ISxdigit;
1706 + static const mask space = _ISspace;
1707 + static const mask print = _ISprint;
1708 + static const mask graph = _ISgraph;
1709 + static const mask cntrl = _IScntrl;
1710 + static const mask punct = _ISpunct;
1711 + static const mask alnum = _ISalnum;
1714 +_GLIBCXX_END_NAMESPACE_VERSION
1716 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
1717 --- gcc-4.6.2/libstdc++-v3/config/os/aros/ctype_inline.h 1970-01-01 01:00:00.000000000 +0100
1718 +++ gcc-4.6.2.aros/libstdc++-v3/config/os/aros/ctype_inline.h 2012-04-14 16:50:17.996003545 +0200
1720 +// Locale support -*- C++ -*-
1722 +// Copyright (C) 2000, 2003 Free Software Foundation, Inc.
1724 +// This file is part of the GNU ISO C++ Library. This library is free
1725 +// software; you can redistribute it and/or modify it under the
1726 +// terms of the GNU General Public License as published by the
1727 +// Free Software Foundation; either version 2, or (at your option)
1728 +// any later version.
1730 +// This library is distributed in the hope that it will be useful,
1731 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
1732 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1733 +// GNU General Public License for more details.
1735 +// You should have received a copy of the GNU General Public License along
1736 +// with this library; see the file COPYING. If not, write to the Free
1737 +// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
1740 +// As a special exception, you may use this file as part of a free software
1741 +// library without restriction. Specifically, if other files instantiate
1742 +// templates or use macros or inline functions from this file, or you compile
1743 +// this file and link it with other files to produce an executable, this
1744 +// file does not by itself cause the resulting executable to be covered by
1745 +// the GNU General Public License. This exception does not however
1746 +// invalidate any other reasons why the executable file might be covered by
1747 +// the GNU General Public License.
1749 +/** @file ctype_inline.h
1750 + * This is an internal header file, included by other library headers.
1751 + * You should not attempt to use it directly.
1755 +// ISO C++ 14882: 22.1 Locales
1758 +// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*)
1759 +// functions go in ctype.cc
1761 +// The following definitions are portable, but insanely slow. If one
1762 +// cares at all about performance, then specialized ctype
1763 +// functionality should be added for the native os in question: see
1764 +// the config/os/bits/ctype_*.h files.
1766 +// Constructing a synthetic "C" table should be seriously considered...
1768 +namespace std _GLIBCXX_VISIBILITY(default)
1770 +_GLIBCXX_BEGIN_NAMESPACE_VERSION
1774 + is(mask __m, char __c) const
1777 + return _M_table[static_cast<unsigned char>(__c)] & __m;
1780 + bool __ret = false;
1781 + const size_t __bitmasksize = 15;
1782 + size_t __bitcur = 0; // Lowest bitmask in ctype_base == 0
1783 + for (; __bitcur <= __bitmasksize; ++__bitcur)
1785 + const mask __bit = static_cast<mask>(1 << __bitcur);
1792 + __testis = isspace(__c);
1795 + __testis = isprint(__c);
1798 + __testis = iscntrl(__c);
1801 + __testis = isupper(__c);
1804 + __testis = islower(__c);
1807 + __testis = isalpha(__c);
1810 + __testis = isdigit(__c);
1813 + __testis = ispunct(__c);
1816 + __testis = isxdigit(__c);
1819 + __testis = isalnum(__c);
1822 + __testis = isgraph(__c);
1828 + __ret |= __testis;
1837 + is(const char* __low, const char* __high, mask* __vec) const
1840 + while (__low < __high)
1841 + *__vec++ = _M_table[static_cast<unsigned char>(*__low++)];
1844 + // Highest bitmask in ctype_base == 10.
1845 + const size_t __bitmasksize = 15;
1846 + for (;__low < __high; ++__vec, ++__low)
1849 + // Lowest bitmask in ctype_base == 0
1851 + for (;__i <= __bitmasksize; ++__i)
1853 + const mask __bit = static_cast<mask>(1 << __i);
1854 + if (this->is(__bit, *__low))
1865 + scan_is(mask __m, const char* __low, const char* __high) const
1868 + while (__low < __high
1869 + && !(_M_table[static_cast<unsigned char>(*__low)] & __m))
1872 + while (__low < __high && !this->is(__m, *__low))
1879 + scan_not(mask __m, const char* __low, const char* __high) const
1882 + while (__low < __high
1883 + && (_M_table[static_cast<unsigned char>(*__low)] & __m) != 0)
1886 + while (__low < __high && this->is(__m, *__low) != 0)
1891 +_GLIBCXX_END_NAMESPACE_VERSION
1893 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
1894 --- gcc-4.6.2/libstdc++-v3/config/os/aros/ctype_noninline.h 1970-01-01 01:00:00.000000000 +0100
1895 +++ gcc-4.6.2.aros/libstdc++-v3/config/os/aros/ctype_noninline.h 2012-04-14 16:50:17.996003545 +0200
1897 + const ctype_base::mask*
1898 + ctype<char>::classic_table() throw()
1899 + { return __ctype_b; }
1901 + ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
1903 + : facet(__refs), _M_del(__table != 0 && __del),
1904 + _M_toupper(NULL), _M_tolower(NULL),
1905 + _M_table(__table ? __table : classic_table())
1907 + memset(_M_widen, 0, sizeof(_M_widen));
1909 + memset(_M_narrow, 0, sizeof(_M_narrow));
1913 + ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
1914 + : facet(__refs), _M_del(__table != 0 && __del),
1915 + _M_toupper(NULL), _M_tolower(NULL),
1916 + _M_table(__table ? __table : classic_table())
1918 + memset(_M_widen, 0, sizeof(_M_widen));
1920 + memset(_M_narrow, 0, sizeof(_M_narrow));
1925 + ctype<char>::do_toupper(char __c) const
1926 + { return ::toupper((int) __c); }
1929 + ctype<char>::do_toupper(char* __low, const char* __high) const
1931 + while (__low < __high)
1933 + *__low = ::toupper((int) *__low);
1940 + ctype<char>::do_tolower(char __c) const
1941 + { return ::tolower((int) __c); }
1944 + ctype<char>::do_tolower(char* __low, const char* __high) const
1946 + while (__low < __high)
1948 + *__low = ::tolower((int) *__low);
1953 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
1954 --- gcc-4.6.2/libstdc++-v3/config/os/aros/os_defines.h 1970-01-01 01:00:00.000000000 +0100
1955 +++ gcc-4.6.2.aros/libstdc++-v3/config/os/aros/os_defines.h 2012-04-14 16:50:17.996003545 +0200
1957 +#ifndef _GLIBCXX_OS_DEFINES
1958 +#define _GLIBCXX_OS_DEFINES
1960 +#define __off64_t off_t
1963 diff -ruN gcc-4.6.2/libstdc++-v3/configure gcc-4.6.2.aros/libstdc++-v3/configure
1964 --- gcc-4.6.2/libstdc++-v3/configure 2011-10-06 01:09:51.000000000 +0200
1965 +++ gcc-4.6.2.aros/libstdc++-v3/configure 2012-04-14 16:50:17.996003545 +0200
1966 @@ -5267,12 +5267,9 @@
1970 -if test "x${with_newlib}" != "xyes"; then
1976 +#if test "x${with_newlib}" != "xyes"; then
1977 +# AC_LIBTOOL_DLOPEN
1981 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
1982 @@ -7990,6 +7987,8 @@
1991 @@ -26484,6 +26483,58 @@
1993 # Base decisions on target environment.
1996 + for ac_header in nan.h ieeefp.h endian.h sys/isa_defs.h machine/endian.h \
1997 + machine/param.h sys/machine.h sys/types.h fp.h locale.h float.h inttypes.h
1999 + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
2000 +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
2001 +eval as_val=\$$as_ac_Header
2002 + if test "x$as_val" = x""yes; then :
2003 + cat >>confdefs.h <<_ACEOF
2004 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
2012 + GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
2013 + GLIBCXX_CHECK_WCHAR_T_SUPPORT
2015 + $as_echo "#define HAVE_FINITE 1" >>confdefs.h
2017 + $as_echo "#define HAVE_FINITEF 1" >>confdefs.h
2019 + $as_echo "#define HAVE_FREXPF 1" >>confdefs.h
2021 + $as_echo "#define HAVE_HYPOTF 1" >>confdefs.h
2023 + $as_echo "#define HAVE_ISINF 1" >>confdefs.h
2025 + $as_echo "#define HAVE_ISINFF 1" >>confdefs.h
2027 + $as_echo "#define HAVE_ISNAN 1" >>confdefs.h
2029 + $as_echo "#define HAVE_ISNANF 1" >>confdefs.h
2031 + $as_echo "#define HAVE_SINCOS 1" >>confdefs.h
2033 + $as_echo "#define HAVE_SINCOSF 1" >>confdefs.h
2035 + if test x"long_double_math_on_this_cpu" = x"yes"; then
2036 + $as_echo "#define HAVE_FINITEL 1" >>confdefs.h
2038 + $as_echo "#define HAVE_HYPOTL 1" >>confdefs.h
2040 + $as_echo "#define HAVE_ISINFL 1" >>confdefs.h
2042 + $as_echo "#define HAVE_ISNANL 1" >>confdefs.h
2048 # This is a freestanding configuration; there is nothing to do here.
2050 diff -ruN gcc-4.6.2/libstdc++-v3/configure.ac gcc-4.6.2.aros/libstdc++-v3/configure.ac
2051 --- gcc-4.6.2/libstdc++-v3/configure.ac 2011-10-06 01:09:51.000000000 +0200
2052 +++ gcc-4.6.2.aros/libstdc++-v3/configure.ac 2012-04-14 16:50:17.996003545 +0200
2054 # up critical shell variables.
2057 -if test "x${with_newlib}" != "xyes"; then
2060 +#if test "x${with_newlib}" != "xyes"; then
2061 +# AC_LIBTOOL_DLOPEN
2065 AC_SUBST(enable_shared)
2066 diff -ruN gcc-4.6.2/libstdc++-v3/configure.host gcc-4.6.2.aros/libstdc++-v3/configure.host
2067 --- gcc-4.6.2/libstdc++-v3/configure.host 2010-12-06 01:50:04.000000000 +0100
2068 +++ gcc-4.6.2.aros/libstdc++-v3/configure.host 2012-04-14 16:50:17.996003545 +0200
2070 os_include_dir="os/generic"
2071 atomicity_dir="cpu/generic"
2074 + os_include_dir="os/aros"
2077 # Plain BSD attempts to share FreeBSD files.
2078 os_include_dir="os/bsd/freebsd"
2079 diff -ruN gcc-4.6.2/libstdc++-v3/crossconfig.m4 gcc-4.6.2.aros/libstdc++-v3/crossconfig.m4
2080 --- gcc-4.6.2/libstdc++-v3/crossconfig.m4 2011-02-04 08:26:57.000000000 +0100
2081 +++ gcc-4.6.2.aros/libstdc++-v3/crossconfig.m4 2012-04-14 16:50:17.996003545 +0200
2083 AC_DEFUN([GLIBCXX_CROSSCONFIG],[
2084 # Base decisions on target environment.
2087 + AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h machine/endian.h \
2088 + machine/param.h sys/machine.h sys/types.h fp.h locale.h float.h inttypes.h])
2090 + GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
2091 + GLIBCXX_CHECK_WCHAR_T_SUPPORT
2093 + AC_DEFINE(HAVE_FINITE)
2094 + AC_DEFINE(HAVE_FINITEF)
2095 + AC_DEFINE(HAVE_FREXPF)
2096 + AC_DEFINE(HAVE_HYPOTF)
2097 + AC_DEFINE(HAVE_ISINF)
2098 + AC_DEFINE(HAVE_ISINFF)
2099 + AC_DEFINE(HAVE_ISNAN)
2100 + AC_DEFINE(HAVE_ISNANF)
2101 + AC_DEFINE(HAVE_SINCOS)
2102 + AC_DEFINE(HAVE_SINCOSF)
2103 + if test x"long_double_math_on_this_cpu" = x"yes"; then
2104 + AC_DEFINE(HAVE_FINITEL)
2105 + AC_DEFINE(HAVE_HYPOTL)
2106 + AC_DEFINE(HAVE_ISINFL)
2107 + AC_DEFINE(HAVE_ISNANL)
2112 # This is a freestanding configuration; there is nothing to do here.
2114 diff -ruN gcc-4.6.2/libcpp/configure gcc-4.6.2.aros/libcpp/configure
2115 --- gcc-4.6.2/libcpp/configure 2011-10-26 11:30:24.000000000 +0200
2116 +++ gcc-4.6.2.aros/libcpp/configure 2012-07-04 18:36:53.274313088 +0200
2117 @@ -7091,6 +7091,7 @@
2120 arm*-*-symbianelf* | \
2125 diff -ruN gcc-4.6.2/libcpp/configure.ac gcc-4.6.2.aros/libcpp/configure.ac
2126 --- gcc-4.6.2/libcpp/configure.ac 2010-11-18 08:35:34.000000000 +0100
2127 +++ gcc-4.6.2.aros/libcpp/configure.ac 2012-07-04 18:37:11.315102148 +0200
2131 arm*-*-symbianelf* | \
2136 diff -ruN gcc-4.6.2/gcc/config/m68k/t-aros gcc-4.6.2.aros/gcc/config/m68k/t-aros
2138 +++ gcc-4.6.2.aros/gcc/config/m68k/t-aros
2140 +# Custom multilibs for AROS
2141 +M68K_MLIB_CPU += && match(MLIB, "^68")
2142 diff -ruN gcc-4.6.2/gcc/gengtype.c gcc-4.6.2.aros/gcc/gengtype.c
2143 --- gcc-4.6.2/gcc/gengtype.c 2011-06-27 22:54:59.000000000 +0200
2144 +++ gcc-4.6.2.aros/gcc/gengtype.c 2012-11-28 16:50:17.996003545 +0200
2145 @@ -3594,13 +3594,13 @@ write_field_root (outf_p f, pair_p v, type_p type, const char *name,
2146 int has_length, struct fileloc *line, const char *if_marked,
2147 bool emit_pch, type_p field_type, const char *field_name)
2150 /* If the field reference is relative to V, rather than to some
2151 subcomponent of V, we can mark any subarrays with a single stride.
2152 We're effectively treating the field as a global variable in its
2154 if (v && type == v->type)
2159 newv.type = field_type;