use struct timeval to obtain the cputime. disable display atm until the code is corre...
[AROS.git] / tools / crosstools / gcc-4.6.4-aros.diff
blob9a3b4cbdf1d4704490db4b3ec646fab970d249a1
1 diff -ruN gcc-4.6.4/boehm-gc/include/gc_amiga_redirects.h gcc-4.6.4.aros/boehm-gc/include/gc_amiga_redirects.h
2 --- gcc-4.6.4/boehm-gc/include/gc_amiga_redirects.h 2001-08-17 19:30:51.000000000 +0100
3 +++ gcc-4.6.4.aros/boehm-gc/include/gc_amiga_redirects.h 2015-02-11 11:45:43.241323342 +0000
4 @@ -2,7 +2,7 @@
6 # define GC_AMIGA_REDIRECTS_H
8 -# if ( defined(_AMIGA) && !defined(GC_AMIGA_MAKINGLIB) )
9 +# if !defined(__AROS__) && ( defined(_AMIGA) && !defined(GC_AMIGA_MAKINGLIB) )
10 extern void *GC_amiga_realloc(void *old_object,size_t new_size_in_bytes);
11 # define GC_realloc(a,b) GC_amiga_realloc(a,b)
12 extern void GC_amiga_set_toany(void (*func)(void));
13 diff -ruN gcc-4.6.4/boehm-gc/include/gc.h gcc-4.6.4.aros/boehm-gc/include/gc.h
14 --- gcc-4.6.4/boehm-gc/include/gc.h 2007-04-23 22:10:09.000000000 +0100
15 +++ gcc-4.6.4.aros/boehm-gc/include/gc.h 2015-02-11 11:46:03.341530940 +0000
16 @@ -1063,7 +1063,7 @@
17 GC_API void GC_win32_free_heap ();
18 #endif
20 -#if ( defined(_AMIGA) && !defined(GC_AMIGA_MAKINGLIB) )
21 +#if !defined(__AROS__) && ( defined(_AMIGA) && !defined(GC_AMIGA_MAKINGLIB) )
22 /* Allocation really goes through GC_amiga_allocwrapper_do */
23 # include "gc_amiga_redirects.h"
24 #endif
25 diff -ruN gcc-4.6.4/configure gcc-4.6.4.aros/configure
26 --- gcc-4.6.4/configure 2011-12-18 10:03:44.000000000 +0000
27 +++ gcc-4.6.4.aros/configure 2015-02-11 11:43:43.826090922 +0000
28 @@ -2997,6 +2997,9 @@
29 ppc*-*-pe)
30 noconfigdirs="$noconfigdirs patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl gnuserv"
32 + *-*-aros*)
33 + noconfigdirs="$noconfigdirs patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl tix gnuserv gdb"
34 + ;;
35 powerpc-*-beos*)
36 noconfigdirs="$noconfigdirs tk itcl libgui gdb dejagnu readline"
38 @@ -3810,6 +3813,8 @@
39 # Build the stage2 and stage3 compilers with -fomit-frame-pointer.
40 host_makefile_frag="config/mh-x86omitfp"
42 + *-*-aros*)
43 + ;;
44 esac
47 diff -ruN gcc-4.6.4/configure.ac gcc-4.6.4.aros/configure.ac
48 --- gcc-4.6.4/configure.ac 2011-11-18 11:45:44.000000000 +0000
49 +++ gcc-4.6.4.aros/configure.ac 2015-02-11 11:43:43.826090922 +0000
50 @@ -453,6 +453,9 @@
51 ppc*-*-pe)
52 noconfigdirs="$noconfigdirs patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl gnuserv"
54 + *-*-aros*)
55 + noconfigdirs="$noconfigdirs patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl tix gnuserv gdb"
56 + ;;
57 powerpc-*-beos*)
58 noconfigdirs="$noconfigdirs tk itcl libgui gdb dejagnu readline"
60 @@ -1237,6 +1240,8 @@
61 # Build the stage2 and stage3 compilers with -fomit-frame-pointer.
62 host_makefile_frag="config/mh-x86omitfp"
64 + *-*-aros*)
65 + ;;
66 esac
69 diff -ruN gcc-4.6.4/fixincludes/configure gcc-4.6.4.aros/fixincludes/configure
70 --- gcc-4.6.4/fixincludes/configure 2010-06-03 07:45:02.000000000 +0100
71 +++ gcc-4.6.4.aros/fixincludes/configure 2015-02-11 11:43:43.826090922 +0000
72 @@ -4245,6 +4245,7 @@
74 else
75 case $host in
76 + *-*-aros* | \
77 i?86-*-msdosdjgpp* | \
78 i?86-*-mingw32* | \
79 x86_64-*-mingw32* | \
80 diff -ruN gcc-4.6.4/fixincludes/configure.ac gcc-4.6.4.aros/fixincludes/configure.ac
81 --- gcc-4.6.4/fixincludes/configure.ac 2010-06-03 07:45:02.000000000 +0100
82 +++ gcc-4.6.4.aros/fixincludes/configure.ac 2015-02-11 11:43:43.826090922 +0000
83 @@ -49,6 +49,7 @@
84 TARGET=oneprocess
85 fi],
86 [case $host in
87 + *-*-aros* | \
88 i?86-*-msdosdjgpp* | \
89 i?86-*-mingw32* | \
90 x86_64-*-mingw32* | \
91 diff -ruN gcc-4.6.4/gcc/config/arm/aros.h gcc-4.6.4.aros/gcc/config/arm/aros.h
92 --- gcc-4.6.4/gcc/config/arm/aros.h 1970-01-01 01:00:00.000000000 +0100
93 +++ gcc-4.6.4.aros/gcc/config/arm/aros.h 2015-02-11 11:43:43.826090922 +0000
94 @@ -0,0 +1,82 @@
95 +/* Configuration file for ARM AROS EABI targets.
96 + Copyright (C) 2004, 2005, 2006, 2007, 2010
97 + Free Software Foundation, Inc.
98 + Contributed by Pavel Fedin
99 + Based on linux-eabi.h and other AROS targets
101 + This file is part of GCC.
103 + GCC is free software; you can redistribute it and/or modify it
104 + under the terms of the GNU General Public License as published
105 + by the Free Software Foundation; either version 3, or (at your
106 + option) any later version.
108 + GCC is distributed in the hope that it will be useful, but WITHOUT
109 + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
110 + or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
111 + License for more details.
113 + You should have received a copy of the GNU General Public License
114 + along with GCC; see the file COPYING3. If not see
115 + <http://www.gnu.org/licenses/>. */
117 +/* On EABI GNU/Linux, we want both the BPABI builtins and the
118 + GNU/Linux builtins. */
119 +#undef TARGET_OS_CPP_BUILTINS
120 +#define TARGET_OS_CPP_BUILTINS() \
121 + do \
122 + { \
123 + TARGET_BPABI_CPP_BUILTINS(); \
124 + builtin_define_std ("AROS"); \
125 + builtin_define ("AMIGA"); \
126 + builtin_define ("_AMIGA"); \
127 + builtin_assert ("system=posix"); \
128 + if (flag_pic) \
129 + { \
130 + builtin_define ("__PIC__"); \
131 + builtin_define ("__pic__"); \
132 + } \
133 + } \
134 + while (false)
136 +/* We default to a softfp ABI so that we are compatible
137 + with the Linux EABI (as used by the linker). */
138 +#undef TARGET_DEFAULT_FLOAT_ABI
139 +#define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_SOFTFP
141 +/* We default to the "aapcs-linux" ABI so that enums are int-sized by
142 + default. */
143 +#undef ARM_DEFAULT_ABI
144 +#define ARM_DEFAULT_ABI ARM_ABI_AAPCS_LINUX
146 +/* Default to armv5t so that thumb shared libraries work.
147 + The ARM10TDMI core is the default for armv5t, so set
148 + SUBTARGET_CPU_DEFAULT to achieve this. */
149 +#undef SUBTARGET_CPU_DEFAULT
150 +#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
152 +/* TARGET_BIG_ENDIAN_DEFAULT is set in
153 + config.gcc for big endian configurations. */
154 +#undef TARGET_LINKER_EMULATION
155 +#if TARGET_BIG_ENDIAN_DEFAULT
156 +#define TARGET_LINKER_EMULATION "armelfb_aros"
157 +#else
158 +#define TARGET_LINKER_EMULATION "armelf_aros"
159 +#endif
161 +#undef SUBTARGET_CPP_SPEC
162 +#define SUBTARGET_CPP_SPEC "-D__ELF__ %{!nostdinc:%{!nostdc:%{!noposixc:-isystem %R/include/aros/posixc} -isystem %R/include/aros/stdc}}"
164 +#undef SUBTARGET_EXTRA_LINK_SPEC
165 +#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION
167 +/* Provide a LINK_SPEC appropriate for AROS. */
168 +#undef LINK_SPEC
169 +#define LINK_SPEC "-m armelf_aros -L %R/lib"
171 +/* Use own supplement to libgcc. */
172 +#undef LIBGCC_SPEC
173 +#define LIBGCC_SPEC "-laeabi -lgcc"
175 +/* FIXME: AROS doesn't support dw2 unwinding yet. */
176 +#undef MD_FALLBACK_FRAME_STATE_FOR
177 diff -ruN gcc-4.6.4/gcc/config/arm/t-aros gcc-4.6.4.aros/gcc/config/arm/t-aros
178 --- gcc-4.6.4/gcc/config/arm/t-aros 1970-01-01 01:00:00.000000000 +0100
179 +++ gcc-4.6.4.aros/gcc/config/arm/t-aros 2015-02-11 11:43:43.826090922 +0000
180 @@ -0,0 +1,21 @@
181 +# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
182 +# 2008, 2010 Free Software Foundation, Inc.
184 +# This file is part of GCC.
186 +# GCC is free software; you can redistribute it and/or modify
187 +# it under the terms of the GNU General Public License as published by
188 +# the Free Software Foundation; either version 3, or (at your option)
189 +# any later version.
191 +# GCC is distributed in the hope that it will be useful,
192 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
193 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
194 +# GNU General Public License for more details.
196 +# You should have received a copy of the GNU General Public License
197 +# along with GCC; see the file COPYING3. If not see
198 +# <http://www.gnu.org/licenses/>.
200 +MULTILIB_OPTIONS = marm mfloat-abi=hard
201 +MULTILIB_DIRNAMES = arm fpu
202 diff -ruN gcc-4.6.4/gcc/config/arm/unwind-arm.c gcc-4.6.4.aros/gcc/config/arm/unwind-arm.c
203 --- gcc-4.6.4/gcc/config/arm/unwind-arm.c 2009-10-30 14:55:10.000000000 +0000
204 +++ gcc-4.6.4.aros/gcc/config/arm/unwind-arm.c 2015-02-11 11:43:43.826090922 +0000
205 @@ -40,8 +40,10 @@
206 bool is_reference,
207 void **matched_object);
209 +#if !defined(__AROS__)
210 _Unwind_Ptr __attribute__((weak))
211 __gnu_Unwind_Find_exidx (_Unwind_Ptr, int *);
212 +#endif
214 /* Misc constants. */
215 #define R_IP 12
216 @@ -598,6 +600,7 @@
217 instruction itself. */
218 return_address -= 2;
220 +#if !defined(__AROS__)
221 if (__gnu_Unwind_Find_exidx)
223 eitp = (const __EIT_entry *) __gnu_Unwind_Find_exidx (return_address,
224 @@ -609,6 +612,7 @@
227 else
228 +#endif
230 eitp = &__exidx_start;
231 nrec = &__exidx_end - &__exidx_start;
232 diff -ruN gcc-4.6.4/gcc/config/aros.h gcc-4.6.4.aros/gcc/config/aros.h
233 --- gcc-4.6.4/gcc/config/aros.h 1970-01-01 01:00:00.000000000 +0100
234 +++ gcc-4.6.4.aros/gcc/config/aros.h 2015-02-11 11:43:43.826090922 +0000
235 @@ -0,0 +1,113 @@
236 +/* Definitions for AROS
237 + Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
238 + Contributed by Fabio Alemagna
239 + Based upon linux.h, contributed by Eric Youngdale.
241 +This file is part of GNU CC.
243 +GNU CC is free software; you can redistribute it and/or modify
244 +it under the terms of the GNU General Public License as published by
245 +the Free Software Foundation; either version 2, or (at your option)
246 +any later version.
248 +GNU CC is distributed in the hope that it will be useful,
249 +but WITHOUT ANY WARRANTY; without even the implied warranty of
250 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
251 +GNU General Public License for more details.
253 +You should have received a copy of the GNU General Public License
254 +along with GNU CC; see the file COPYING. If not, write to
255 +the Free Software Foundation, 59 Temple Place - Suite 330,
256 +Boston, MA 02111-1307, USA. */
258 +/* Don't assume anything about the header files. */
259 +#define NO_IMPLICIT_EXTERN_C
261 +#undef SIZE_TYPE
262 +#define SIZE_TYPE "long unsigned int"
264 +#undef WCHAR_TYPE
265 +#define WCHAR_TYPE "char"
267 +#undef WCHAR_TYPE_SIZE
268 +#define WCHAR_TYPE_SIZE 8
270 +#undef PTRDIFF_TYPE
271 +#define PTRDIFF_TYPE "long int"
273 +#undef TARGET_OS_CPP_BUILTINS
274 +#define TARGET_OS_CPP_BUILTINS() \
275 + do \
276 + { \
277 + builtin_define_std ("AROS"); \
278 + builtin_define ("AMIGA"); \
279 + builtin_define ("_AMIGA"); \
280 + builtin_define ("__ELF__"); \
281 + builtin_assert ("system=posix"); \
282 + } \
283 + while (0)
285 +#undef ASM_APP_ON
286 +#define ASM_APP_ON "#APP\n"
288 +#undef ASM_APP_OFF
289 +#define ASM_APP_OFF "#NO_APP\n"
291 +#undef MD_EXEC_PREFIX
292 +#undef MD_STARTFILE_PREFIX
294 +/* Provide a STARTFILE_SPEC appropriate for AROS. AROS has its own
295 + set of startup files which also take care of handling C++
296 + constructors/destructors. */
298 +#undef STARTFILE_SPEC
299 +#define STARTFILE_SPEC \
300 + "startup.o%s %{detach:detach.o%s} %{nix:nixmain.o%s}"
302 +/* Provide a ENDFILE_SPEC appropriate for AROS. */
304 +#undef ENDFILE_SPEC
305 +#define ENDFILE_SPEC \
306 + "-lautoinit"
308 +#undef STANDARD_INCLUDE_DIR
309 +#define STANDARD_INCLUDE_DIR "/include"
311 +/* The compiler is configured with ONLY the gcc/g++ standard headers.
312 + N.B-: STANDARD_INCLUDE_DIR must come before GCC_INCLUDE_DIR on AROS */
313 +#undef INCLUDE_DEFAULTS
314 +#define INCLUDE_DEFAULTS \
315 +{ \
316 + { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, 0, 0 }, \
317 + { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, 0, 1 }, \
318 + { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, 0, 0 }, \
319 + { STANDARD_INCLUDE_DIR, STANDARD_INCLUDE_COMPONENT, 0, 0, 1, 0 }, \
320 + { GCC_INCLUDE_DIR, "GCC", 0, 0, 0, 0 }, \
321 + { 0, 0, 0, 0, 0, 0 } \
324 +#undef CPP_SPEC
325 +#define CPP_SPEC "%(cpp_cpu) %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT} %{nix:-D__NIX__} %{!nostdinc:%{!nostdc:%{!noposixc:-isystem %R/include/aros/posixc} -isystem %R/include/aros/stdc} -isystem %R/include}"
327 +/* This is for -profile to use -lc_p instead of -lc. */
328 +#ifndef CC1_SPEC
329 +#define CC1_SPEC "%{profile:-p}"
330 +#endif
332 +/* The GNU C++ standard library requires that these macros be defined. */
333 +#undef CPLUSPLUS_CPP_SPEC
334 +#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
336 +#undef LIB_SPEC
337 +#define LIB_SPEC \
338 + "--start-group -lmui -larossupport -lamiga %{!nostartfiles:%{!static:%{!nostdc:%{!noposixc:-lposixc} -lstdcio -lstdc}}%{static:%{!nostdc:-lstdc.static}}} -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 %{nostartfiles:%{static:-lstdc.static}} --end-group"
340 +#if !defined(USE_GNULIBC_1) && defined(HAVE_LD_EH_FRAME_HDR)
341 +#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
342 +#endif
344 +/* AROS uses its own collect-like program for the moment. */
345 +#undef LINKER_NAME
346 +#define LINKER_NAME "collect-aros"
348 +#define TARGET_HAS_F_SETLKW
349 diff -ruN gcc-4.6.4/gcc/config/i386/aros64.h gcc-4.6.4.aros/gcc/config/i386/aros64.h
350 --- gcc-4.6.4/gcc/config/i386/aros64.h 1970-01-01 01:00:00.000000000 +0100
351 +++ gcc-4.6.4.aros/gcc/config/i386/aros64.h 2015-02-11 11:43:43.826090922 +0000
352 @@ -0,0 +1,40 @@
353 +/* Definitions for AMD x86_64 running AROS systems with ELF64 format.
354 + Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002
355 + Free Software Foundation, Inc.
356 + Contributed by Stanislaw Szymczyk <sszymczy@gmail.com>. Based on aros.h.
358 +This file is part of GNU CC.
360 +GNU CC is free software; you can redistribute it and/or modify
361 +it under the terms of the GNU General Public License as published by
362 +the Free Software Foundation; either version 2, or (at your option)
363 +any later version.
365 +GNU CC is distributed in the hope that it will be useful,
366 +but WITHOUT ANY WARRANTY; without even the implied warranty of
367 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
368 +GNU General Public License for more details.
370 +You should have received a copy of the GNU General Public License
371 +along with GNU CC; see the file COPYING. If not, write to
372 +the Free Software Foundation, 59 Temple Place - Suite 330,
373 +Boston, MA 02111-1307, USA. */
375 +/* Output at beginning of assembler file. */
376 +/* The .file command should always begin the output. */
378 +#undef TARGET_VERSION
379 +#define TARGET_VERSION fprintf (stderr, " (x86_64 AROS/ELF)");
381 +/* The svr4 ABI for the i386 says that records and unions are returned
382 + in memory. In the 64bit compilation we will turn this flag off in
383 + override_options, as we never do pcc_struct_return scheme on this target. */
384 +#undef DEFAULT_PCC_STRUCT_RETURN
385 +#define DEFAULT_PCC_STRUCT_RETURN 1
387 +/* Provide a LINK_SPEC appropriate for AROS. */
389 +#undef LINK_SPEC
390 +#define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} -L %R/lib"
392 +/* FIXME: AROS doesn't support dw2 unwinding yet. */
393 diff -ruN gcc-4.6.4/gcc/config/i386/aros.h gcc-4.6.4.aros/gcc/config/i386/aros.h
394 --- gcc-4.6.4/gcc/config/i386/aros.h 1970-01-01 01:00:00.000000000 +0100
395 +++ gcc-4.6.4.aros/gcc/config/i386/aros.h 2015-02-11 11:43:43.826090922 +0000
396 @@ -0,0 +1,28 @@
397 +/* Definitions for Intel 386 running AROS systems with ELF format.
398 + Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002
399 + Free Software Foundation, Inc.
400 + Contributed by Fabio Alemagna.
401 + Based upon i386/linux.h by Eric Youngdale.
403 +This file is part of GNU CC.
405 +GNU CC is free software; you can redistribute it and/or modify
406 +it under the terms of the GNU General Public License as published by
407 +the Free Software Foundation; either version 2, or (at your option)
408 +any later version.
410 +GNU CC is distributed in the hope that it will be useful,
411 +but WITHOUT ANY WARRANTY; without even the implied warranty of
412 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
413 +GNU General Public License for more details.
415 +You should have received a copy of the GNU General Public License
416 +along with GNU CC; see the file COPYING. If not, write to
417 +the Free Software Foundation, 59 Temple Place - Suite 330,
418 +Boston, MA 02111-1307, USA. */
420 +#undef TARGET_VERSION
421 +#define TARGET_VERSION fprintf (stderr, " (i386 AROS/ELF)");
423 +#undef LINK_SPEC
424 +#define LINK_SPEC "-m elf_i386 -L%R/lib"
425 diff -ruN gcc-4.6.4/gcc/config/m68k/m68k.c gcc-4.6.4.aros/gcc/config/m68k/m68k.c
426 --- gcc-4.6.4/gcc/config/m68k/m68k.c 2011-07-31 16:09:25.000000000 +0100
427 +++ gcc-4.6.4.aros/gcc/config/m68k/m68k.c 2015-02-11 11:43:43.826090922 +0000
428 @@ -4522,7 +4522,7 @@
429 else if (letter == '/')
430 asm_fprintf (file, "%R");
431 else if (letter == '?')
432 - asm_fprintf (file, m68k_library_id_string);
433 + asm_fprintf (file, "%s", m68k_library_id_string);
434 else if (letter == 'p')
436 output_addr_const (file, op);
437 diff -ruN gcc-4.6.4/gcc/config/m68k/m68k.h gcc-4.6.4.aros/gcc/config/m68k/m68k.h
438 --- gcc-4.6.4/gcc/config/m68k/m68k.h 2010-11-22 01:57:50.000000000 +0000
439 +++ gcc-4.6.4.aros/gcc/config/m68k/m68k.h 2015-02-11 11:43:43.826090922 +0000
440 @@ -342,7 +342,9 @@
441 register elimination. */
442 #define FIRST_PSEUDO_REGISTER 25
444 -/* All m68k targets (except AmigaOS) use %a5 as the PIC register */
445 +/* All m68k targets (except AmigaOS) use %a5 as the PIC register.
446 + * On AmigaOS, we use %a4
447 + */
448 #define PIC_OFFSET_TABLE_REGNUM \
449 (!flag_pic ? INVALID_REGNUM \
450 : reload_completed ? REGNO (pic_offset_table_rtx) \
451 @@ -432,7 +434,8 @@
452 /* Most m68k targets use %a6 as a frame pointer. The AmigaOS
453 ABI uses %a6 for shared library calls, therefore the frame
454 pointer is shifted to %a5 on this target. */
455 -#define FRAME_POINTER_REGNUM A6_REG
456 +#define FRAME_POINTER_REGNUM A5_REG
457 +#define PIC_REG A4_REG
459 /* Base register for access to arguments of the function.
460 * This isn't a hardware register. It will be eliminated to the
461 diff -ruN gcc-4.6.4/gcc/config/m68k/m68k.md gcc-4.6.4.aros/gcc/config/m68k/m68k.md
462 --- gcc-4.6.4/gcc/config/m68k/m68k.md 2009-12-30 23:03:46.000000000 +0000
463 +++ gcc-4.6.4.aros/gcc/config/m68k/m68k.md 2015-02-11 11:43:43.826090922 +0000
464 @@ -131,7 +131,8 @@
465 [(D0_REG 0)
466 (A0_REG 8)
467 (A1_REG 9)
468 - (PIC_REG 13)
469 + (A4_REG 12)
470 + (A5_REG 13)
471 (A6_REG 14)
472 (SP_REG 15)
473 (FP0_REG 16)
474 @@ -7295,7 +7296,7 @@
476 if (TARGET_ID_SHARED_LIBRARY)
478 - operands[1] = gen_rtx_REG (Pmode, PIC_REG);
479 + operands[1] = gen_rtx_REG (Pmode, A4_REG);
480 return MOTOROLA ? "move.l %?(%1),%0" : "movel %1@(%?), %0";
482 else if (MOTOROLA)
483 diff -ruN gcc-4.6.4/gcc/config/m68k/t-aros gcc-4.6.4.aros/gcc/config/m68k/t-aros
484 --- gcc-4.6.4/gcc/config/m68k/t-aros 1970-01-01 01:00:00.000000000 +0100
485 +++ gcc-4.6.4.aros/gcc/config/m68k/t-aros 2015-02-11 11:43:43.826090922 +0000
486 @@ -0,0 +1,2 @@
487 +# Custom multilibs for AROS
488 +M68K_MLIB_CPU += && match(MLIB, "^68")
489 diff -ruN gcc-4.6.4/gcc/config/rs6000/aros.h gcc-4.6.4.aros/gcc/config/rs6000/aros.h
490 --- gcc-4.6.4/gcc/config/rs6000/aros.h 1970-01-01 01:00:00.000000000 +0100
491 +++ gcc-4.6.4.aros/gcc/config/rs6000/aros.h 2015-02-11 11:43:43.826090922 +0000
492 @@ -0,0 +1,161 @@
493 +/* Definitions for Powerpc running AROS systems with ELF format.
494 + Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002
495 + Free Software Foundation, Inc.
496 + Contributed by Markus Weiss.
497 + Based upon i386/aros.h by Fabio Alemagna.
499 +This file is part of GNU CC.
501 +GNU CC is free software; you can redistribute it and/or modify
502 +it under the terms of the GNU General Public License as published by
503 +the Free Software Foundation; either version 2, or (at your option)
504 +any later version.
506 +GNU CC is distributed in the hope that it will be useful,
507 +but WITHOUT ANY WARRANTY; without even the implied warranty of
508 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
509 +GNU General Public License for more details.
511 +You should have received a copy of the GNU General Public License
512 +along with GNU CC; see the file COPYING. If not, write to
513 +the Free Software Foundation, 59 Temple Place - Suite 330,
514 +Boston, MA 02111-1307, USA. */
516 +/* Symbols missing in comparison to i386/aros.h are either
517 + defined in elfos.h, rs6000/rs6000.h rs6000/sysv4.h
518 + or not needed for PowerPC.
521 +/* We need to define __powerpc__. */
523 +#undef TARGET_OS_CPP_BUILTINS
524 +#define TARGET_OS_CPP_BUILTINS() \
525 + do \
526 + { \
527 + builtin_define_std ("AROS"); \
528 + builtin_define ("AMIGA"); \
529 + builtin_define ("_AMIGA"); \
530 + builtin_define ("__powerpc__"); \
531 + builtin_define ("__ELF__"); \
532 + builtin_assert ("system=posix"); \
533 + if (flag_pic) \
534 + { \
535 + builtin_define ("__PIC__"); \
536 + builtin_define ("__pic__"); \
537 + } \
538 + } \
539 + while (0)
541 +/* This one taken from linux.h. */
542 +/* We are 32-bit all the time, so optimize a little. */
543 +#undef TARGET_64BIT
544 +#define TARGET_64BIT 0
546 +/* Output at beginning of assembler file. */
547 +/* The .file command should always begin the output. */
548 +/*#undef TARGET_ASM_FILE_START_FILE_DIRECTIVE
549 +#define TARGET_ASM_FILE_START_FILE_DIRECTIVE true
550 +defined in elfos.h
553 +#undef TARGET_VERSION
554 +#define TARGET_VERSION fprintf (stderr, " (PowerPC AROS/ELF)");
556 +/* The svr4 ABI for the i386 says that records and unions are returned
557 + in memory. */
558 +/*#undef DEFAULT_PCC_STRUCT_RETURN
559 +#define DEFAULT_PCC_STRUCT_RETURN 1
560 +see rs6000/rs6000.h
564 +#undef ASM_COMMENT_START
565 +#define ASM_COMMENT_START "#"
566 +see rs6000/rs6000.h
570 +#undef DBX_REGISTER_NUMBER
571 +#define DBX_REGISTER_NUMBER(n) \
572 + (TARGET_64BIT ? dbx64_register_map[n] : svr4_dbx_register_map[n])
573 +see rs6000/sysv4.h
576 +/* Output assembler code to FILE to call the profiler.
577 + To the best of my knowledge, no Linux libc has required the label
578 + argument to mcount. */
581 +#define NO_PROFILE_COUNTERS 1
582 +not used by other similar ppc compilers
583 +only in darwin.h rs6000/linux64.h rs6000/rs6000.c
587 +#undef MCOUNT_NAME
588 +#define MCOUNT_NAME "mcount"
589 +see rs6000/sysv4.h RS6000_MCOUNT
592 +/* The GLIBC version of mcount for the x86 assumes that there is a
593 + frame, so we cannot allow profiling without a frame pointer. */
595 +#undef SUBTARGET_FRAME_POINTER_REQUIRED
596 +#define SUBTARGET_FRAME_POINTER_REQUIRED crtl->profile
597 +seems to be handled by rs6000/rs6000.h
600 +#undef CC1_SPEC
601 +#define CC1_SPEC "%(cc1_cpu) %{profile:-p}"
603 +/* Provide a LINK_SPEC appropriate for AROS. */
605 +#undef LINK_SPEC
606 +#define LINK_SPEC "-m elf32ppc -L %R/lib"
608 +/* A C statement (sans semicolon) to output to the stdio stream
609 + FILE the assembler definition of uninitialized global DECL named
610 + NAME whose size is SIZE bytes and alignment is ALIGN bytes.
611 + Try to use asm_output_aligned_bss to implement this macro. */
613 +#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
614 + asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
615 +see rs6000/sysv4.h
618 +/* A C statement to output to the stdio stream FILE an assembler
619 + command to advance the location counter to a multiple of 1<<LOG
620 + bytes if it is within MAX_SKIP bytes.
622 + This is used to align code labels according to Intel recommendations. */
624 +#ifdef HAVE_GAS_MAX_SKIP_P2ALIGN
625 +#define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE,LOG,MAX_SKIP) \
626 + do { \
627 + if ((LOG) != 0) { \
628 + if ((MAX_SKIP) == 0) fprintf ((FILE), "\t.p2align %d\n", (LOG)); \
629 + else fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)); \
630 + } \
631 + } while (0)
632 +#endif
633 +see rs6000/sysv4.h
636 +/* Handle special EH pointer encodings. Absolute, pc-relative, and
637 + indirect are handled automatically. */
639 +#define ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX(FILE, ENCODING, SIZE, ADDR, DONE) \
640 + do { \
641 + if ((SIZE) == 4 && ((ENCODING) & 0x70) == DW_EH_PE_datarel) \
642 + { \
643 + fputs (ASM_LONG, FILE); \
644 + assemble_name (FILE, XSTR (ADDR, 0)); \
645 + fputs (((ENCODING) & DW_EH_PE_indirect ? "@GOT" : "@GOTOFF"), FILE); \
646 + goto DONE; \
647 + } \
648 + } while (0)
649 +not used for PowerPC
652 +/* FIXME: AROS doesn't support dw2 unwinding yet. */
653 +#undef MD_FALLBACK_FRAME_STATE_FOR
654 diff -ruN gcc-4.6.4/gcc/config/rs6000/rs6000.c gcc-4.6.4.aros/gcc/config/rs6000/rs6000.c
655 --- gcc-4.6.4/gcc/config/rs6000/rs6000.c 2013-02-08 15:07:55.000000000 +0000
656 +++ gcc-4.6.4.aros/gcc/config/rs6000/rs6000.c 2015-02-11 11:43:43.826090922 +0000
657 @@ -1308,6 +1308,7 @@
658 { "altivec", 1, 1, false, true, false, rs6000_handle_altivec_attribute },
659 { "longcall", 0, 0, false, true, true, rs6000_handle_longcall_attribute },
660 { "shortcall", 0, 0, false, true, true, rs6000_handle_longcall_attribute },
661 + { "stackparm", 0, 0, false, true, true, rs6000_handle_longcall_attribute },
662 { "ms_struct", 0, 0, false, false, false, rs6000_handle_struct_attribute },
663 { "gcc_struct", 0, 0, false, false, false, rs6000_handle_struct_attribute },
664 #ifdef SUBTARGET_ATTRIBUTE_TABLE
665 @@ -8070,6 +8071,9 @@
666 && !lookup_attribute ("shortcall", TYPE_ATTRIBUTES (fntype))))
667 cum->call_cookie |= CALL_LONG;
669 + cum->stackparm = fntype && lookup_attribute("stackparm",
670 + TYPE_ATTRIBUTES(fntype));
672 if (TARGET_DEBUG_ARG)
674 fprintf (stderr, "\ninit_cumulative_args:");
675 @@ -9045,6 +9049,9 @@
676 return GEN_INT (cum->call_cookie);
679 + if (cum->stackparm)
680 + return NULL_RTX;
682 if (TARGET_MACHO && rs6000_darwin64_struct_check_p (mode, type))
684 rtx rslt = rs6000_darwin64_record_arg (cum, type, named, /*retval= */false);
685 @@ -9460,6 +9467,9 @@
686 int first_reg_offset;
687 alias_set_type set;
689 + if (cum->stackparm)
690 + return;
692 /* Skip the last named argument. */
693 next_cum = *cum;
694 rs6000_function_arg_advance_1 (&next_cum, mode, type, true, 0);
695 diff -ruN gcc-4.6.4/gcc/config/rs6000/rs6000.h gcc-4.6.4.aros/gcc/config/rs6000/rs6000.h
696 --- gcc-4.6.4/gcc/config/rs6000/rs6000.h 2012-04-13 22:55:15.000000000 +0100
697 +++ gcc-4.6.4.aros/gcc/config/rs6000/rs6000.h 2015-02-11 11:43:43.826090922 +0000
698 @@ -1564,6 +1564,7 @@
699 int nargs_prototype; /* # args left in the current prototype */
700 int prototype; /* Whether a prototype was defined */
701 int stdarg; /* Whether function is a stdarg function. */
702 + int stackparm; /* Whether function has all args on the stack */
703 int call_cookie; /* Do special things for this call */
704 int sysv_gregno; /* next available GP register */
705 int intoffset; /* running offset in struct (darwin64) */
706 diff -ruN gcc-4.6.4/gcc/config/t-aros gcc-4.6.4.aros/gcc/config/t-aros
707 --- gcc-4.6.4/gcc/config/t-aros 1970-01-01 01:00:00.000000000 +0100
708 +++ gcc-4.6.4.aros/gcc/config/t-aros 2015-02-11 11:43:43.826090922 +0000
709 @@ -0,0 +1,28 @@
710 +# Must match STANDARD_INCLUDE_DIR in aros.h !
711 +NATIVE_SYSTEM_HEADER_DIR = /include
713 +# Don't add AROS target include path when compiling host compiler
714 +CPPFLAGS =
716 +# Copy AROS specific include replacement files
717 +LIBGCC_DEPS += stmp-aros-hrds
719 +EXTRA_AROS_HEADERS = aros/types/size_t.h aros/types/ptrdiff_t.h \
720 + aros/types/wchar_t.h aros/types/wint_t.h aros/types/null.h
722 +stmp-int-hdrs : | include/aros/types
724 +include/aros/types : $(addprefix $(srcdir)/ginclude/,$(EXTRA_AROS_HEADERS))
725 + -if [ -d include ] ; then true; else mkdir include; chmod a+rx include; fi
726 + -if [ -d include/aros/types ] ; \
727 + then true; \
728 + else \
729 + mkdir include/aros; chmod a+rx include/aros; \
730 + mkdir include/aros/types; chmod a+rx include/aros/types; \
731 + fi
732 + for file in $(EXTRA_AROS_HEADERS); do \
733 + $(STAMP) include/$$file; \
734 + rm -fr include/$$file; \
735 + cp $(srcdir)/ginclude/$$file include/$$file; \
736 + chmod a+r include/$$file; \
737 + done
738 diff -ruN gcc-4.6.4/gcc/config.build gcc-4.6.4.aros/gcc/config.build
739 --- gcc-4.6.4/gcc/config.build 2010-04-12 19:36:30.000000000 +0100
740 +++ gcc-4.6.4.aros/gcc/config.build 2015-02-11 11:43:43.826090922 +0000
741 @@ -124,6 +124,9 @@
742 # HP 9000 series 300
743 build_install_headers_dir=install-headers-cpio
745 + *-*-aros*)
746 + build_xm_file=xm-aros.h
747 + ;;
748 *-*-sysv*)
749 # All other System V variants.
750 build_install_headers_dir=install-headers-cpio
751 diff -ruN gcc-4.6.4/gcc/config.gcc gcc-4.6.4.aros/gcc/config.gcc
752 --- gcc-4.6.4/gcc/config.gcc 2013-03-06 17:40:07.000000000 +0000
753 +++ gcc-4.6.4.aros/gcc/config.gcc 2015-02-11 11:43:43.826090922 +0000
754 @@ -656,6 +656,14 @@
756 esac
758 +*-*-aros*)
759 + gas=yes
760 + gnu_ld=yes
761 + thread_file=single
762 + use_collect2=no
763 + xm_defines='STDC_HEADERS=1'
764 + ;;
766 *-*-openbsd*)
767 tmake_file="t-libc-ok t-openbsd t-libgcc-pic"
768 case ${enable_threads} in
769 @@ -793,6 +801,16 @@
770 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
771 extra_parts="crtinit.o crtfini.o"
773 +arm*-*-aros*)
774 + tm_file="dbxelf.h elfos.h arm/elf.h arm/bpabi.h aros.h arm/aros.h arm/aout.h arm/arm.h"
775 + tm_file="$tm_file ../../libgcc/config/arm/bpabi-lib.h"
776 + tmake_file="${tmake_file} arm/t-arm arm/t-arm-elf arm/t-arm-softfp arm/t-bpabi arm/t-aros t-aros"
777 + xm_file="xm-aros.h"
778 + # The BPABI long long divmod functions return a 128-bit value in
779 + # registers r0-r3. Correctly modeling that requires the use of
780 + # TImode.
781 + need_64bit_hwint=yes
782 + ;;
783 arm-wrs-vxworks)
784 tm_file="elfos.h arm/elf.h arm/aout.h ${tm_file} vx-common.h vxworks.h arm/vxworks.h"
785 extra_options="${extra_options} arm/vxworks.opt"
786 @@ -1316,6 +1334,16 @@
787 esac
788 tmake_file="${tmake_file} i386/t-linux64 i386/t-crtstuff i386/t-crtpc i386/t-crtfm t-dfprules"
790 +i[34567]86-*-aros*)
791 + tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/i386elf.h aros.h i386/aros.h"
792 + xm_file=xm-aros.h
793 + tmake_file="${tmake_file} i386/t-i386elf t-aros"
794 + ;;
795 +x86_64-*-aros*)
796 + 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"
797 + tmake_file="${tmake_file} i386/t-i386elf t-aros"
798 + xm_file=xm-aros.h
799 + ;;
800 i[34567]86-pc-msdosdjgpp*)
801 xm_file=i386/xm-djgpp.h
802 tm_file="dbxcoff.h ${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/djgpp.h i386/djgpp-stdint.h"
803 @@ -1724,6 +1752,16 @@
804 extra_options="${extra_options} m68hc11/m68hc11.opt"
805 use_gcc_stdint=wrap
807 +m68k-*-aros*)
808 + default_m68k_cpu=68000
809 + default_cf_cpu=5206
810 + 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"
811 + tm_file="${tm_file} aros.h"
812 + tm_defines="${tm_defines} MOTOROLA=1"
813 + tmake_file="m68k/t-floatlib m68k/t-m68kbare m68k/t-m68kelf"
814 + tmake_file="$tmake_file m68k/t-aros m68k/t-mlibs t-aros"
815 + extra_parts="crtbegin.o crtend.o"
816 + ;;
817 m68k-*-elf* | fido-*-elf*)
818 case ${target} in
819 fido-*-elf*)
820 @@ -2147,6 +2185,13 @@
821 extra_options="${extra_options} rs6000/sysv4.opt"
822 tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-rtems t-rtems rs6000/t-ppccomm"
824 +powerpc-*-aros*)
825 + tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h aros.h"
826 + extra_options="${extra_options} rs6000/sysv4.opt"
827 + tm_file="${tm_file} rs6000/aros.h"
828 + xm_file=xm-aros.h
829 + tmake_file="$tmake_file t-aros"
830 + ;;
831 powerpc-*-linux* | powerpc64-*-linux*)
832 tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h"
833 extra_options="${extra_options} rs6000/sysv4.opt"
834 diff -ruN gcc-4.6.4/gcc/config.host gcc-4.6.4.aros/gcc/config.host
835 --- gcc-4.6.4/gcc/config.host 2011-02-15 09:49:14.000000000 +0000
836 +++ gcc-4.6.4.aros/gcc/config.host 2015-02-11 11:43:43.826090922 +0000
837 @@ -277,4 +277,8 @@
838 out_host_hook_obj=host-hpux.o
839 host_xmake_file="${host_xmake_file} x-hpux"
841 + *-*-aros*)
842 + host_can_use_collect2=no
843 + host_xm_file=xm-aros.h
844 + ;;
845 esac
846 diff -ruN gcc-4.6.4/gcc/ginclude/aros/types/null.h gcc-4.6.4.aros/gcc/ginclude/aros/types/null.h
847 --- gcc-4.6.4/gcc/ginclude/aros/types/null.h 1970-01-01 01:00:00.000000000 +0100
848 +++ gcc-4.6.4.aros/gcc/ginclude/aros/types/null.h 2015-02-11 11:43:43.826090922 +0000
849 @@ -0,0 +1,3 @@
850 +/* Replace AROS' NULL definition with gcc's one */
851 +#define __need_NULL
852 +#include <stddef.h>
853 diff -ruN gcc-4.6.4/gcc/ginclude/aros/types/ptrdiff_t.h gcc-4.6.4.aros/gcc/ginclude/aros/types/ptrdiff_t.h
854 --- gcc-4.6.4/gcc/ginclude/aros/types/ptrdiff_t.h 1970-01-01 01:00:00.000000000 +0100
855 +++ gcc-4.6.4.aros/gcc/ginclude/aros/types/ptrdiff_t.h 2015-02-11 11:43:43.826090922 +0000
856 @@ -0,0 +1,3 @@
857 +/* Replace AROS' ptrdiff_t definition with gcc's one */
858 +#define __need_ptrdiff_t
859 +#include <stddef.h>
860 diff -ruN gcc-4.6.4/gcc/ginclude/aros/types/size_t.h gcc-4.6.4.aros/gcc/ginclude/aros/types/size_t.h
861 --- gcc-4.6.4/gcc/ginclude/aros/types/size_t.h 1970-01-01 01:00:00.000000000 +0100
862 +++ gcc-4.6.4.aros/gcc/ginclude/aros/types/size_t.h 2015-02-11 11:43:43.826090922 +0000
863 @@ -0,0 +1,3 @@
864 +/* Replace AROS' size_t definition with gcc's one */
865 +#define __need_size_t
866 +#include <stddef.h>
867 diff -ruN gcc-4.6.4/gcc/ginclude/aros/types/wchar_t.h gcc-4.6.4.aros/gcc/ginclude/aros/types/wchar_t.h
868 --- gcc-4.6.4/gcc/ginclude/aros/types/wchar_t.h 1970-01-01 01:00:00.000000000 +0100
869 +++ gcc-4.6.4.aros/gcc/ginclude/aros/types/wchar_t.h 2015-02-11 11:43:43.826090922 +0000
870 @@ -0,0 +1,3 @@
871 +/* Replace AROS' wchar_t definition with gcc's one */
872 +#define __need_wchar_t
873 +#include <stddef.h>
874 diff -ruN gcc-4.6.4/gcc/ginclude/aros/types/wint_t.h gcc-4.6.4.aros/gcc/ginclude/aros/types/wint_t.h
875 --- gcc-4.6.4/gcc/ginclude/aros/types/wint_t.h 1970-01-01 01:00:00.000000000 +0100
876 +++ gcc-4.6.4.aros/gcc/ginclude/aros/types/wint_t.h 2015-02-11 11:43:43.826090922 +0000
877 @@ -0,0 +1,3 @@
878 +/* Replace AROS' wint_t definition with gcc's one */
879 +#define __need_wint_t
880 +#include <stddef.h>
881 diff -ruN gcc-4.6.4/gcc/ginclude/stddef.h gcc-4.6.4.aros/gcc/ginclude/stddef.h
882 --- gcc-4.6.4/gcc/ginclude/stddef.h 2011-01-29 22:15:52.000000000 +0000
883 +++ gcc-4.6.4.aros/gcc/ginclude/stddef.h 2015-02-11 11:43:43.826090922 +0000
884 @@ -134,6 +134,7 @@
885 #ifndef __PTRDIFF_T
886 #ifndef _PTRDIFF_T_
887 #ifndef _BSD_PTRDIFF_T_
888 +#ifndef _AROS_TYPES_PTRDIFF_T_H
889 #ifndef ___int_ptrdiff_t_h
890 #ifndef _GCC_PTRDIFF_T
891 #define _PTRDIFF_T
892 @@ -142,6 +143,7 @@
893 #define __PTRDIFF_T
894 #define _PTRDIFF_T_
895 #define _BSD_PTRDIFF_T_
896 +#define _AROS_TYPES_PTRDIFF_T_H
897 #define ___int_ptrdiff_t_h
898 #define _GCC_PTRDIFF_T
899 #ifndef __PTRDIFF_TYPE__
900 @@ -150,6 +152,7 @@
901 typedef __PTRDIFF_TYPE__ ptrdiff_t;
902 #endif /* _GCC_PTRDIFF_T */
903 #endif /* ___int_ptrdiff_t_h */
904 +#endif /* _AROS_TYPES_PTRDIFF_T_H */
905 #endif /* _BSD_PTRDIFF_T_ */
906 #endif /* _PTRDIFF_T_ */
907 #endif /* __PTRDIFF_T */
908 @@ -176,6 +179,7 @@
909 #ifndef __SIZE_T
910 #ifndef _SIZE_T_
911 #ifndef _BSD_SIZE_T_
912 +#ifndef _AROS_TYPES_SIZE_T_H
913 #ifndef _SIZE_T_DEFINED_
914 #ifndef _SIZE_T_DEFINED
915 #ifndef _BSD_SIZE_T_DEFINED_ /* Darwin */
916 @@ -193,6 +197,7 @@
917 #define __SIZE_T
918 #define _SIZE_T_
919 #define _BSD_SIZE_T_
920 +#define _AROS_TYPES_SIZE_T_H
921 #define _SIZE_T_DEFINED_
922 #define _SIZE_T_DEFINED
923 #define _BSD_SIZE_T_DEFINED_ /* Darwin */
924 @@ -222,6 +227,7 @@
925 #endif /* _BSD_SIZE_T_DEFINED_ */
926 #endif /* _SIZE_T_DEFINED */
927 #endif /* _SIZE_T_DEFINED_ */
928 +#endif /* _AROS_TYPES_SIZE_T_H */
929 #endif /* _BSD_SIZE_T_ */
930 #endif /* _SIZE_T_ */
931 #endif /* __SIZE_T */
932 diff -ruN gcc-4.6.4/include/filenames.h gcc-4.6.4.aros/include/filenames.h
933 --- gcc-4.6.4/include/filenames.h 2011-02-28 18:23:25.000000000 +0000
934 +++ gcc-4.6.4.aros/include/filenames.h 2015-02-11 11:43:43.826090922 +0000
935 @@ -37,6 +37,10 @@
936 # define HAS_DRIVE_SPEC(f) HAS_DOS_DRIVE_SPEC (f)
937 # define IS_DIR_SEPARATOR(c) IS_DOS_DIR_SEPARATOR (c)
938 # define IS_ABSOLUTE_PATH(f) IS_DOS_ABSOLUTE_PATH (f)
939 +#elif defined __AROS__
940 +# define IS_DIR_SEPARATOR(c) ((c) == '/' || (c) == ':')
941 +# define IS_ABSOLUTE_PATH(f) (IS_DIR_SEPARATOR((f)[0]) || (strchr((f), ':')))
942 +# define HAVE_CASE_INSENSITIVE_FILE_SYSTEM
943 #else /* not DOSish */
944 # define HAS_DRIVE_SPEC(f) (0)
945 # define IS_DIR_SEPARATOR(c) IS_UNIX_DIR_SEPARATOR (c)
946 diff -ruN gcc-4.6.4/libcpp/configure gcc-4.6.4.aros/libcpp/configure
947 --- gcc-4.6.4/libcpp/configure 2013-04-12 10:58:00.000000000 +0100
948 +++ gcc-4.6.4.aros/libcpp/configure 2015-02-11 11:43:43.826090922 +0000
949 @@ -7092,6 +7092,7 @@
950 arm*-*-*eabi* | \
951 arm*-*-rtems[.0-9]* | \
952 arm*-*-symbianelf* | \
953 + arm*-*-aros | \
954 x86_64-*-* | \
955 ia64-*-* | \
956 hppa*64*-*-* | \
957 diff -ruN gcc-4.6.4/libcpp/configure.ac gcc-4.6.4.aros/libcpp/configure.ac
958 --- gcc-4.6.4/libcpp/configure.ac 2013-04-03 16:45:53.000000000 +0100
959 +++ gcc-4.6.4.aros/libcpp/configure.ac 2015-02-11 11:43:43.826090922 +0000
960 @@ -142,6 +142,7 @@
961 arm*-*-*eabi* | \
962 arm*-*-rtems[.0-9]* | \
963 arm*-*-symbianelf* | \
964 + arm*-*-aros | \
965 x86_64-*-* | \
966 ia64-*-* | \
967 hppa*64*-*-* | \
968 diff -ruN gcc-4.6.4/libgcc/config.host gcc-4.6.4.aros/libgcc/config.host
969 --- gcc-4.6.4/libgcc/config.host 2011-11-23 22:15:54.000000000 +0000
970 +++ gcc-4.6.4.aros/libgcc/config.host 2015-02-11 11:43:43.826090922 +0000
971 @@ -590,6 +590,8 @@
973 mep*-*-*)
975 +*-*-aros*)
976 + ;;
978 echo "*** Configuration ${host} not supported" 1>&2
979 exit 1
980 diff -ruN gcc-4.6.4/libiberty/filename_cmp.c gcc-4.6.4.aros/libiberty/filename_cmp.c
981 --- gcc-4.6.4/libiberty/filename_cmp.c 2011-02-28 18:23:25.000000000 +0000
982 +++ gcc-4.6.4.aros/libiberty/filename_cmp.c 2015-02-11 11:43:43.826090922 +0000
983 @@ -51,7 +51,11 @@
984 filename_cmp (const char *s1, const char *s2)
986 #ifndef HAVE_DOS_BASED_FILE_SYSTEM
987 +#ifdef HAVE_CASE_INSENSITIVE_FILE_SYSTEM
988 + return strcasecmp(s1, s2);
989 +#else
990 return strcmp(s1, s2);
991 +#endif
992 #else
993 for (;;)
995 diff -ruN gcc-4.6.4/libobjc/configure gcc-4.6.4.aros/libobjc/configure
996 --- gcc-4.6.4/libobjc/configure 2011-11-20 21:24:07.000000000 +0000
997 +++ gcc-4.6.4.aros/libobjc/configure 2015-02-11 11:43:43.826090922 +0000
998 @@ -11249,215 +11249,7 @@
1002 -# Check if we have thread-local storage
1005 - # Check whether --enable-tls was given.
1006 -if test "${enable_tls+set}" = set; then :
1007 - enableval=$enable_tls;
1008 - case "$enableval" in
1009 - yes|no) ;;
1010 - *) as_fn_error "Argument to enable/disable tls must be yes or no" "$LINENO" 5 ;;
1011 - esac
1013 -else
1014 - enable_tls=yes
1018 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the target supports thread-local storage" >&5
1019 -$as_echo_n "checking whether the target supports thread-local storage... " >&6; }
1020 -if test "${gcc_cv_have_tls+set}" = set; then :
1021 - $as_echo_n "(cached) " >&6
1022 -else
1024 - if test "$cross_compiling" = yes; then :
1025 - if test x$gcc_no_link = xyes; then
1026 - as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
1028 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1029 -/* end confdefs.h. */
1030 -__thread int a; int b; int main() { return a = b; }
1031 -_ACEOF
1032 -if ac_fn_c_try_link "$LINENO"; then :
1033 - chktls_save_LDFLAGS="$LDFLAGS"
1034 - case $host in
1035 - *-*-linux*)
1036 - LDFLAGS="-shared -Wl,--no-undefined $LDFLAGS"
1037 - ;;
1038 - esac
1039 - chktls_save_CFLAGS="$CFLAGS"
1040 - CFLAGS="-fPIC $CFLAGS"
1041 - if test x$gcc_no_link = xyes; then
1042 - as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
1044 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1045 -/* end confdefs.h. */
1046 -int f() { return 0; }
1047 -_ACEOF
1048 -if ac_fn_c_try_link "$LINENO"; then :
1049 - if test x$gcc_no_link = xyes; then
1050 - as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
1052 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1053 -/* end confdefs.h. */
1054 -__thread int a; int b; int f() { return a = b; }
1055 -_ACEOF
1056 -if ac_fn_c_try_link "$LINENO"; then :
1057 - gcc_cv_have_tls=yes
1058 -else
1059 - gcc_cv_have_tls=no
1061 -rm -f core conftest.err conftest.$ac_objext \
1062 - conftest$ac_exeext conftest.$ac_ext
1063 -else
1064 - gcc_cv_have_tls=yes
1066 -rm -f core conftest.err conftest.$ac_objext \
1067 - conftest$ac_exeext conftest.$ac_ext
1068 - CFLAGS="$chktls_save_CFLAGS"
1069 - LDFLAGS="$chktls_save_LDFLAGS"
1070 -else
1071 - gcc_cv_have_tls=no
1073 -rm -f core conftest.err conftest.$ac_objext \
1074 - conftest$ac_exeext conftest.$ac_ext
1077 -else
1078 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1079 -/* end confdefs.h. */
1080 -__thread int a; int b; int main() { return a = b; }
1081 -_ACEOF
1082 -if ac_fn_c_try_run "$LINENO"; then :
1083 - chktls_save_LDFLAGS="$LDFLAGS"
1084 - LDFLAGS="-static $LDFLAGS"
1085 - if test x$gcc_no_link = xyes; then
1086 - as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
1088 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1089 -/* end confdefs.h. */
1090 -int main() { return 0; }
1091 -_ACEOF
1092 -if ac_fn_c_try_link "$LINENO"; then :
1093 - if test "$cross_compiling" = yes; then :
1094 - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
1095 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1096 -as_fn_error "cannot run test program while cross compiling
1097 -See \`config.log' for more details." "$LINENO" 5; }
1098 -else
1099 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1100 -/* end confdefs.h. */
1101 -__thread int a; int b; int main() { return a = b; }
1102 -_ACEOF
1103 -if ac_fn_c_try_run "$LINENO"; then :
1104 - gcc_cv_have_tls=yes
1105 -else
1106 - gcc_cv_have_tls=no
1108 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
1109 - conftest.$ac_objext conftest.beam conftest.$ac_ext
1112 -else
1113 - gcc_cv_have_tls=yes
1115 -rm -f core conftest.err conftest.$ac_objext \
1116 - conftest$ac_exeext conftest.$ac_ext
1117 - LDFLAGS="$chktls_save_LDFLAGS"
1118 - if test $gcc_cv_have_tls = yes; then
1119 - chktls_save_CFLAGS="$CFLAGS"
1120 - thread_CFLAGS=failed
1121 - for flag in '' '-pthread' '-lpthread'; do
1122 - CFLAGS="$flag $chktls_save_CFLAGS"
1123 - if test x$gcc_no_link = xyes; then
1124 - as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
1126 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1127 -/* end confdefs.h. */
1128 -#include <pthread.h>
1129 - void *g(void *d) { return NULL; }
1130 -int
1131 -main ()
1133 -pthread_t t; pthread_create(&t,NULL,g,NULL);
1135 - return 0;
1137 -_ACEOF
1138 -if ac_fn_c_try_link "$LINENO"; then :
1139 - thread_CFLAGS="$flag"
1141 -rm -f core conftest.err conftest.$ac_objext \
1142 - conftest$ac_exeext conftest.$ac_ext
1143 - if test "X$thread_CFLAGS" != Xfailed; then
1144 - break
1145 - fi
1146 - done
1147 - CFLAGS="$chktls_save_CFLAGS"
1148 - if test "X$thread_CFLAGS" != Xfailed; then
1149 - CFLAGS="$thread_CFLAGS $chktls_save_CFLAGS"
1150 - if test "$cross_compiling" = yes; then :
1151 - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
1152 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1153 -as_fn_error "cannot run test program while cross compiling
1154 -See \`config.log' for more details." "$LINENO" 5; }
1155 -else
1156 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1157 -/* end confdefs.h. */
1158 -#include <pthread.h>
1159 - __thread int a;
1160 - static int *volatile a_in_other_thread;
1161 - static void *
1162 - thread_func (void *arg)
1164 - a_in_other_thread = &a;
1165 - return (void *)0;
1167 -int
1168 -main ()
1170 -pthread_t thread;
1171 - void *thread_retval;
1172 - int *volatile a_in_main_thread;
1173 - a_in_main_thread = &a;
1174 - if (pthread_create (&thread, (pthread_attr_t *)0,
1175 - thread_func, (void *)0))
1176 - return 0;
1177 - if (pthread_join (thread, &thread_retval))
1178 - return 0;
1179 - return (a_in_other_thread == a_in_main_thread);
1181 - return 0;
1183 -_ACEOF
1184 -if ac_fn_c_try_run "$LINENO"; then :
1185 - gcc_cv_have_tls=yes
1186 -else
1187 - gcc_cv_have_tls=no
1189 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
1190 - conftest.$ac_objext conftest.beam conftest.$ac_ext
1193 - CFLAGS="$chktls_save_CFLAGS"
1194 - fi
1195 - fi
1196 -else
1197 - gcc_cv_have_tls=no
1199 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
1200 - conftest.$ac_objext conftest.beam conftest.$ac_ext
1204 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_have_tls" >&5
1205 -$as_echo "$gcc_cv_have_tls" >&6; }
1206 - if test "$enable_tls $gcc_cv_have_tls" = "yes yes"; then
1208 -$as_echo "#define HAVE_TLS 1" >>confdefs.h
1210 - fi
1211 +#dnl GCC_ENABLE_TLS
1213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for exception model to use" >&5
1214 $as_echo_n "checking for exception model to use... " >&6; }
1215 diff -ruN gcc-4.6.4/libobjc/configure.ac gcc-4.6.4.aros/libobjc/configure.ac
1216 --- gcc-4.6.4/libobjc/configure.ac 2010-12-06 00:50:04.000000000 +0000
1217 +++ gcc-4.6.4.aros/libobjc/configure.ac 2015-02-11 11:43:43.826090922 +0000
1218 @@ -217,7 +217,7 @@
1221 # Check if we have thread-local storage
1222 -GCC_CHECK_TLS
1223 +dnl GCC_CHECK_TLS
1225 AC_MSG_CHECKING([for exception model to use])
1226 AC_LANG_PUSH(C)
1227 diff -ruN gcc-4.6.4/libstdc++-v3/config/os/aros/ctype_base.h gcc-4.6.4.aros/libstdc++-v3/config/os/aros/ctype_base.h
1228 --- gcc-4.6.4/libstdc++-v3/config/os/aros/ctype_base.h 1970-01-01 01:00:00.000000000 +0100
1229 +++ gcc-4.6.4.aros/libstdc++-v3/config/os/aros/ctype_base.h 2015-02-11 11:43:43.826090922 +0000
1230 @@ -0,0 +1,27 @@
1231 +namespace std _GLIBCXX_VISIBILITY(default)
1233 +_GLIBCXX_BEGIN_NAMESPACE_VERSION
1235 +struct ctype_base {
1236 + /* Non-standard typedefs */
1237 + typedef int * __to_type;
1239 + /* NB: Offsets into ctype<char>::_M_table force a particular size
1240 + on the mask type. Because of this, we don't use an enum. */
1241 + typedef unsigned short int mask;
1243 + static const mask upper = _ISupper;
1244 + static const mask lower = _ISlower;
1245 + static const mask alpha = _ISalpha;
1246 + static const mask digit = _ISdigit;
1247 + static const mask xdigit = _ISxdigit;
1248 + static const mask space = _ISspace;
1249 + static const mask print = _ISprint;
1250 + static const mask graph = _ISgraph;
1251 + static const mask cntrl = _IScntrl;
1252 + static const mask punct = _ISpunct;
1253 + static const mask alnum = _ISalnum;
1256 +_GLIBCXX_END_NAMESPACE_VERSION
1257 +} // namespace
1258 diff -ruN gcc-4.6.4/libstdc++-v3/config/os/aros/ctype_inline.h gcc-4.6.4.aros/libstdc++-v3/config/os/aros/ctype_inline.h
1259 --- gcc-4.6.4/libstdc++-v3/config/os/aros/ctype_inline.h 1970-01-01 01:00:00.000000000 +0100
1260 +++ gcc-4.6.4.aros/libstdc++-v3/config/os/aros/ctype_inline.h 2015-02-11 11:43:43.826090922 +0000
1261 @@ -0,0 +1,173 @@
1262 +// Locale support -*- C++ -*-
1264 +// Copyright (C) 2000, 2003 Free Software Foundation, Inc.
1266 +// This file is part of the GNU ISO C++ Library. This library is free
1267 +// software; you can redistribute it and/or modify it under the
1268 +// terms of the GNU General Public License as published by the
1269 +// Free Software Foundation; either version 2, or (at your option)
1270 +// any later version.
1272 +// This library is distributed in the hope that it will be useful,
1273 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
1274 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1275 +// GNU General Public License for more details.
1277 +// You should have received a copy of the GNU General Public License along
1278 +// with this library; see the file COPYING. If not, write to the Free
1279 +// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
1280 +// USA.
1282 +// As a special exception, you may use this file as part of a free software
1283 +// library without restriction. Specifically, if other files instantiate
1284 +// templates or use macros or inline functions from this file, or you compile
1285 +// this file and link it with other files to produce an executable, this
1286 +// file does not by itself cause the resulting executable to be covered by
1287 +// the GNU General Public License. This exception does not however
1288 +// invalidate any other reasons why the executable file might be covered by
1289 +// the GNU General Public License.
1291 +/** @file ctype_inline.h
1292 + * This is an internal header file, included by other library headers.
1293 + * You should not attempt to use it directly.
1294 + */
1297 +// ISO C++ 14882: 22.1 Locales
1300 +// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*)
1301 +// functions go in ctype.cc
1303 +// The following definitions are portable, but insanely slow. If one
1304 +// cares at all about performance, then specialized ctype
1305 +// functionality should be added for the native os in question: see
1306 +// the config/os/bits/ctype_*.h files.
1308 +// Constructing a synthetic "C" table should be seriously considered...
1310 +namespace std _GLIBCXX_VISIBILITY(default)
1312 +_GLIBCXX_BEGIN_NAMESPACE_VERSION
1314 + bool
1315 + ctype<char>::
1316 + is(mask __m, char __c) const
1317 + {
1318 + if (_M_table)
1319 + return _M_table[static_cast<unsigned char>(__c)] & __m;
1320 + else
1322 + bool __ret = false;
1323 + const size_t __bitmasksize = 15;
1324 + size_t __bitcur = 0; // Lowest bitmask in ctype_base == 0
1325 + for (; __bitcur <= __bitmasksize; ++__bitcur)
1327 + const mask __bit = static_cast<mask>(1 << __bitcur);
1328 + if (__m & __bit)
1330 + bool __testis;
1331 + switch (__bit)
1333 + case space:
1334 + __testis = isspace(__c);
1335 + break;
1336 + case print:
1337 + __testis = isprint(__c);
1338 + break;
1339 + case cntrl:
1340 + __testis = iscntrl(__c);
1341 + break;
1342 + case upper:
1343 + __testis = isupper(__c);
1344 + break;
1345 + case lower:
1346 + __testis = islower(__c);
1347 + break;
1348 + case alpha:
1349 + __testis = isalpha(__c);
1350 + break;
1351 + case digit:
1352 + __testis = isdigit(__c);
1353 + break;
1354 + case punct:
1355 + __testis = ispunct(__c);
1356 + break;
1357 + case xdigit:
1358 + __testis = isxdigit(__c);
1359 + break;
1360 + case alnum:
1361 + __testis = isalnum(__c);
1362 + break;
1363 + case graph:
1364 + __testis = isgraph(__c);
1365 + break;
1366 + default:
1367 + __testis = false;
1368 + break;
1370 + __ret |= __testis;
1373 + return __ret;
1377 + const char*
1378 + ctype<char>::
1379 + is(const char* __low, const char* __high, mask* __vec) const
1381 + if (_M_table)
1382 + while (__low < __high)
1383 + *__vec++ = _M_table[static_cast<unsigned char>(*__low++)];
1384 + else
1386 + // Highest bitmask in ctype_base == 10.
1387 + const size_t __bitmasksize = 15;
1388 + for (;__low < __high; ++__vec, ++__low)
1390 + mask __m = 0;
1391 + // Lowest bitmask in ctype_base == 0
1392 + size_t __i = 0;
1393 + for (;__i <= __bitmasksize; ++__i)
1395 + const mask __bit = static_cast<mask>(1 << __i);
1396 + if (this->is(__bit, *__low))
1397 + __m |= __bit;
1399 + *__vec = __m;
1402 + return __high;
1405 + const char*
1406 + ctype<char>::
1407 + scan_is(mask __m, const char* __low, const char* __high) const
1409 + if (_M_table)
1410 + while (__low < __high
1411 + && !(_M_table[static_cast<unsigned char>(*__low)] & __m))
1412 + ++__low;
1413 + else
1414 + while (__low < __high && !this->is(__m, *__low))
1415 + ++__low;
1416 + return __low;
1419 + const char*
1420 + ctype<char>::
1421 + scan_not(mask __m, const char* __low, const char* __high) const
1423 + if (_M_table)
1424 + while (__low < __high
1425 + && (_M_table[static_cast<unsigned char>(*__low)] & __m) != 0)
1426 + ++__low;
1427 + else
1428 + while (__low < __high && this->is(__m, *__low) != 0)
1429 + ++__low;
1430 + return __low;
1433 +_GLIBCXX_END_NAMESPACE_VERSION
1434 +} // namespace
1435 diff -ruN gcc-4.6.4/libstdc++-v3/config/os/aros/ctype_noninline.h gcc-4.6.4.aros/libstdc++-v3/config/os/aros/ctype_noninline.h
1436 --- gcc-4.6.4/libstdc++-v3/config/os/aros/ctype_noninline.h 1970-01-01 01:00:00.000000000 +0100
1437 +++ gcc-4.6.4.aros/libstdc++-v3/config/os/aros/ctype_noninline.h 2015-02-11 11:43:43.826090922 +0000
1438 @@ -0,0 +1,56 @@
1439 + const ctype_base::mask*
1440 + ctype<char>::classic_table() throw()
1441 + { return *__ctype_b_ptr; }
1443 + ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
1444 + size_t __refs)
1445 + : facet(__refs), _M_del(__table != 0 && __del),
1446 + _M_toupper(NULL), _M_tolower(NULL),
1447 + _M_table(__table ? __table : classic_table())
1448 + {
1449 + memset(_M_widen, 0, sizeof(_M_widen));
1450 + _M_widen_ok = 0;
1451 + memset(_M_narrow, 0, sizeof(_M_narrow));
1452 + _M_narrow_ok = 0;
1455 + ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
1456 + : facet(__refs), _M_del(__table != 0 && __del),
1457 + _M_toupper(NULL), _M_tolower(NULL),
1458 + _M_table(__table ? __table : classic_table())
1459 + {
1460 + memset(_M_widen, 0, sizeof(_M_widen));
1461 + _M_widen_ok = 0;
1462 + memset(_M_narrow, 0, sizeof(_M_narrow));
1463 + _M_narrow_ok = 0;
1466 + char
1467 + ctype<char>::do_toupper(char __c) const
1468 + { return ::toupper((int) __c); }
1470 + const char*
1471 + ctype<char>::do_toupper(char* __low, const char* __high) const
1473 + while (__low < __high)
1475 + *__low = ::toupper((int) *__low);
1476 + ++__low;
1478 + return __high;
1481 + char
1482 + ctype<char>::do_tolower(char __c) const
1483 + { return ::tolower((int) __c); }
1485 + const char*
1486 + ctype<char>::do_tolower(char* __low, const char* __high) const
1488 + while (__low < __high)
1490 + *__low = ::tolower((int) *__low);
1491 + ++__low;
1493 + return __high;
1495 diff -ruN gcc-4.6.4/libstdc++-v3/config/os/aros/os_defines.h gcc-4.6.4.aros/libstdc++-v3/config/os/aros/os_defines.h
1496 --- gcc-4.6.4/libstdc++-v3/config/os/aros/os_defines.h 1970-01-01 01:00:00.000000000 +0100
1497 +++ gcc-4.6.4.aros/libstdc++-v3/config/os/aros/os_defines.h 2015-02-11 11:43:43.826090922 +0000
1498 @@ -0,0 +1,6 @@
1499 +#ifndef _GLIBCXX_OS_DEFINES
1500 +#define _GLIBCXX_OS_DEFINES
1502 +#define __off64_t off_t
1504 +#endif
1505 diff -ruN gcc-4.6.4/libstdc++-v3/configure gcc-4.6.4.aros/libstdc++-v3/configure
1506 --- gcc-4.6.4/libstdc++-v3/configure 2012-07-22 17:46:02.000000000 +0100
1507 +++ gcc-4.6.4.aros/libstdc++-v3/configure 2015-02-11 11:43:43.826090922 +0000
1508 @@ -5267,12 +5267,9 @@
1512 -if test "x${with_newlib}" != "xyes"; then
1513 - enable_dlopen=yes
1518 +#if test "x${with_newlib}" != "xyes"; then
1519 +# AC_LIBTOOL_DLOPEN
1520 +#fi
1521 case `pwd` in
1522 *\ * | *\ *)
1523 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
1524 @@ -7990,6 +7987,8 @@
1528 + enable_dlopen=no
1531 enable_win32_dll=no
1533 @@ -18131,6 +18130,7 @@
1535 struct iovec iov[2];
1536 writev(0, iov, 0);
1537 +#error be sure to fail
1539 return 0;
1541 @@ -18153,6 +18153,7 @@
1543 struct iovec iov[2];
1544 writev(0, iov, 0);
1545 +#error be sure to fail
1547 return 0;
1549 @@ -26562,6 +26563,58 @@
1551 # Base decisions on target environment.
1552 case "${host}" in
1553 + *-aros*)
1554 + for ac_header in nan.h ieeefp.h endian.h sys/isa_defs.h machine/endian.h \
1555 + machine/param.h sys/machine.h sys/types.h fp.h locale.h float.h inttypes.h
1556 +do :
1557 + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
1558 +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
1559 +eval as_val=\$$as_ac_Header
1560 + if test "x$as_val" = x""yes; then :
1561 + cat >>confdefs.h <<_ACEOF
1562 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
1563 +_ACEOF
1567 +done
1570 + GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
1571 + GLIBCXX_CHECK_WCHAR_T_SUPPORT
1573 + $as_echo "#define HAVE_FINITE 1" >>confdefs.h
1575 + $as_echo "#define HAVE_FINITEF 1" >>confdefs.h
1577 + $as_echo "#define HAVE_FREXPF 1" >>confdefs.h
1579 + $as_echo "#define HAVE_HYPOTF 1" >>confdefs.h
1581 + $as_echo "#define HAVE_ISINF 1" >>confdefs.h
1583 + $as_echo "#define HAVE_ISINFF 1" >>confdefs.h
1585 + $as_echo "#define HAVE_ISNAN 1" >>confdefs.h
1587 + $as_echo "#define HAVE_ISNANF 1" >>confdefs.h
1589 + $as_echo "#define HAVE_SINCOS 1" >>confdefs.h
1591 + $as_echo "#define HAVE_SINCOSF 1" >>confdefs.h
1593 + if test x"long_double_math_on_this_cpu" = x"yes"; then
1594 + $as_echo "#define HAVE_FINITEL 1" >>confdefs.h
1596 + $as_echo "#define HAVE_HYPOTL 1" >>confdefs.h
1598 + $as_echo "#define HAVE_ISINFL 1" >>confdefs.h
1600 + $as_echo "#define HAVE_ISNANL 1" >>confdefs.h
1602 + fi
1603 + ;;
1605 arm*-*-symbianelf*)
1606 # This is a freestanding configuration; there is nothing to do here.
1608 diff -ruN gcc-4.6.4/libstdc++-v3/configure.ac gcc-4.6.4.aros/libstdc++-v3/configure.ac
1609 --- gcc-4.6.4/libstdc++-v3/configure.ac 2012-07-22 17:46:02.000000000 +0100
1610 +++ gcc-4.6.4.aros/libstdc++-v3/configure.ac 2015-02-11 11:43:43.826090922 +0000
1611 @@ -88,9 +88,9 @@
1612 # up critical shell variables.
1613 GLIBCXX_CONFIGURE
1615 -if test "x${with_newlib}" != "xyes"; then
1616 - AC_LIBTOOL_DLOPEN
1618 +#if test "x${with_newlib}" != "xyes"; then
1619 +# AC_LIBTOOL_DLOPEN
1620 +#fi
1621 AM_PROG_LIBTOOL
1622 ACX_LT_HOST_FLAGS
1623 AC_SUBST(enable_shared)
1624 diff -ruN gcc-4.6.4/libstdc++-v3/configure.host gcc-4.6.4.aros/libstdc++-v3/configure.host
1625 --- gcc-4.6.4/libstdc++-v3/configure.host 2010-12-06 00:50:04.000000000 +0000
1626 +++ gcc-4.6.4.aros/libstdc++-v3/configure.host 2015-02-11 11:43:43.826090922 +0000
1627 @@ -203,6 +203,9 @@
1628 os_include_dir="os/generic"
1629 atomicity_dir="cpu/generic"
1631 + aros*)
1632 + os_include_dir="os/aros"
1633 + ;;
1634 bsd*)
1635 # Plain BSD attempts to share FreeBSD files.
1636 os_include_dir="os/bsd/freebsd"
1637 diff -ruN gcc-4.6.4/libstdc++-v3/crossconfig.m4 gcc-4.6.4.aros/libstdc++-v3/crossconfig.m4
1638 --- gcc-4.6.4/libstdc++-v3/crossconfig.m4 2011-02-04 07:26:57.000000000 +0000
1639 +++ gcc-4.6.4.aros/libstdc++-v3/crossconfig.m4 2015-02-11 11:43:43.826090922 +0000
1640 @@ -5,6 +5,31 @@
1641 AC_DEFUN([GLIBCXX_CROSSCONFIG],[
1642 # Base decisions on target environment.
1643 case "${host}" in
1644 + *-aros*)
1645 + AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h machine/endian.h \
1646 + machine/param.h sys/machine.h sys/types.h fp.h locale.h float.h inttypes.h])
1648 + GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
1649 + GLIBCXX_CHECK_WCHAR_T_SUPPORT
1651 + AC_DEFINE(HAVE_FINITE)
1652 + AC_DEFINE(HAVE_FINITEF)
1653 + AC_DEFINE(HAVE_FREXPF)
1654 + AC_DEFINE(HAVE_HYPOTF)
1655 + AC_DEFINE(HAVE_ISINF)
1656 + AC_DEFINE(HAVE_ISINFF)
1657 + AC_DEFINE(HAVE_ISNAN)
1658 + AC_DEFINE(HAVE_ISNANF)
1659 + AC_DEFINE(HAVE_SINCOS)
1660 + AC_DEFINE(HAVE_SINCOSF)
1661 + if test x"long_double_math_on_this_cpu" = x"yes"; then
1662 + AC_DEFINE(HAVE_FINITEL)
1663 + AC_DEFINE(HAVE_HYPOTL)
1664 + AC_DEFINE(HAVE_ISINFL)
1665 + AC_DEFINE(HAVE_ISNANL)
1666 + fi
1667 + ;;
1669 arm*-*-symbianelf*)
1670 # This is a freestanding configuration; there is nothing to do here.