update gcc 5 patch for current snapshot (20150208)
[AROS.git] / tools / crosstools / gcc-5-20150208-aros.diff
blob70c5096e757c3e5f987627f8926b68117379b5cb
1 diff -ruN gcc-5-20150208/boehm-gc/include/gc_amiga_redirects.h gcc-5-20150208.aros/boehm-gc/include/gc_amiga_redirects.h
2 --- gcc-5-20150208/boehm-gc/include/gc_amiga_redirects.h 2001-08-17 19:30:51.000000000 +0100
3 +++ gcc-5-20150208.aros/boehm-gc/include/gc_amiga_redirects.h 2015-02-11 12:11:29.591059272 +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-5-20150208/boehm-gc/include/gc.h gcc-5-20150208.aros/boehm-gc/include/gc.h
14 --- gcc-5-20150208/boehm-gc/include/gc.h 2014-10-23 09:39:19.000000000 +0100
15 +++ gcc-5-20150208.aros/boehm-gc/include/gc.h 2015-02-11 12:11:10.150863455 +0000
16 @@ -1056,7 +1056,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-5-20150208/configure gcc-5-20150208.aros/configure
26 --- gcc-5-20150208/configure 2015-01-09 21:23:09.000000000 +0000
27 +++ gcc-5-20150208.aros/configure 2015-02-08 21:24:55.289352061 +0000
28 @@ -3826,6 +3826,9 @@
29 powerpcle-*-solaris*)
30 noconfigdirs="$noconfigdirs gdb sim tcl tk itcl"
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 gdb"
38 @@ -3965,6 +3968,8 @@
39 rs6000-*-aix*)
40 host_makefile_frag="config/mh-ppc-aix"
42 + *-*-aros*)
43 + ;;
44 esac
47 diff -ruN gcc-5-20150208/configure.ac gcc-5-20150208.aros/configure.ac
48 --- gcc-5-20150208/configure.ac 2015-01-09 21:23:09.000000000 +0000
49 +++ gcc-5-20150208.aros/configure.ac 2015-02-08 21:24:55.289352061 +0000
50 @@ -1176,6 +1176,9 @@
51 powerpcle-*-solaris*)
52 noconfigdirs="$noconfigdirs gdb sim tcl tk itcl"
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 gdb"
60 @@ -1296,6 +1299,8 @@
61 rs6000-*-aix*)
62 host_makefile_frag="config/mh-ppc-aix"
64 + *-*-aros*)
65 + ;;
66 esac
69 diff -ruN gcc-5-20150208/fixincludes/configure gcc-5-20150208.aros/fixincludes/configure
70 --- gcc-5-20150208/fixincludes/configure 2012-05-29 20:28:57.000000000 +0100
71 +++ gcc-5-20150208.aros/fixincludes/configure 2015-02-08 21:24:55.289352061 +0000
72 @@ -4712,6 +4712,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-5-20150208/fixincludes/configure.ac gcc-5-20150208.aros/fixincludes/configure.ac
81 --- gcc-5-20150208/fixincludes/configure.ac 2012-05-29 20:28:57.000000000 +0100
82 +++ gcc-5-20150208.aros/fixincludes/configure.ac 2015-02-08 21:24:55.289352061 +0000
83 @@ -50,6 +50,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-5-20150208/gcc/config/arm/aros.h gcc-5-20150208.aros/gcc/config/arm/aros.h
92 --- gcc-5-20150208/gcc/config/arm/aros.h 1970-01-01 01:00:00.000000000 +0100
93 +++ gcc-5-20150208.aros/gcc/config/arm/aros.h 2015-02-08 21:24:55.289352061 +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:-isystem %R/include%{!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-5-20150208/gcc/config/arm/t-aros gcc-5-20150208.aros/gcc/config/arm/t-aros
178 --- gcc-5-20150208/gcc/config/arm/t-aros 1970-01-01 01:00:00.000000000 +0100
179 +++ gcc-5-20150208.aros/gcc/config/arm/t-aros 2015-02-08 21:24:55.289352061 +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-5-20150208/gcc/config/aros.h gcc-5-20150208.aros/gcc/config/aros.h
203 --- gcc-5-20150208/gcc/config/aros.h 1970-01-01 01:00:00.000000000 +0100
204 +++ gcc-5-20150208.aros/gcc/config/aros.h 2015-02-08 21:24:55.289352061 +0000
205 @@ -0,0 +1,111 @@
206 +/* Definitions for AROS
207 + Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
208 + Contributed by Fabio Alemagna
209 + Based upon linux.h, contributed by Eric Youngdale.
211 +This file is part of GNU CC.
213 +GNU CC is free software; you can redistribute it and/or modify
214 +it under the terms of the GNU General Public License as published by
215 +the Free Software Foundation; either version 2, or (at your option)
216 +any later version.
218 +GNU CC is distributed in the hope that it will be useful,
219 +but WITHOUT ANY WARRANTY; without even the implied warranty of
220 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
221 +GNU General Public License for more details.
223 +You should have received a copy of the GNU General Public License
224 +along with GNU CC; see the file COPYING. If not, write to
225 +the Free Software Foundation, 59 Temple Place - Suite 330,
226 +Boston, MA 02111-1307, USA. */
228 +/* Don't assume anything about the header files. */
229 +#define NO_IMPLICIT_EXTERN_C
231 +#undef SIZE_TYPE
232 +#define SIZE_TYPE "long unsigned int"
234 +#undef WCHAR_TYPE
235 +#define WCHAR_TYPE "char"
237 +#undef WCHAR_TYPE_SIZE
238 +#define WCHAR_TYPE_SIZE 8
240 +#undef PTRDIFF_TYPE
241 +#define PTRDIFF_TYPE "long int"
243 +#undef TARGET_OS_CPP_BUILTINS
244 +#define TARGET_OS_CPP_BUILTINS() \
245 + do \
246 + { \
247 + builtin_define_std ("AROS"); \
248 + builtin_define ("AMIGA"); \
249 + builtin_define ("_AMIGA"); \
250 + builtin_define ("__ELF__"); \
251 + builtin_assert ("system=posix"); \
252 + } \
253 + while (0)
255 +#undef ASM_APP_ON
256 +#define ASM_APP_ON "#APP\n"
258 +#undef ASM_APP_OFF
259 +#define ASM_APP_OFF "#NO_APP\n"
261 +#undef MD_EXEC_PREFIX
262 +#undef MD_STARTFILE_PREFIX
264 +/* Provide a STARTFILE_SPEC appropriate for AROS. AROS has its own
265 + set of startup files which also take care of handling C++
266 + constructors/destructors. */
268 +#undef STARTFILE_SPEC
269 +#define STARTFILE_SPEC \
270 + "startup.o%s %{detach:detach.o%s} %{nix:nixmain.o%s}"
272 +/* Provide a ENDFILE_SPEC appropriate for AROS. */
274 +#undef ENDFILE_SPEC
275 +#define ENDFILE_SPEC \
276 + "-lautoinit"
278 +#undef INCLUDE_DEFAULTS
279 +#define INCLUDE_DEFAULTS \
280 +{ \
281 + { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, 0, 0 }, \
282 + { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, 0, 1 }, \
283 + { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, 0, 0 }, \
284 + { GCC_INCLUDE_DIR, "GCC", 0, 0, 0, 0 }, \
285 + { NATIVE_SYSTEM_HEADER_DIR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 0, 0 }, \
286 + { 0, 0, 0, 0, 0, 0 } \
287 +}; \
289 +#undef CPP_SPEC
290 +#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}"
292 +/* This is for -profile to use -lc_p instead of -lc. */
293 +#ifndef CC1_SPEC
294 +#define CC1_SPEC "%{profile:-p}"
295 +#endif
297 +/* The GNU C++ standard library requires that these macros be defined. */
298 +#undef CPLUSPLUS_CPP_SPEC
299 +#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
301 +#undef LIB_SPEC
302 +#define LIB_SPEC \
303 + "--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"
305 +#undef LIBSTDCXX_STATIC
306 +#define LIBSTDCXX_STATIC "pthread"
308 +#if !defined(USE_GNULIBC_1) && defined(HAVE_LD_EH_FRAME_HDR)
309 +#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
310 +#endif
312 +/* AROS uses its own collect-like program for the moment. */
313 +#undef LINKER_NAME
314 +#define LINKER_NAME "collect-aros"
316 +#define TARGET_HAS_F_SETLKW
317 diff -ruN gcc-5-20150208/gcc/config/aros.opt gcc-5-20150208.aros/gcc/config/aros.opt
318 --- gcc-5-20150208/gcc/config/aros.opt 1970-01-01 01:00:00.000000000 +0100
319 +++ gcc-5-20150208.aros/gcc/config/aros.opt 2015-02-08 21:24:55.289352061 +0000
320 @@ -0,0 +1,35 @@
321 +; Processor-independent options for AROS.
323 +; Copyright (C) 2015 Free Software Foundation, Inc.
325 +; This file is part of GCC.
327 +; GCC is free software; you can redistribute it and/or modify it under
328 +; the terms of the GNU General Public License as published by the Free
329 +; Software Foundation; either version 3, or (at your option) any later
330 +; version.
332 +; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
333 +; WARRANTY; without even the implied warranty of MERCHANTABILITY or
334 +; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
335 +; for more details.
337 +; You should have received a copy of the GNU General Public License
338 +; along with GCC; see the file COPYING3. If not see
339 +; <http://www.gnu.org/licenses/>.
341 +posix
342 +Driver
344 +noposixc
345 +Driver
347 +nostdc
348 +Driver
350 +nosysbase
351 +Driver
353 +nix
354 +Driver
356 diff -ruN gcc-5-20150208/gcc/config/i386/aros64.h gcc-5-20150208.aros/gcc/config/i386/aros64.h
357 --- gcc-5-20150208/gcc/config/i386/aros64.h 1970-01-01 01:00:00.000000000 +0100
358 +++ gcc-5-20150208.aros/gcc/config/i386/aros64.h 2015-02-08 21:24:55.289352061 +0000
359 @@ -0,0 +1,34 @@
360 +/* Definitions for AMD x86_64 running AROS systems with ELF64 format.
361 + Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002
362 + Free Software Foundation, Inc.
363 + Contributed by Stanislaw Szymczyk <sszymczy@gmail.com>. Based on aros.h.
365 +This file is part of GNU CC.
367 +GNU CC is free software; you can redistribute it and/or modify
368 +it under the terms of the GNU General Public License as published by
369 +the Free Software Foundation; either version 2, or (at your option)
370 +any later version.
372 +GNU CC is distributed in the hope that it will be useful,
373 +but WITHOUT ANY WARRANTY; without even the implied warranty of
374 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
375 +GNU General Public License for more details.
377 +You should have received a copy of the GNU General Public License
378 +along with GNU CC; see the file COPYING. If not, write to
379 +the Free Software Foundation, 59 Temple Place - Suite 330,
380 +Boston, MA 02111-1307, USA. */
382 +/* The svr4 ABI for the i386 says that records and unions are returned
383 + in memory. In the 64bit compilation we will turn this flag off in
384 + override_options, as we never do pcc_struct_return scheme on this target. */
385 +#undef DEFAULT_PCC_STRUCT_RETURN
386 +#define DEFAULT_PCC_STRUCT_RETURN 1
388 +/* Provide a LINK_SPEC appropriate for AROS. */
390 +#undef LINK_SPEC
391 +#define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} -L %R/lib"
393 +/* FIXME: AROS doesn't support dw2 unwinding yet. */
394 diff -ruN gcc-5-20150208/gcc/config/i386/aros.h gcc-5-20150208.aros/gcc/config/i386/aros.h
395 --- gcc-5-20150208/gcc/config/i386/aros.h 1970-01-01 01:00:00.000000000 +0100
396 +++ gcc-5-20150208.aros/gcc/config/i386/aros.h 2015-02-08 21:24:55.289352061 +0000
397 @@ -0,0 +1,25 @@
398 +/* Definitions for Intel 386 running AROS systems with ELF format.
399 + Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002
400 + Free Software Foundation, Inc.
401 + Contributed by Fabio Alemagna.
402 + Based upon i386/linux.h by Eric Youngdale.
404 +This file is part of GNU CC.
406 +GNU CC is free software; you can redistribute it and/or modify
407 +it under the terms of the GNU General Public License as published by
408 +the Free Software Foundation; either version 2, or (at your option)
409 +any later version.
411 +GNU CC is distributed in the hope that it will be useful,
412 +but WITHOUT ANY WARRANTY; without even the implied warranty of
413 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
414 +GNU General Public License for more details.
416 +You should have received a copy of the GNU General Public License
417 +along with GNU CC; see the file COPYING. If not, write to
418 +the Free Software Foundation, 59 Temple Place - Suite 330,
419 +Boston, MA 02111-1307, USA. */
421 +#undef LINK_SPEC
422 +#define LINK_SPEC "-m elf_i386 -L%R/lib"
423 diff -ruN gcc-5-20150208/gcc/config/m68k/m68k.c gcc-5-20150208.aros/gcc/config/m68k/m68k.c
424 --- gcc-5-20150208/gcc/config/m68k/m68k.c 2015-01-15 13:28:42.000000000 +0000
425 +++ gcc-5-20150208.aros/gcc/config/m68k/m68k.c 2015-02-08 21:24:55.289352061 +0000
426 @@ -4469,7 +4469,7 @@
427 else if (letter == '/')
428 asm_fprintf (file, "%R");
429 else if (letter == '?')
430 - asm_fprintf (file, m68k_library_id_string);
431 + asm_fprintf (file, "%s", m68k_library_id_string);
432 else if (letter == 'p')
434 output_addr_const (file, op);
435 diff -ruN gcc-5-20150208/gcc/config/m68k/m68k.h gcc-5-20150208.aros/gcc/config/m68k/m68k.h
436 --- gcc-5-20150208/gcc/config/m68k/m68k.h 2015-01-05 12:33:28.000000000 +0000
437 +++ gcc-5-20150208.aros/gcc/config/m68k/m68k.h 2015-02-08 21:24:55.289352061 +0000
438 @@ -329,7 +329,9 @@
439 register elimination. */
440 #define FIRST_PSEUDO_REGISTER 25
442 -/* All m68k targets (except AmigaOS) use %a5 as the PIC register */
443 +/* All m68k targets (except AmigaOS) use %a5 as the PIC register.
444 + * On AmigaOS, we use %a4
445 + */
446 #define PIC_OFFSET_TABLE_REGNUM \
447 (!flag_pic ? INVALID_REGNUM \
448 : reload_completed ? REGNO (pic_offset_table_rtx) \
449 @@ -419,7 +421,8 @@
450 /* Most m68k targets use %a6 as a frame pointer. The AmigaOS
451 ABI uses %a6 for shared library calls, therefore the frame
452 pointer is shifted to %a5 on this target. */
453 -#define FRAME_POINTER_REGNUM A6_REG
454 +#define FRAME_POINTER_REGNUM A5_REG
455 +#define PIC_REG A4_REG
457 /* Base register for access to arguments of the function.
458 * This isn't a hardware register. It will be eliminated to the
459 diff -ruN gcc-5-20150208/gcc/config/m68k/m68k.md gcc-5-20150208.aros/gcc/config/m68k/m68k.md
460 --- gcc-5-20150208/gcc/config/m68k/m68k.md 2015-01-22 21:24:28.000000000 +0000
461 +++ gcc-5-20150208.aros/gcc/config/m68k/m68k.md 2015-02-08 21:24:55.289352061 +0000
462 @@ -133,7 +133,8 @@
463 [(D0_REG 0)
464 (A0_REG 8)
465 (A1_REG 9)
466 - (PIC_REG 13)
467 + (A4_REG 12)
468 + (A5_REG 13)
469 (A6_REG 14)
470 (SP_REG 15)
471 (FP0_REG 16)
472 @@ -7093,7 +7094,7 @@
474 if (TARGET_ID_SHARED_LIBRARY)
476 - operands[1] = gen_rtx_REG (Pmode, PIC_REG);
477 + operands[1] = gen_rtx_REG (Pmode, A4_REG);
478 return MOTOROLA ? "move.l %?(%1),%0" : "movel %1@(%?), %0";
480 else if (MOTOROLA)
481 diff -ruN gcc-5-20150208/gcc/config/m68k/t-aros gcc-5-20150208.aros/gcc/config/m68k/t-aros
482 --- gcc-5-20150208/gcc/config/m68k/t-aros 1970-01-01 01:00:00.000000000 +0100
483 +++ gcc-5-20150208.aros/gcc/config/m68k/t-aros 2015-02-08 21:24:55.289352061 +0000
484 @@ -0,0 +1,2 @@
485 +# Custom multilibs for AROS
486 +M68K_MLIB_CPU += && match(MLIB, "^68")
487 diff -ruN gcc-5-20150208/gcc/config/rs6000/aros.h gcc-5-20150208.aros/gcc/config/rs6000/aros.h
488 --- gcc-5-20150208/gcc/config/rs6000/aros.h 1970-01-01 01:00:00.000000000 +0100
489 +++ gcc-5-20150208.aros/gcc/config/rs6000/aros.h 2015-02-08 21:24:55.289352061 +0000
490 @@ -0,0 +1,151 @@
491 +/* Definitions for Powerpc running AROS systems with ELF format.
492 + Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002
493 + Free Software Foundation, Inc.
494 + Contributed by Markus Weiss.
495 + Based upon i386/aros.h by Fabio Alemagna.
497 +This file is part of GNU CC.
499 +GNU CC is free software; you can redistribute it and/or modify
500 +it under the terms of the GNU General Public License as published by
501 +the Free Software Foundation; either version 2, or (at your option)
502 +any later version.
504 +GNU CC is distributed in the hope that it will be useful,
505 +but WITHOUT ANY WARRANTY; without even the implied warranty of
506 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
507 +GNU General Public License for more details.
509 +You should have received a copy of the GNU General Public License
510 +along with GNU CC; see the file COPYING. If not, write to
511 +the Free Software Foundation, 59 Temple Place - Suite 330,
512 +Boston, MA 02111-1307, USA. */
514 +/* Symbols missing in comparison to i386/aros.h are either
515 + defined in elfos.h, rs6000/rs6000.h rs6000/sysv4.h
516 + or not needed for PowerPC.
519 +/* We need to define __powerpc__. */
521 +#undef TARGET_OS_CPP_BUILTINS
522 +#define TARGET_OS_CPP_BUILTINS() \
523 + do \
524 + { \
525 + builtin_define_std ("AROS"); \
526 + builtin_define ("AMIGA"); \
527 + builtin_define ("_AMIGA"); \
528 + builtin_define ("__powerpc__"); \
529 + builtin_define ("__ELF__"); \
530 + builtin_assert ("system=posix"); \
531 + if (flag_pic) \
532 + { \
533 + builtin_define ("__PIC__"); \
534 + builtin_define ("__pic__"); \
535 + } \
536 + } \
537 + while (0)
539 +/* This one taken from linux.h. */
540 +/* We are 32-bit all the time, so optimize a little. */
541 +#undef TARGET_64BIT
542 +#define TARGET_64BIT 0
544 +/* The svr4 ABI for the i386 says that records and unions are returned
545 + in memory. */
546 +/*#undef DEFAULT_PCC_STRUCT_RETURN
547 +#define DEFAULT_PCC_STRUCT_RETURN 1
548 +see rs6000/rs6000.h
552 +#undef ASM_COMMENT_START
553 +#define ASM_COMMENT_START "#"
554 +see rs6000/rs6000.h
558 +#undef DBX_REGISTER_NUMBER
559 +#define DBX_REGISTER_NUMBER(n) \
560 + (TARGET_64BIT ? dbx64_register_map[n] : svr4_dbx_register_map[n])
561 +see rs6000/sysv4.h
564 +/* Output assembler code to FILE to call the profiler.
565 + To the best of my knowledge, no Linux libc has required the label
566 + argument to mcount. */
569 +#define NO_PROFILE_COUNTERS 1
570 +not used by other similar ppc compilers
571 +only in darwin.h rs6000/linux64.h rs6000/rs6000.c
575 +#undef MCOUNT_NAME
576 +#define MCOUNT_NAME "mcount"
577 +see rs6000/sysv4.h RS6000_MCOUNT
580 +/* The GLIBC version of mcount for the x86 assumes that there is a
581 + frame, so we cannot allow profiling without a frame pointer. */
583 +#undef SUBTARGET_FRAME_POINTER_REQUIRED
584 +#define SUBTARGET_FRAME_POINTER_REQUIRED crtl->profile
585 +seems to be handled by rs6000/rs6000.h
588 +#undef CC1_SPEC
589 +#define CC1_SPEC "%(cc1_cpu) %{profile:-p}"
591 +/* Provide a LINK_SPEC appropriate for AROS. */
593 +#undef LINK_SPEC
594 +#define LINK_SPEC "-m elf32ppc -L %R/lib"
596 +/* A C statement (sans semicolon) to output to the stdio stream
597 + FILE the assembler definition of uninitialized global DECL named
598 + NAME whose size is SIZE bytes and alignment is ALIGN bytes.
599 + Try to use asm_output_aligned_bss to implement this macro. */
601 +#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
602 + asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
603 +see rs6000/sysv4.h
606 +/* A C statement to output to the stdio stream FILE an assembler
607 + command to advance the location counter to a multiple of 1<<LOG
608 + bytes if it is within MAX_SKIP bytes.
610 + This is used to align code labels according to Intel recommendations. */
612 +#ifdef HAVE_GAS_MAX_SKIP_P2ALIGN
613 +#define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE,LOG,MAX_SKIP) \
614 + do { \
615 + if ((LOG) != 0) { \
616 + if ((MAX_SKIP) == 0) fprintf ((FILE), "\t.p2align %d\n", (LOG)); \
617 + else fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)); \
618 + } \
619 + } while (0)
620 +#endif
621 +see rs6000/sysv4.h
624 +/* Handle special EH pointer encodings. Absolute, pc-relative, and
625 + indirect are handled automatically. */
627 +#define ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX(FILE, ENCODING, SIZE, ADDR, DONE) \
628 + do { \
629 + if ((SIZE) == 4 && ((ENCODING) & 0x70) == DW_EH_PE_datarel) \
630 + { \
631 + fputs (ASM_LONG, FILE); \
632 + assemble_name (FILE, XSTR (ADDR, 0)); \
633 + fputs (((ENCODING) & DW_EH_PE_indirect ? "@GOT" : "@GOTOFF"), FILE); \
634 + goto DONE; \
635 + } \
636 + } while (0)
637 +not used for PowerPC
640 +/* FIXME: AROS doesn't support dw2 unwinding yet. */
641 +#undef MD_FALLBACK_FRAME_STATE_FOR
642 diff -ruN gcc-5-20150208/gcc/config/rs6000/rs6000.c gcc-5-20150208.aros/gcc/config/rs6000/rs6000.c
643 --- gcc-5-20150208/gcc/config/rs6000/rs6000.c 2015-01-23 23:02:25.000000000 +0000
644 +++ gcc-5-20150208.aros/gcc/config/rs6000/rs6000.c 2015-02-08 21:24:55.289352061 +0000
645 @@ -1316,6 +1316,8 @@
646 false },
647 { "shortcall", 0, 0, false, true, true, rs6000_handle_longcall_attribute,
648 false },
649 + { "stackparm", 0, 0, false, true, true, rs6000_handle_longcall_attribute,
650 + false },
651 { "ms_struct", 0, 0, false, false, false, rs6000_handle_struct_attribute,
652 false },
653 { "gcc_struct", 0, 0, false, false, false, rs6000_handle_struct_attribute,
654 @@ -9269,6 +9271,9 @@
655 && !lookup_attribute ("shortcall", TYPE_ATTRIBUTES (fntype))))
656 cum->call_cookie |= CALL_LONG;
658 + cum->stackparm = fntype && lookup_attribute("stackparm",
659 + TYPE_ATTRIBUTES(fntype));
661 if (TARGET_DEBUG_ARG)
663 fprintf (stderr, "\ninit_cumulative_args:");
664 @@ -10404,6 +10409,9 @@
666 rs6000_discover_homogeneous_aggregate (mode, type, &elt_mode, &n_elts);
668 + if (cum->stackparm)
669 + return NULL_RTX;
671 if (TARGET_MACHO && rs6000_darwin64_struct_check_p (mode, type))
673 rtx rslt = rs6000_darwin64_record_arg (cum, type, named, /*retval= */false);
674 @@ -11006,6 +11014,9 @@
675 int first_reg_offset;
676 alias_set_type set;
678 + if (cum->stackparm)
679 + return;
681 /* Skip the last named argument. */
682 next_cum = *get_cumulative_args (cum);
683 rs6000_function_arg_advance_1 (&next_cum, mode, type, true, 0);
684 diff -ruN gcc-5-20150208/gcc/config/rs6000/rs6000.h gcc-5-20150208.aros/gcc/config/rs6000/rs6000.h
685 --- gcc-5-20150208/gcc/config/rs6000/rs6000.h 2015-01-16 16:31:37.000000000 +0000
686 +++ gcc-5-20150208.aros/gcc/config/rs6000/rs6000.h 2015-02-08 21:24:55.289352061 +0000
687 @@ -1765,6 +1765,7 @@
688 int nargs_prototype; /* # args left in the current prototype */
689 int prototype; /* Whether a prototype was defined */
690 int stdarg; /* Whether function is a stdarg function. */
691 + int stackparm; /* Whether function has all args on the stack */
692 int call_cookie; /* Do special things for this call */
693 int sysv_gregno; /* next available GP register */
694 int intoffset; /* running offset in struct (darwin64) */
695 diff -ruN gcc-5-20150208/gcc/config/t-aros gcc-5-20150208.aros/gcc/config/t-aros
696 --- gcc-5-20150208/gcc/config/t-aros 1970-01-01 01:00:00.000000000 +0100
697 +++ gcc-5-20150208.aros/gcc/config/t-aros 2015-02-08 21:24:55.289352061 +0000
698 @@ -0,0 +1,29 @@
699 +# In AROS, "/usr" is a four-letter word.
700 +# Must match NATIVE_SYSTEM_HEADER_COMPONENT in aros.h !
701 +NATIVE_SYSTEM_HEADER_DIR = /include
703 +# Don't add AROS target include path when compiling host compiler
704 +CPPFLAGS =
706 +# Copy AROS specific include replacement files
707 +LIBGCC_DEPS += stmp-aros-hrds
709 +EXTRA_AROS_HEADERS = aros/types/size_t.h aros/types/ptrdiff_t.h \
710 + aros/types/wchar_t.h aros/types/wint_t.h aros/types/null.h
712 +stmp-int-hdrs : | include/aros/types
714 +include/aros/types : $(addprefix $(srcdir)/ginclude/,$(EXTRA_AROS_HEADERS))
715 + -if [ -d include ] ; then true; else mkdir include; chmod a+rx include; fi
716 + -if [ -d include/aros/types ] ; \
717 + then true; \
718 + else \
719 + mkdir include/aros; chmod a+rx include/aros; \
720 + mkdir include/aros/types; chmod a+rx include/aros/types; \
721 + fi
722 + for file in $(EXTRA_AROS_HEADERS); do \
723 + $(STAMP) include/$$file; \
724 + rm -fr include/$$file; \
725 + cp $(srcdir)/ginclude/$$file include/$$file; \
726 + chmod a+r include/$$file; \
727 + done
728 diff -ruN gcc-5-20150208/gcc/config.build gcc-5-20150208.aros/gcc/config.build
729 --- gcc-5-20150208/gcc/config.build 2015-01-05 12:33:28.000000000 +0000
730 +++ gcc-5-20150208.aros/gcc/config.build 2015-02-08 21:24:55.289352061 +0000
731 @@ -102,6 +102,9 @@
732 # HP 9000 series 300
733 build_install_headers_dir=install-headers-cpio
735 + *-*-aros*)
736 + build_xm_file=xm-aros.h
737 + ;;
738 *-*-sysv*)
739 # All other System V variants.
740 build_install_headers_dir=install-headers-cpio
741 diff -ruN gcc-5-20150208/gcc/config.gcc gcc-5-20150208.aros/gcc/config.gcc
742 --- gcc-5-20150208/gcc/config.gcc 2015-01-15 20:11:12.000000000 +0000
743 +++ gcc-5-20150208.aros/gcc/config.gcc 2015-02-08 21:24:55.289352061 +0000
744 @@ -774,6 +774,15 @@
746 esac
748 +*-*-aros*)
749 + gas=yes
750 + gnu_ld=yes
751 + thread_file=posix
752 + use_collect2=no
753 + xm_defines='STDC_HEADERS=1'
754 + extra_options="${extra_options} aros.opt"
755 + ;;
757 *-*-openbsd*)
758 tmake_file="t-openbsd"
759 case ${enable_threads} in
760 @@ -956,6 +965,16 @@
761 tm_file="${tm_file} vms/vms.h alpha/vms.h"
762 tmake_file="${tmake_file} alpha/t-vms"
764 +arm*-*-aros*)
765 + tm_file="dbxelf.h elfos.h arm/elf.h arm/bpabi.h aros.h arm/aros.h arm/aout.h arm/arm.h"
766 + tm_file="$tm_file ../../libgcc/config/arm/bpabi-lib.h"
767 + tmake_file="${tmake_file} arm/t-arm arm/t-arm-elf arm/t-arm-softfp arm/t-bpabi arm/t-aros t-aros"
768 + xm_file="xm-aros.h"
769 + # The BPABI long long divmod functions return a 128-bit value in
770 + # registers r0-r3. Correctly modeling that requires the use of
771 + # TImode.
772 + need_64bit_hwint=yes
773 + ;;
774 arc*-*-elf*)
775 extra_headers="arc-simd.h"
776 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
777 @@ -1540,6 +1559,16 @@
778 done
779 TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
781 +i[34567]86-*-aros*)
782 + tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/i386elf.h aros.h i386/aros.h"
783 + xm_file=xm-aros.h
784 + tmake_file="${tmake_file} i386/t-i386elf t-aros"
785 + ;;
786 +x86_64-*-aros*)
787 + 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"
788 + tmake_file="${tmake_file} i386/t-i386elf t-aros"
789 + xm_file=xm-aros.h
790 + ;;
791 i[34567]86-pc-msdosdjgpp*)
792 xm_file=i386/xm-djgpp.h
793 tm_file="dbxcoff.h ${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/djgpp.h i386/djgpp-stdint.h"
794 @@ -1837,6 +1866,16 @@
795 thread_file='posix'
798 +m68k-*-aros*)
799 + default_m68k_cpu=68000
800 + default_cf_cpu=5206
801 + 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"
802 + tm_file="${tm_file} aros.h"
803 + tm_defines="${tm_defines} MOTOROLA=1"
804 + tmake_file="m68k/t-floatlib m68k/t-m68kbare m68k/t-m68kelf"
805 + tmake_file="$tmake_file m68k/t-aros m68k/t-mlibs t-aros"
806 + extra_parts="crtbegin.o crtend.o"
807 + ;;
808 m68k-*-elf* | fido-*-elf*)
809 case ${target} in
810 fido-*-elf*)
811 @@ -2333,6 +2372,13 @@
812 extra_options="${extra_options} rs6000/sysv4.opt"
813 tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-rtems rs6000/t-ppccomm"
815 +powerpc-*-aros*)
816 + tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h aros.h"
817 + extra_options="${extra_options} rs6000/sysv4.opt"
818 + tm_file="${tm_file} rs6000/aros.h"
819 + xm_file=xm-aros.h
820 + tmake_file="$tmake_file t-aros"
821 + ;;
822 powerpc*-*-linux*)
823 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h rs6000/sysv4.h"
824 extra_options="${extra_options} rs6000/sysv4.opt"
825 diff -ruN gcc-5-20150208/gcc/config.host gcc-5-20150208.aros/gcc/config.host
826 --- gcc-5-20150208/gcc/config.host 2015-01-09 14:06:02.000000000 +0000
827 +++ gcc-5-20150208.aros/gcc/config.host 2015-02-08 21:24:55.289352061 +0000
828 @@ -276,6 +276,10 @@
829 out_host_hook_obj=host-hpux.o
830 host_xmake_file="${host_xmake_file} x-hpux"
832 + *-*-aros*)
833 + host_can_use_collect2=no
834 + host_xm_file=xm-aros.h
835 + ;;
836 *-*-*vms*)
837 host_xm_file="vms/xm-vms.h"
838 host_xmake_file=vms/x-vms
839 diff -ruN gcc-5-20150208/gcc/ginclude/aros/types/null.h gcc-5-20150208.aros/gcc/ginclude/aros/types/null.h
840 --- gcc-5-20150208/gcc/ginclude/aros/types/null.h 1970-01-01 01:00:00.000000000 +0100
841 +++ gcc-5-20150208.aros/gcc/ginclude/aros/types/null.h 2015-02-08 21:24:55.289352061 +0000
842 @@ -0,0 +1,3 @@
843 +/* Replace AROS' NULL definition with gcc's one */
844 +#define __need_NULL
845 +#include <stddef.h>
846 diff -ruN gcc-5-20150208/gcc/ginclude/aros/types/ptrdiff_t.h gcc-5-20150208.aros/gcc/ginclude/aros/types/ptrdiff_t.h
847 --- gcc-5-20150208/gcc/ginclude/aros/types/ptrdiff_t.h 1970-01-01 01:00:00.000000000 +0100
848 +++ gcc-5-20150208.aros/gcc/ginclude/aros/types/ptrdiff_t.h 2015-02-08 21:24:55.289352061 +0000
849 @@ -0,0 +1,3 @@
850 +/* Replace AROS' ptrdiff_t definition with gcc's one */
851 +#define __need_ptrdiff_t
852 +#include <stddef.h>
853 diff -ruN gcc-5-20150208/gcc/ginclude/aros/types/size_t.h gcc-5-20150208.aros/gcc/ginclude/aros/types/size_t.h
854 --- gcc-5-20150208/gcc/ginclude/aros/types/size_t.h 1970-01-01 01:00:00.000000000 +0100
855 +++ gcc-5-20150208.aros/gcc/ginclude/aros/types/size_t.h 2015-02-08 21:24:55.289352061 +0000
856 @@ -0,0 +1,3 @@
857 +/* Replace AROS' size_t definition with gcc's one */
858 +#define __need_size_t
859 +#include <stddef.h>
860 diff -ruN gcc-5-20150208/gcc/ginclude/aros/types/wchar_t.h gcc-5-20150208.aros/gcc/ginclude/aros/types/wchar_t.h
861 --- gcc-5-20150208/gcc/ginclude/aros/types/wchar_t.h 1970-01-01 01:00:00.000000000 +0100
862 +++ gcc-5-20150208.aros/gcc/ginclude/aros/types/wchar_t.h 2015-02-08 21:24:55.289352061 +0000
863 @@ -0,0 +1,3 @@
864 +/* Replace AROS' wchar_t definition with gcc's one */
865 +#define __need_wchar_t
866 +#include <stddef.h>
867 diff -ruN gcc-5-20150208/gcc/ginclude/aros/types/wint_t.h gcc-5-20150208.aros/gcc/ginclude/aros/types/wint_t.h
868 --- gcc-5-20150208/gcc/ginclude/aros/types/wint_t.h 1970-01-01 01:00:00.000000000 +0100
869 +++ gcc-5-20150208.aros/gcc/ginclude/aros/types/wint_t.h 2015-02-08 21:24:55.289352061 +0000
870 @@ -0,0 +1,3 @@
871 +/* Replace AROS' wint_t definition with gcc's one */
872 +#define __need_wint_t
873 +#include <stddef.h>
874 diff -ruN gcc-5-20150208/gcc/ginclude/stddef.h gcc-5-20150208.aros/gcc/ginclude/stddef.h
875 --- gcc-5-20150208/gcc/ginclude/stddef.h 2015-01-05 12:33:28.000000000 +0000
876 +++ gcc-5-20150208.aros/gcc/ginclude/stddef.h 2015-02-08 21:24:55.289352061 +0000
877 @@ -131,6 +131,7 @@
878 #ifndef __PTRDIFF_T
879 #ifndef _PTRDIFF_T_
880 #ifndef _BSD_PTRDIFF_T_
881 +#ifndef _AROS_TYPES_PTRDIFF_T_H
882 #ifndef ___int_ptrdiff_t_h
883 #ifndef _GCC_PTRDIFF_T
884 #ifndef _PTRDIFF_T_DECLARED /* DragonFly */
885 @@ -140,6 +141,7 @@
886 #define __PTRDIFF_T
887 #define _PTRDIFF_T_
888 #define _BSD_PTRDIFF_T_
889 +#define _AROS_TYPES_PTRDIFF_T_H
890 #define ___int_ptrdiff_t_h
891 #define _GCC_PTRDIFF_T
892 #define _PTRDIFF_T_DECLARED
893 @@ -150,6 +152,7 @@
894 #endif /* _PTRDIFF_T_DECLARED */
895 #endif /* _GCC_PTRDIFF_T */
896 #endif /* ___int_ptrdiff_t_h */
897 +#endif /* _AROS_TYPES_PTRDIFF_T_H */
898 #endif /* _BSD_PTRDIFF_T_ */
899 #endif /* _PTRDIFF_T_ */
900 #endif /* __PTRDIFF_T */
901 @@ -176,6 +179,7 @@
902 #ifndef __SIZE_T
903 #ifndef _SIZE_T_
904 #ifndef _BSD_SIZE_T_
905 +#ifndef _AROS_TYPES_SIZE_T_H
906 #ifndef _SIZE_T_DEFINED_
907 #ifndef _SIZE_T_DEFINED
908 #ifndef _BSD_SIZE_T_DEFINED_ /* Darwin */
909 @@ -193,6 +197,7 @@
910 #define __SIZE_T
911 #define _SIZE_T_
912 #define _BSD_SIZE_T_
913 +#define _AROS_TYPES_SIZE_T_H
914 #define _SIZE_T_DEFINED_
915 #define _SIZE_T_DEFINED
916 #define _BSD_SIZE_T_DEFINED_ /* Darwin */
917 @@ -226,6 +231,7 @@
918 #endif /* _BSD_SIZE_T_DEFINED_ */
919 #endif /* _SIZE_T_DEFINED */
920 #endif /* _SIZE_T_DEFINED_ */
921 +#endif /* _AROS_TYPES_SIZE_T_H */
922 #endif /* _BSD_SIZE_T_ */
923 #endif /* _SIZE_T_ */
924 #endif /* __SIZE_T */
925 diff -ruN gcc-5-20150208/include/filenames.h gcc-5-20150208.aros/include/filenames.h
926 --- gcc-5-20150208/include/filenames.h 2014-11-11 23:33:25.000000000 +0000
927 +++ gcc-5-20150208.aros/include/filenames.h 2015-02-08 21:24:55.289352061 +0000
928 @@ -42,6 +42,10 @@
929 # define HAS_DRIVE_SPEC(f) HAS_DOS_DRIVE_SPEC (f)
930 # define IS_DIR_SEPARATOR(c) IS_DOS_DIR_SEPARATOR (c)
931 # define IS_ABSOLUTE_PATH(f) IS_DOS_ABSOLUTE_PATH (f)
932 +#elif defined __AROS__
933 +# define IS_DIR_SEPARATOR(c) ((c) == '/' || (c) == ':')
934 +# define IS_ABSOLUTE_PATH(f) (IS_DIR_SEPARATOR((f)[0]) || (strchr((f), ':')))
935 +# define HAVE_CASE_INSENSITIVE_FILE_SYSTEM
936 #else /* not DOSish */
937 # if defined(__APPLE__)
938 # ifndef HAVE_CASE_INSENSITIVE_FILE_SYSTEM
939 diff -ruN gcc-5-20150208/libgcc/config.host gcc-5-20150208.aros/libgcc/config.host
940 --- gcc-5-20150208/libgcc/config.host 2015-01-23 19:46:43.000000000 +0000
941 +++ gcc-5-20150208.aros/libgcc/config.host 2015-02-08 21:24:55.289352061 +0000
942 @@ -766,7 +766,7 @@
943 m32rle-*-linux*)
944 tmake_file="$tmake_file m32r/t-linux t-fdpbit"
946 -m68k-*-elf* | fido-*-elf)
947 +m68k-*-elf* | fido-*-elf | m68k-*-aros*)
948 tmake_file="$tmake_file m68k/t-floatlib"
950 m68k*-*-netbsdelf*)
951 @@ -1277,6 +1277,9 @@
952 tmake_file="$tmake_file nvptx/t-nvptx"
953 extra_parts="crt0.o"
955 +*-*-aros*)
956 + tmake_file=
957 + ;;
959 echo "*** Configuration ${host} not supported" 1>&2
960 exit 1
961 diff -ruN gcc-5-20150208/libgcc/gthr.h gcc-5-20150208.aros/libgcc/gthr.h
962 --- gcc-5-20150208/libgcc/gthr.h 2015-01-05 12:33:28.000000000 +0000
963 +++ gcc-5-20150208.aros/libgcc/gthr.h 2015-02-08 21:24:55.289352061 +0000
964 @@ -141,6 +141,11 @@
965 #define GTHREAD_USE_WEAK 0
966 #endif
968 +#ifdef __AROS__
969 +#undef GTHREAD_USE_WEAK
970 +#define GTHREAD_USE_WEAK 0
971 +#endif
973 #ifndef GTHREAD_USE_WEAK
974 #define GTHREAD_USE_WEAK 1
975 #endif
976 diff -ruN gcc-5-20150208/libgcc/unwind-dw2-fde.c gcc-5-20150208.aros/libgcc/unwind-dw2-fde.c
977 --- gcc-5-20150208/libgcc/unwind-dw2-fde.c 2015-01-05 12:33:28.000000000 +0000
978 +++ gcc-5-20150208.aros/libgcc/unwind-dw2-fde.c 2015-02-08 21:24:55.289352061 +0000
979 @@ -92,12 +92,16 @@
980 #endif
982 init_object_mutex_once ();
983 +#ifndef __AROS__ /* This is called when SysBase is not yet set up */
984 __gthread_mutex_lock (&object_mutex);
985 +#endif
987 ob->next = unseen_objects;
988 unseen_objects = ob;
990 +#ifndef __AROS__
991 __gthread_mutex_unlock (&object_mutex);
992 +#endif
995 void
996 diff -ruN gcc-5-20150208/libiberty/filename_cmp.c gcc-5-20150208.aros/libiberty/filename_cmp.c
997 --- gcc-5-20150208/libiberty/filename_cmp.c 2014-11-11 23:33:25.000000000 +0000
998 +++ gcc-5-20150208.aros/libiberty/filename_cmp.c 2015-02-08 21:24:55.289352061 +0000
999 @@ -55,9 +55,12 @@
1001 filename_cmp (const char *s1, const char *s2)
1003 -#if !defined(HAVE_DOS_BASED_FILE_SYSTEM) \
1004 - && !defined(HAVE_CASE_INSENSITIVE_FILE_SYSTEM)
1005 +#if !defined(HAVE_DOS_BASED_FILE_SYSTEM)
1006 +#if defined(HAVE_CASE_INSENSITIVE_FILE_SYSTEM)
1007 + return strcasecmp(s1, s2);
1008 +#else
1009 return strcmp(s1, s2);
1010 +#endif
1011 #else
1012 for (;;)
1014 diff -ruN gcc-5-20150208/libobjc/configure gcc-5-20150208.aros/libobjc/configure
1015 --- gcc-5-20150208/libobjc/configure 2015-01-26 02:53:23.000000000 +0000
1016 +++ gcc-5-20150208.aros/libobjc/configure 2015-02-08 21:24:55.289352061 +0000
1017 @@ -11256,214 +11256,7 @@
1018 # -----------
1020 # Check if we have thread-local storage
1023 - # Check whether --enable-tls was given.
1024 -if test "${enable_tls+set}" = set; then :
1025 - enableval=$enable_tls;
1026 - case "$enableval" in
1027 - yes|no) ;;
1028 - *) as_fn_error "Argument to enable/disable tls must be yes or no" "$LINENO" 5 ;;
1029 - esac
1031 -else
1032 - enable_tls=yes
1036 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the target supports thread-local storage" >&5
1037 -$as_echo_n "checking whether the target supports thread-local storage... " >&6; }
1038 -if test "${gcc_cv_have_tls+set}" = set; then :
1039 - $as_echo_n "(cached) " >&6
1040 -else
1042 - if test "$cross_compiling" = yes; then :
1043 - if test x$gcc_no_link = xyes; then
1044 - as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
1046 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1047 -/* end confdefs.h. */
1048 -__thread int a; int b; int main() { return a = b; }
1049 -_ACEOF
1050 -if ac_fn_c_try_link "$LINENO"; then :
1051 - chktls_save_LDFLAGS="$LDFLAGS"
1052 - case $host in
1053 - *-*-linux*)
1054 - LDFLAGS="-shared -Wl,--no-undefined $LDFLAGS"
1055 - ;;
1056 - esac
1057 - chktls_save_CFLAGS="$CFLAGS"
1058 - CFLAGS="-fPIC $CFLAGS"
1059 - if test x$gcc_no_link = xyes; then
1060 - as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
1062 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1063 -/* end confdefs.h. */
1064 -int f() { return 0; }
1065 -_ACEOF
1066 -if ac_fn_c_try_link "$LINENO"; then :
1067 - if test x$gcc_no_link = xyes; then
1068 - as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
1070 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1071 -/* end confdefs.h. */
1072 -__thread int a; int b; int f() { return a = b; }
1073 -_ACEOF
1074 -if ac_fn_c_try_link "$LINENO"; then :
1075 - gcc_cv_have_tls=yes
1076 -else
1077 - gcc_cv_have_tls=no
1079 -rm -f core conftest.err conftest.$ac_objext \
1080 - conftest$ac_exeext conftest.$ac_ext
1081 -else
1082 - gcc_cv_have_tls=yes
1084 -rm -f core conftest.err conftest.$ac_objext \
1085 - conftest$ac_exeext conftest.$ac_ext
1086 - CFLAGS="$chktls_save_CFLAGS"
1087 - LDFLAGS="$chktls_save_LDFLAGS"
1088 -else
1089 - gcc_cv_have_tls=no
1091 -rm -f core conftest.err conftest.$ac_objext \
1092 - conftest$ac_exeext conftest.$ac_ext
1095 -else
1096 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1097 -/* end confdefs.h. */
1098 -__thread int a; int b; int main() { return a = b; }
1099 -_ACEOF
1100 -if ac_fn_c_try_run "$LINENO"; then :
1101 - chktls_save_LDFLAGS="$LDFLAGS"
1102 - LDFLAGS="-static $LDFLAGS"
1103 - if test x$gcc_no_link = xyes; then
1104 - as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
1106 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1107 -/* end confdefs.h. */
1108 -int main() { return 0; }
1109 -_ACEOF
1110 -if ac_fn_c_try_link "$LINENO"; then :
1111 - if test "$cross_compiling" = yes; then :
1112 - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
1113 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1114 -as_fn_error "cannot run test program while cross compiling
1115 -See \`config.log' for more details." "$LINENO" 5; }
1116 -else
1117 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1118 -/* end confdefs.h. */
1119 -__thread int a; int b; int main() { return a = b; }
1120 -_ACEOF
1121 -if ac_fn_c_try_run "$LINENO"; then :
1122 - gcc_cv_have_tls=yes
1123 -else
1124 - gcc_cv_have_tls=no
1126 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
1127 - conftest.$ac_objext conftest.beam conftest.$ac_ext
1130 -else
1131 - gcc_cv_have_tls=yes
1133 -rm -f core conftest.err conftest.$ac_objext \
1134 - conftest$ac_exeext conftest.$ac_ext
1135 - LDFLAGS="$chktls_save_LDFLAGS"
1136 - if test $gcc_cv_have_tls = yes; then
1137 - chktls_save_CFLAGS="$CFLAGS"
1138 - thread_CFLAGS=failed
1139 - for flag in '' '-pthread' '-lpthread'; do
1140 - CFLAGS="$flag $chktls_save_CFLAGS"
1141 - if test x$gcc_no_link = xyes; then
1142 - as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
1144 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1145 -/* end confdefs.h. */
1146 -#include <pthread.h>
1147 - void *g(void *d) { return NULL; }
1148 -int
1149 -main ()
1151 -pthread_t t; pthread_create(&t,NULL,g,NULL);
1153 - return 0;
1155 -_ACEOF
1156 -if ac_fn_c_try_link "$LINENO"; then :
1157 - thread_CFLAGS="$flag"
1159 -rm -f core conftest.err conftest.$ac_objext \
1160 - conftest$ac_exeext conftest.$ac_ext
1161 - if test "X$thread_CFLAGS" != Xfailed; then
1162 - break
1163 - fi
1164 - done
1165 - CFLAGS="$chktls_save_CFLAGS"
1166 - if test "X$thread_CFLAGS" != Xfailed; then
1167 - CFLAGS="$thread_CFLAGS $chktls_save_CFLAGS"
1168 - if test "$cross_compiling" = yes; then :
1169 - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
1170 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1171 -as_fn_error "cannot run test program while cross compiling
1172 -See \`config.log' for more details." "$LINENO" 5; }
1173 -else
1174 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1175 -/* end confdefs.h. */
1176 -#include <pthread.h>
1177 - __thread int a;
1178 - static int *volatile a_in_other_thread;
1179 - static void *
1180 - thread_func (void *arg)
1182 - a_in_other_thread = &a;
1183 - return (void *)0;
1185 -int
1186 -main ()
1188 -pthread_t thread;
1189 - void *thread_retval;
1190 - int *volatile a_in_main_thread;
1191 - a_in_main_thread = &a;
1192 - if (pthread_create (&thread, (pthread_attr_t *)0,
1193 - thread_func, (void *)0))
1194 - return 0;
1195 - if (pthread_join (thread, &thread_retval))
1196 - return 0;
1197 - return (a_in_other_thread == a_in_main_thread);
1199 - return 0;
1201 -_ACEOF
1202 -if ac_fn_c_try_run "$LINENO"; then :
1203 - gcc_cv_have_tls=yes
1204 -else
1205 - gcc_cv_have_tls=no
1207 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
1208 - conftest.$ac_objext conftest.beam conftest.$ac_ext
1211 - CFLAGS="$chktls_save_CFLAGS"
1212 - fi
1213 - fi
1214 -else
1215 - gcc_cv_have_tls=no
1217 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
1218 - conftest.$ac_objext conftest.beam conftest.$ac_ext
1222 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_have_tls" >&5
1223 -$as_echo "$gcc_cv_have_tls" >&6; }
1224 - if test "$enable_tls $gcc_cv_have_tls" = "yes yes"; then
1226 -$as_echo "#define HAVE_TLS 1" >>confdefs.h
1228 - fi
1229 +#dnl GCC_ENABLE_TLS
1231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for exception model to use" >&5
1232 $as_echo_n "checking for exception model to use... " >&6; }
1233 diff -ruN gcc-5-20150208/libobjc/configure.ac gcc-5-20150208.aros/libobjc/configure.ac
1234 --- gcc-5-20150208/libobjc/configure.ac 2015-01-05 12:33:28.000000000 +0000
1235 +++ gcc-5-20150208.aros/libobjc/configure.ac 2015-02-08 21:24:55.289352061 +0000
1236 @@ -210,7 +210,7 @@
1237 # -----------
1239 # Check if we have thread-local storage
1240 -GCC_CHECK_TLS
1241 +dnl GCC_CHECK_TLS
1243 AC_MSG_CHECKING([for exception model to use])
1244 AC_LANG_PUSH(C)
1245 diff -ruN gcc-5-20150208/libobjc/thr.c gcc-5-20150208.aros/libobjc/thr.c
1246 --- gcc-5-20150208/libobjc/thr.c 2015-01-05 12:33:28.000000000 +0000
1247 +++ gcc-5-20150208.aros/libobjc/thr.c 2015-02-08 21:24:55.289352061 +0000
1248 @@ -40,6 +40,7 @@
1249 #include "objc/runtime.h"
1250 #include "objc-private/module-abi-8.h"
1251 #include "objc-private/runtime.h"
1252 +#define __typedef_BOOL /* Remove definition of BOOL */
1253 #include <gthr.h>
1255 #include <stdlib.h>
1256 diff -ruN gcc-5-20150208/libstdc++-v3/config/os/aros/ctype_base.h gcc-5-20150208.aros/libstdc++-v3/config/os/aros/ctype_base.h
1257 --- gcc-5-20150208/libstdc++-v3/config/os/aros/ctype_base.h 1970-01-01 01:00:00.000000000 +0100
1258 +++ gcc-5-20150208.aros/libstdc++-v3/config/os/aros/ctype_base.h 2015-02-08 21:24:55.289352061 +0000
1259 @@ -0,0 +1,30 @@
1260 +namespace std _GLIBCXX_VISIBILITY(default)
1262 +_GLIBCXX_BEGIN_NAMESPACE_VERSION
1264 +struct ctype_base {
1265 + /* Non-standard typedefs */
1266 + typedef int * __to_type;
1268 + /* NB: Offsets into ctype<char>::_M_table force a particular size
1269 + on the mask type. Because of this, we don't use an enum. */
1270 + typedef unsigned short int mask;
1272 + static const mask upper = _ISupper;
1273 + static const mask lower = _ISlower;
1274 + static const mask alpha = _ISalpha;
1275 + static const mask digit = _ISdigit;
1276 + static const mask xdigit = _ISxdigit;
1277 + static const mask space = _ISspace;
1278 + static const mask print = _ISprint;
1279 + static const mask graph = _ISgraph;
1280 + static const mask cntrl = _IScntrl;
1281 + static const mask punct = _ISpunct;
1282 + static const mask alnum = _ISalnum;
1283 +#if __cplusplus >= 201103L
1284 + static const mask blank = _ISblank;
1285 +#endif
1288 +_GLIBCXX_END_NAMESPACE_VERSION
1289 +} // namespace
1290 diff -ruN gcc-5-20150208/libstdc++-v3/config/os/aros/ctype_configure_char.cc gcc-5-20150208.aros/libstdc++-v3/config/os/aros/ctype_configure_char.cc
1291 --- gcc-5-20150208/libstdc++-v3/config/os/aros/ctype_configure_char.cc 1970-01-01 01:00:00.000000000 +0100
1292 +++ gcc-5-20150208.aros/libstdc++-v3/config/os/aros/ctype_configure_char.cc 2015-02-08 21:24:55.289352061 +0000
1293 @@ -0,0 +1,99 @@
1294 +// Locale support -*- C++ -*-
1296 +// Copyright (C) 2011-2013 Free Software Foundation, Inc.
1298 +// This file is part of the GNU ISO C++ Library. This library is free
1299 +// software; you can redistribute it and/or modify it under the
1300 +// terms of the GNU General Public License as published by the
1301 +// Free Software Foundation; either version 3, or (at your option)
1302 +// any later version.
1304 +// This library is distributed in the hope that it will be useful,
1305 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
1306 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1307 +// GNU General Public License for more details.
1309 +// Under Section 7 of GPL version 3, you are granted additional
1310 +// permissions described in the GCC Runtime Library Exception, version
1311 +// 3.1, as published by the Free Software Foundation.
1313 +// You should have received a copy of the GNU General Public License and
1314 +// a copy of the GCC Runtime Library Exception along with this program;
1315 +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
1316 +// <http://www.gnu.org/licenses/>.
1318 +/** @file ctype_configure_char.cc */
1321 +// ISO C++ 14882: 22.1 Locales
1324 +#include <locale>
1325 +#include <cstdlib>
1326 +#include <cstring>
1328 +namespace std _GLIBCXX_VISIBILITY(default)
1330 +_GLIBCXX_BEGIN_NAMESPACE_VERSION
1332 +// Information as gleaned from /usr/include/ctype.h
1334 + const ctype_base::mask*
1335 + ctype<char>::classic_table() throw()
1336 + { return 0; }
1338 + ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
1339 + size_t __refs)
1340 + : facet(__refs), _M_del(__table != 0 && __del),
1341 + _M_toupper(NULL), _M_tolower(NULL),
1342 + _M_table(__table ? __table : classic_table())
1343 + {
1344 + memset(_M_widen, 0, sizeof(_M_widen));
1345 + _M_widen_ok = 0;
1346 + memset(_M_narrow, 0, sizeof(_M_narrow));
1347 + _M_narrow_ok = 0;
1350 + ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
1351 + : facet(__refs), _M_del(__table != 0 && __del),
1352 + _M_toupper(NULL), _M_tolower(NULL),
1353 + _M_table(__table ? __table : classic_table())
1354 + {
1355 + memset(_M_widen, 0, sizeof(_M_widen));
1356 + _M_widen_ok = 0;
1357 + memset(_M_narrow, 0, sizeof(_M_narrow));
1358 + _M_narrow_ok = 0;
1361 + char
1362 + ctype<char>::do_toupper(char __c) const
1363 + { return ::toupper((int) __c); }
1365 + const char*
1366 + ctype<char>::do_toupper(char* __low, const char* __high) const
1368 + while (__low < __high)
1370 + *__low = ::toupper((int) *__low);
1371 + ++__low;
1373 + return __high;
1376 + char
1377 + ctype<char>::do_tolower(char __c) const
1378 + { return ::tolower((int) __c); }
1380 + const char*
1381 + ctype<char>::do_tolower(char* __low, const char* __high) const
1383 + while (__low < __high)
1385 + *__low = ::tolower((int) *__low);
1386 + ++__low;
1388 + return __high;
1391 +_GLIBCXX_END_NAMESPACE_VERSION
1392 +} // namespace
1393 diff -ruN gcc-5-20150208/libstdc++-v3/config/os/aros/ctype_inline.h gcc-5-20150208.aros/libstdc++-v3/config/os/aros/ctype_inline.h
1394 --- gcc-5-20150208/libstdc++-v3/config/os/aros/ctype_inline.h 1970-01-01 01:00:00.000000000 +0100
1395 +++ gcc-5-20150208.aros/libstdc++-v3/config/os/aros/ctype_inline.h 2015-02-08 21:24:55.289352061 +0000
1396 @@ -0,0 +1,173 @@
1397 +// Locale support -*- C++ -*-
1399 +// Copyright (C) 2000, 2003 Free Software Foundation, Inc.
1401 +// This file is part of the GNU ISO C++ Library. This library is free
1402 +// software; you can redistribute it and/or modify it under the
1403 +// terms of the GNU General Public License as published by the
1404 +// Free Software Foundation; either version 2, or (at your option)
1405 +// any later version.
1407 +// This library is distributed in the hope that it will be useful,
1408 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
1409 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1410 +// GNU General Public License for more details.
1412 +// You should have received a copy of the GNU General Public License along
1413 +// with this library; see the file COPYING. If not, write to the Free
1414 +// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
1415 +// USA.
1417 +// As a special exception, you may use this file as part of a free software
1418 +// library without restriction. Specifically, if other files instantiate
1419 +// templates or use macros or inline functions from this file, or you compile
1420 +// this file and link it with other files to produce an executable, this
1421 +// file does not by itself cause the resulting executable to be covered by
1422 +// the GNU General Public License. This exception does not however
1423 +// invalidate any other reasons why the executable file might be covered by
1424 +// the GNU General Public License.
1426 +/** @file ctype_inline.h
1427 + * This is an internal header file, included by other library headers.
1428 + * You should not attempt to use it directly.
1429 + */
1432 +// ISO C++ 14882: 22.1 Locales
1435 +// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*)
1436 +// functions go in ctype.cc
1438 +// The following definitions are portable, but insanely slow. If one
1439 +// cares at all about performance, then specialized ctype
1440 +// functionality should be added for the native os in question: see
1441 +// the config/os/bits/ctype_*.h files.
1443 +// Constructing a synthetic "C" table should be seriously considered...
1445 +namespace std _GLIBCXX_VISIBILITY(default)
1447 +_GLIBCXX_BEGIN_NAMESPACE_VERSION
1449 + bool
1450 + ctype<char>::
1451 + is(mask __m, char __c) const
1452 + {
1453 + if (_M_table)
1454 + return _M_table[static_cast<unsigned char>(__c)] & __m;
1455 + else
1457 + bool __ret = false;
1458 + const size_t __bitmasksize = 15;
1459 + size_t __bitcur = 0; // Lowest bitmask in ctype_base == 0
1460 + for (; __bitcur <= __bitmasksize; ++__bitcur)
1462 + const mask __bit = static_cast<mask>(1 << __bitcur);
1463 + if (__m & __bit)
1465 + bool __testis;
1466 + switch (__bit)
1468 + case space:
1469 + __testis = isspace(__c);
1470 + break;
1471 + case print:
1472 + __testis = isprint(__c);
1473 + break;
1474 + case cntrl:
1475 + __testis = iscntrl(__c);
1476 + break;
1477 + case upper:
1478 + __testis = isupper(__c);
1479 + break;
1480 + case lower:
1481 + __testis = islower(__c);
1482 + break;
1483 + case alpha:
1484 + __testis = isalpha(__c);
1485 + break;
1486 + case digit:
1487 + __testis = isdigit(__c);
1488 + break;
1489 + case punct:
1490 + __testis = ispunct(__c);
1491 + break;
1492 + case xdigit:
1493 + __testis = isxdigit(__c);
1494 + break;
1495 + case alnum:
1496 + __testis = isalnum(__c);
1497 + break;
1498 + case graph:
1499 + __testis = isgraph(__c);
1500 + break;
1501 + default:
1502 + __testis = false;
1503 + break;
1505 + __ret |= __testis;
1508 + return __ret;
1512 + const char*
1513 + ctype<char>::
1514 + is(const char* __low, const char* __high, mask* __vec) const
1516 + if (_M_table)
1517 + while (__low < __high)
1518 + *__vec++ = _M_table[static_cast<unsigned char>(*__low++)];
1519 + else
1521 + // Highest bitmask in ctype_base == 10.
1522 + const size_t __bitmasksize = 15;
1523 + for (;__low < __high; ++__vec, ++__low)
1525 + mask __m = 0;
1526 + // Lowest bitmask in ctype_base == 0
1527 + size_t __i = 0;
1528 + for (;__i <= __bitmasksize; ++__i)
1530 + const mask __bit = static_cast<mask>(1 << __i);
1531 + if (this->is(__bit, *__low))
1532 + __m |= __bit;
1534 + *__vec = __m;
1537 + return __high;
1540 + const char*
1541 + ctype<char>::
1542 + scan_is(mask __m, const char* __low, const char* __high) const
1544 + if (_M_table)
1545 + while (__low < __high
1546 + && !(_M_table[static_cast<unsigned char>(*__low)] & __m))
1547 + ++__low;
1548 + else
1549 + while (__low < __high && !this->is(__m, *__low))
1550 + ++__low;
1551 + return __low;
1554 + const char*
1555 + ctype<char>::
1556 + scan_not(mask __m, const char* __low, const char* __high) const
1558 + if (_M_table)
1559 + while (__low < __high
1560 + && (_M_table[static_cast<unsigned char>(*__low)] & __m) != 0)
1561 + ++__low;
1562 + else
1563 + while (__low < __high && this->is(__m, *__low) != 0)
1564 + ++__low;
1565 + return __low;
1568 +_GLIBCXX_END_NAMESPACE_VERSION
1569 +} // namespace
1570 diff -ruN gcc-5-20150208/libstdc++-v3/config/os/aros/ctype_noninline.h gcc-5-20150208.aros/libstdc++-v3/config/os/aros/ctype_noninline.h
1571 --- gcc-5-20150208/libstdc++-v3/config/os/aros/ctype_noninline.h 1970-01-01 01:00:00.000000000 +0100
1572 +++ gcc-5-20150208.aros/libstdc++-v3/config/os/aros/ctype_noninline.h 2015-02-08 21:24:55.289352061 +0000
1573 @@ -0,0 +1,56 @@
1574 + const ctype_base::mask*
1575 + ctype<char>::classic_table() throw()
1576 + { return *__ctype_b_ptr; }
1578 + ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
1579 + size_t __refs)
1580 + : facet(__refs), _M_del(__table != 0 && __del),
1581 + _M_toupper(NULL), _M_tolower(NULL),
1582 + _M_table(__table ? __table : classic_table())
1583 + {
1584 + memset(_M_widen, 0, sizeof(_M_widen));
1585 + _M_widen_ok = 0;
1586 + memset(_M_narrow, 0, sizeof(_M_narrow));
1587 + _M_narrow_ok = 0;
1590 + ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
1591 + : facet(__refs), _M_del(__table != 0 && __del),
1592 + _M_toupper(NULL), _M_tolower(NULL),
1593 + _M_table(__table ? __table : classic_table())
1594 + {
1595 + memset(_M_widen, 0, sizeof(_M_widen));
1596 + _M_widen_ok = 0;
1597 + memset(_M_narrow, 0, sizeof(_M_narrow));
1598 + _M_narrow_ok = 0;
1601 + char
1602 + ctype<char>::do_toupper(char __c) const
1603 + { return ::toupper((int) __c); }
1605 + const char*
1606 + ctype<char>::do_toupper(char* __low, const char* __high) const
1608 + while (__low < __high)
1610 + *__low = ::toupper((int) *__low);
1611 + ++__low;
1613 + return __high;
1616 + char
1617 + ctype<char>::do_tolower(char __c) const
1618 + { return ::tolower((int) __c); }
1620 + const char*
1621 + ctype<char>::do_tolower(char* __low, const char* __high) const
1623 + while (__low < __high)
1625 + *__low = ::tolower((int) *__low);
1626 + ++__low;
1628 + return __high;
1630 diff -ruN gcc-5-20150208/libstdc++-v3/config/os/aros/os_defines.h gcc-5-20150208.aros/libstdc++-v3/config/os/aros/os_defines.h
1631 --- gcc-5-20150208/libstdc++-v3/config/os/aros/os_defines.h 1970-01-01 01:00:00.000000000 +0100
1632 +++ gcc-5-20150208.aros/libstdc++-v3/config/os/aros/os_defines.h 2015-02-08 21:24:55.289352061 +0000
1633 @@ -0,0 +1,6 @@
1634 +#ifndef _GLIBCXX_OS_DEFINES
1635 +#define _GLIBCXX_OS_DEFINES
1637 +#define __off64_t off_t
1639 +#endif
1640 diff -ruN gcc-5-20150208/libstdc++-v3/configure gcc-5-20150208.aros/libstdc++-v3/configure
1641 --- gcc-5-20150208/libstdc++-v3/configure 2015-01-16 15:02:35.000000000 +0000
1642 +++ gcc-5-20150208.aros/libstdc++-v3/configure 2015-02-08 21:24:55.289352061 +0000
1643 @@ -5306,12 +5306,12 @@
1646 # Libtool setup.
1647 -if test "x${with_newlib}" != "xyes"; then
1648 - enable_dlopen=yes
1653 +#if test "x${with_newlib}" != "xyes"; then
1654 +# AC_LIBTOOL_DLOPEN
1658 +#fi
1659 case `pwd` in
1660 *\ * | *\ *)
1661 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
1662 @@ -8042,6 +8042,8 @@
1666 + enable_dlopen=no
1669 enable_win32_dll=no
1671 @@ -18660,6 +18662,7 @@
1673 struct iovec iov[2];
1674 writev(0, iov, 0);
1675 +#error be sure to fail
1677 return 0;
1679 @@ -18682,6 +18685,7 @@
1681 struct iovec iov[2];
1682 writev(0, iov, 0);
1683 +#error be sure to fail
1685 return 0;
1687 @@ -27858,6 +27862,58 @@
1689 # Base decisions on target environment.
1690 case "${host}" in
1691 + *-aros*)
1692 + for ac_header in nan.h ieeefp.h endian.h sys/isa_defs.h machine/endian.h \
1693 + machine/param.h sys/machine.h sys/types.h fp.h locale.h float.h inttypes.h
1694 +do :
1695 + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
1696 +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
1697 +eval as_val=\$$as_ac_Header
1698 + if test "x$as_val" = x""yes; then :
1699 + cat >>confdefs.h <<_ACEOF
1700 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
1701 +_ACEOF
1705 +done
1708 + GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
1709 + GLIBCXX_CHECK_WCHAR_T_SUPPORT
1711 + $as_echo "#define HAVE_FINITE 1" >>confdefs.h
1713 + $as_echo "#define HAVE_FINITEF 1" >>confdefs.h
1715 + $as_echo "#define HAVE_FREXPF 1" >>confdefs.h
1717 + $as_echo "#define HAVE_HYPOTF 1" >>confdefs.h
1719 + $as_echo "#define HAVE_ISINF 1" >>confdefs.h
1721 + $as_echo "#define HAVE_ISINFF 1" >>confdefs.h
1723 + $as_echo "#define HAVE_ISNAN 1" >>confdefs.h
1725 + $as_echo "#define HAVE_ISNANF 1" >>confdefs.h
1727 + $as_echo "#define HAVE_SINCOS 1" >>confdefs.h
1729 + $as_echo "#define HAVE_SINCOSF 1" >>confdefs.h
1731 + if test x"long_double_math_on_this_cpu" = x"yes"; then
1732 + $as_echo "#define HAVE_FINITEL 1" >>confdefs.h
1734 + $as_echo "#define HAVE_HYPOTL 1" >>confdefs.h
1736 + $as_echo "#define HAVE_ISINFL 1" >>confdefs.h
1738 + $as_echo "#define HAVE_ISNANL 1" >>confdefs.h
1740 + fi
1741 + ;;
1743 arm*-*-symbianelf*)
1744 # This is a freestanding configuration; there is nothing to do here.
1746 diff -ruN gcc-5-20150208/libstdc++-v3/configure.ac gcc-5-20150208.aros/libstdc++-v3/configure.ac
1747 --- gcc-5-20150208/libstdc++-v3/configure.ac 2014-12-19 18:16:39.000000000 +0000
1748 +++ gcc-5-20150208.aros/libstdc++-v3/configure.ac 2015-02-08 21:24:55.289352061 +0000
1749 @@ -89,9 +89,9 @@
1750 GLIBCXX_CONFIGURE
1752 # Libtool setup.
1753 -if test "x${with_newlib}" != "xyes"; then
1754 - AC_LIBTOOL_DLOPEN
1756 +#if test "x${with_newlib}" != "xyes"; then
1757 +# AC_LIBTOOL_DLOPEN
1758 +#fi
1759 AM_PROG_LIBTOOL
1760 ACX_LT_HOST_FLAGS
1761 AC_SUBST(enable_shared)
1762 diff -ruN gcc-5-20150208/libstdc++-v3/configure.host gcc-5-20150208.aros/libstdc++-v3/configure.host
1763 --- gcc-5-20150208/libstdc++-v3/configure.host 2015-01-09 14:06:02.000000000 +0000
1764 +++ gcc-5-20150208.aros/libstdc++-v3/configure.host 2015-02-08 21:24:55.289352061 +0000
1765 @@ -235,6 +235,9 @@
1766 os_include_dir="os/generic"
1767 atomicity_dir="cpu/generic"
1769 + aros*)
1770 + os_include_dir="os/aros"
1771 + ;;
1772 bsd*)
1773 # Plain BSD attempts to share FreeBSD files.
1774 os_include_dir="os/bsd/freebsd"
1775 diff -ruN gcc-5-20150208/libstdc++-v3/crossconfig.m4 gcc-5-20150208.aros/libstdc++-v3/crossconfig.m4
1776 --- gcc-5-20150208/libstdc++-v3/crossconfig.m4 2014-04-22 13:30:59.000000000 +0100
1777 +++ gcc-5-20150208.aros/libstdc++-v3/crossconfig.m4 2015-02-08 21:24:55.289352061 +0000
1778 @@ -5,6 +5,31 @@
1779 AC_DEFUN([GLIBCXX_CROSSCONFIG],[
1780 # Base decisions on target environment.
1781 case "${host}" in
1782 + *-aros*)
1783 + AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h machine/endian.h \
1784 + machine/param.h sys/machine.h sys/types.h fp.h locale.h float.h inttypes.h])
1786 + GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
1787 + GLIBCXX_CHECK_WCHAR_T_SUPPORT
1789 + AC_DEFINE(HAVE_FINITE)
1790 + AC_DEFINE(HAVE_FINITEF)
1791 + AC_DEFINE(HAVE_FREXPF)
1792 + AC_DEFINE(HAVE_HYPOTF)
1793 + AC_DEFINE(HAVE_ISINF)
1794 + AC_DEFINE(HAVE_ISINFF)
1795 + AC_DEFINE(HAVE_ISNAN)
1796 + AC_DEFINE(HAVE_ISNANF)
1797 + AC_DEFINE(HAVE_SINCOS)
1798 + AC_DEFINE(HAVE_SINCOSF)
1799 + if test x"long_double_math_on_this_cpu" = x"yes"; then
1800 + AC_DEFINE(HAVE_FINITEL)
1801 + AC_DEFINE(HAVE_HYPOTL)
1802 + AC_DEFINE(HAVE_ISINFL)
1803 + AC_DEFINE(HAVE_ISNANL)
1804 + fi
1805 + ;;
1807 arm*-*-symbianelf*)
1808 # This is a freestanding configuration; there is nothing to do here.
1810 diff -ruN gcc-5-20150208/libstdc++-v3/include/Makefile.in gcc-5-20150208.aros/libstdc++-v3/include/Makefile.in
1811 --- gcc-5-20150208/libstdc++-v3/include/Makefile.in 2015-01-16 23:38:48.000000000 +0000
1812 +++ gcc-5-20150208.aros/libstdc++-v3/include/Makefile.in 2015-02-08 21:24:55.289352061 +0000
1813 @@ -1597,6 +1597,7 @@
1814 -e '/^#/s/\(${uppercase}${uppercase}*\)/_GLIBCXX_\1/g' \
1815 -e 's/_GLIBCXX_SUPPORTS_WEAK/__GXX_WEAK__/g' \
1816 -e 's/_GLIBCXX___MINGW32_GLIBCXX___/__MINGW32__/g' \
1817 + -e 's/_GLIBCXX___AROS__/__AROS__/g' \
1818 -e 's,^#include "\(.*\)",#include <bits/\1>,g' \
1819 < $< > $@
1821 diff -ruN gcc-5-20150208/libstdc++-v3/include/std/ratio gcc-5-20150208.aros/libstdc++-v3/include/std/ratio
1822 --- gcc-5-20150208/libstdc++-v3/include/std/ratio 2015-01-05 12:33:28.000000000 +0000
1823 +++ gcc-5-20150208.aros/libstdc++-v3/include/std/ratio 2015-02-08 21:24:55.289352061 +0000
1824 @@ -211,10 +211,10 @@
1826 private:
1827 static_assert(__d != 0, "Internal library error");
1828 - static_assert(sizeof (uintmax_t) == sizeof (unsigned long long),
1829 - "This library calls __builtin_clzll on uintmax_t, which "
1830 - "is unsafe on your platform. Please complain to "
1831 - "http://gcc.gnu.org/bugzilla/");
1832 +// static_assert(sizeof (uintmax_t) == sizeof (unsigned long long),
1833 +// "This library calls __builtin_clzll on uintmax_t, which "
1834 +// "is unsafe on your platform. Please complain to "
1835 +// "http://gcc.gnu.org/bugzilla/");
1836 static constexpr int __shift = __builtin_clzll(__d);
1837 static constexpr int __coshift_ = sizeof(uintmax_t) * 8 - __shift;
1838 static constexpr int __coshift = (__shift != 0) ? __coshift_ : 0;