add missing newline
[AROS.git] / tools / crosstools / gcc-5-20150111-aros.diff
blobb80ad7e019ca402981216754c91464311e9dfca6
1 diff -ruN gcc-5-20150111/configure gcc-5-20150111.aros/configure
2 --- gcc-5-20150111/configure 2015-01-09 21:23:09.000000000 +0000
3 +++ gcc-5-20150111.aros/configure 2015-01-27 00:34:47.385773501 +0000
4 @@ -3826,6 +3826,9 @@
5 powerpcle-*-solaris*)
6 noconfigdirs="$noconfigdirs gdb sim tcl tk itcl"
7 ;;
8 + *-*-aros*)
9 + noconfigdirs="$noconfigdirs patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl tix gnuserv gdb"
10 + ;;
11 powerpc-*-beos*)
12 noconfigdirs="$noconfigdirs gdb"
14 @@ -3965,6 +3968,8 @@
15 rs6000-*-aix*)
16 host_makefile_frag="config/mh-ppc-aix"
18 + *-*-aros*)
19 + ;;
20 esac
23 diff -ruN gcc-5-20150111/configure.ac gcc-5-20150111.aros/configure.ac
24 --- gcc-5-20150111/configure.ac 2015-01-09 21:23:09.000000000 +0000
25 +++ gcc-5-20150111.aros/configure.ac 2015-01-27 00:34:47.385773501 +0000
26 @@ -1176,6 +1176,9 @@
27 powerpcle-*-solaris*)
28 noconfigdirs="$noconfigdirs gdb sim tcl tk itcl"
30 + *-*-aros*)
31 + noconfigdirs="$noconfigdirs patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl tix gnuserv gdb"
32 + ;;
33 powerpc-*-beos*)
34 noconfigdirs="$noconfigdirs gdb"
36 @@ -1296,6 +1299,8 @@
37 rs6000-*-aix*)
38 host_makefile_frag="config/mh-ppc-aix"
40 + *-*-aros*)
41 + ;;
42 esac
45 diff -ruN gcc-5-20150111/fixincludes/configure gcc-5-20150111.aros/fixincludes/configure
46 --- gcc-5-20150111/fixincludes/configure 2012-05-29 20:28:57.000000000 +0100
47 +++ gcc-5-20150111.aros/fixincludes/configure 2015-01-27 00:34:47.385773501 +0000
48 @@ -4712,6 +4712,7 @@
50 else
51 case $host in
52 + *-*-aros* | \
53 i?86-*-msdosdjgpp* | \
54 i?86-*-mingw32* | \
55 x86_64-*-mingw32* | \
56 diff -ruN gcc-5-20150111/fixincludes/configure.ac gcc-5-20150111.aros/fixincludes/configure.ac
57 --- gcc-5-20150111/fixincludes/configure.ac 2012-05-29 20:28:57.000000000 +0100
58 +++ gcc-5-20150111.aros/fixincludes/configure.ac 2015-01-27 00:34:47.385773501 +0000
59 @@ -50,6 +50,7 @@
60 TARGET=oneprocess
61 fi],
62 [case $host in
63 + *-*-aros* | \
64 i?86-*-msdosdjgpp* | \
65 i?86-*-mingw32* | \
66 x86_64-*-mingw32* | \
67 diff -ruN gcc-5-20150111/gcc/config/arm/aros.h gcc-5-20150111.aros/gcc/config/arm/aros.h
68 --- gcc-5-20150111/gcc/config/arm/aros.h 1970-01-01 01:00:00.000000000 +0100
69 +++ gcc-5-20150111.aros/gcc/config/arm/aros.h 2015-01-27 00:34:47.385773501 +0000
70 @@ -0,0 +1,82 @@
71 +/* Configuration file for ARM AROS EABI targets.
72 + Copyright (C) 2004, 2005, 2006, 2007, 2010
73 + Free Software Foundation, Inc.
74 + Contributed by Pavel Fedin
75 + Based on linux-eabi.h and other AROS targets
77 + This file is part of GCC.
79 + GCC is free software; you can redistribute it and/or modify it
80 + under the terms of the GNU General Public License as published
81 + by the Free Software Foundation; either version 3, or (at your
82 + option) any later version.
84 + GCC is distributed in the hope that it will be useful, but WITHOUT
85 + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
86 + or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
87 + License for more details.
89 + You should have received a copy of the GNU General Public License
90 + along with GCC; see the file COPYING3. If not see
91 + <http://www.gnu.org/licenses/>. */
93 +/* On EABI GNU/Linux, we want both the BPABI builtins and the
94 + GNU/Linux builtins. */
95 +#undef TARGET_OS_CPP_BUILTINS
96 +#define TARGET_OS_CPP_BUILTINS() \
97 + do \
98 + { \
99 + TARGET_BPABI_CPP_BUILTINS(); \
100 + builtin_define_std ("AROS"); \
101 + builtin_define ("AMIGA"); \
102 + builtin_define ("_AMIGA"); \
103 + builtin_assert ("system=posix"); \
104 + if (flag_pic) \
105 + { \
106 + builtin_define ("__PIC__"); \
107 + builtin_define ("__pic__"); \
108 + } \
109 + } \
110 + while (false)
112 +/* We default to a softfp ABI so that we are compatible
113 + with the Linux EABI (as used by the linker). */
114 +#undef TARGET_DEFAULT_FLOAT_ABI
115 +#define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_SOFTFP
117 +/* We default to the "aapcs-linux" ABI so that enums are int-sized by
118 + default. */
119 +#undef ARM_DEFAULT_ABI
120 +#define ARM_DEFAULT_ABI ARM_ABI_AAPCS_LINUX
122 +/* Default to armv5t so that thumb shared libraries work.
123 + The ARM10TDMI core is the default for armv5t, so set
124 + SUBTARGET_CPU_DEFAULT to achieve this. */
125 +#undef SUBTARGET_CPU_DEFAULT
126 +#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
128 +/* TARGET_BIG_ENDIAN_DEFAULT is set in
129 + config.gcc for big endian configurations. */
130 +#undef TARGET_LINKER_EMULATION
131 +#if TARGET_BIG_ENDIAN_DEFAULT
132 +#define TARGET_LINKER_EMULATION "armelfb_aros"
133 +#else
134 +#define TARGET_LINKER_EMULATION "armelf_aros"
135 +#endif
137 +#undef SUBTARGET_CPP_SPEC
138 +#define SUBTARGET_CPP_SPEC "-D__ELF__ %{!nostdinc:-isystem %R/include%{!nostdc:%{!noposixc: -isystem %R/include/aros/posixc} -isystem %R/include/aros/stdc}}"
140 +#undef SUBTARGET_EXTRA_LINK_SPEC
141 +#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION
143 +/* Provide a LINK_SPEC appropriate for AROS. */
144 +#undef LINK_SPEC
145 +#define LINK_SPEC "-m armelf_aros -L %R/lib"
147 +/* Use own supplement to libgcc. */
148 +#undef LIBGCC_SPEC
149 +#define LIBGCC_SPEC "-laeabi -lgcc"
151 +/* FIXME: AROS doesn't support dw2 unwinding yet. */
152 +#undef MD_FALLBACK_FRAME_STATE_FOR
153 diff -ruN gcc-5-20150111/gcc/config/arm/t-aros gcc-5-20150111.aros/gcc/config/arm/t-aros
154 --- gcc-5-20150111/gcc/config/arm/t-aros 1970-01-01 01:00:00.000000000 +0100
155 +++ gcc-5-20150111.aros/gcc/config/arm/t-aros 2015-01-27 00:34:47.385773501 +0000
156 @@ -0,0 +1,21 @@
157 +# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
158 +# 2008, 2010 Free Software Foundation, Inc.
160 +# This file is part of GCC.
162 +# GCC is free software; you can redistribute it and/or modify
163 +# it under the terms of the GNU General Public License as published by
164 +# the Free Software Foundation; either version 3, or (at your option)
165 +# any later version.
167 +# GCC is distributed in the hope that it will be useful,
168 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
169 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
170 +# GNU General Public License for more details.
172 +# You should have received a copy of the GNU General Public License
173 +# along with GCC; see the file COPYING3. If not see
174 +# <http://www.gnu.org/licenses/>.
176 +MULTILIB_OPTIONS = marm mfloat-abi=hard
177 +MULTILIB_DIRNAMES = arm fpu
178 diff -ruN gcc-5-20150111/gcc/config/aros.h gcc-5-20150111.aros/gcc/config/aros.h
179 --- gcc-5-20150111/gcc/config/aros.h 1970-01-01 01:00:00.000000000 +0100
180 +++ gcc-5-20150111.aros/gcc/config/aros.h 2015-01-27 00:34:47.385773501 +0000
181 @@ -0,0 +1,109 @@
182 +/* Definitions for AROS
183 + Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
184 + Contributed by Fabio Alemagna
185 + Based upon linux.h, contributed by Eric Youngdale.
187 +This file is part of GNU CC.
189 +GNU CC is free software; you can redistribute it and/or modify
190 +it under the terms of the GNU General Public License as published by
191 +the Free Software Foundation; either version 2, or (at your option)
192 +any later version.
194 +GNU CC is distributed in the hope that it will be useful,
195 +but WITHOUT ANY WARRANTY; without even the implied warranty of
196 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
197 +GNU General Public License for more details.
199 +You should have received a copy of the GNU General Public License
200 +along with GNU CC; see the file COPYING. If not, write to
201 +the Free Software Foundation, 59 Temple Place - Suite 330,
202 +Boston, MA 02111-1307, USA. */
204 +/* Don't assume anything about the header files. */
205 +#define NO_IMPLICIT_EXTERN_C
207 +#undef SIZE_TYPE
208 +#define SIZE_TYPE "long unsigned int"
210 +#undef WCHAR_TYPE
211 +#define WCHAR_TYPE "char"
213 +#undef WCHAR_TYPE_SIZE
214 +#define WCHAR_TYPE_SIZE 8
216 +#undef PTRDIFF_TYPE
217 +#define PTRDIFF_TYPE "long int"
219 +#undef TARGET_OS_CPP_BUILTINS
220 +#define TARGET_OS_CPP_BUILTINS() \
221 + do \
222 + { \
223 + builtin_define_std ("AROS"); \
224 + builtin_define ("AMIGA"); \
225 + builtin_define ("_AMIGA"); \
226 + builtin_define ("__ELF__"); \
227 + builtin_assert ("system=posix"); \
228 + } \
229 + while (0)
231 +#undef ASM_APP_ON
232 +#define ASM_APP_ON "#APP\n"
234 +#undef ASM_APP_OFF
235 +#define ASM_APP_OFF "#NO_APP\n"
237 +#undef MD_EXEC_PREFIX
238 +#undef MD_STARTFILE_PREFIX
240 +/* Provide a STARTFILE_SPEC appropriate for AROS. AROS has its own
241 + set of startup files which also take care of handling C++
242 + constructors/destructors. */
244 +#undef STARTFILE_SPEC
245 +#define STARTFILE_SPEC \
246 + "startup.o%s %{detach:detach.o%s} %{nix:nixmain.o%s}"
248 +/* Provide a ENDFILE_SPEC appropriate for AROS. */
250 +#undef ENDFILE_SPEC
251 +#define ENDFILE_SPEC \
252 + "-lautoinit"
254 +#undef INCLUDE_DEFAULTS
255 +#define INCLUDE_DEFAULTS \
256 +{ \
257 + { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, 0, 0 }, \
258 + { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, 0, 1 }, \
259 + { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, 0, 0 }, \
260 + { "/local/include", 0, 0, 1, 1, 0 }, \
261 + { GCC_INCLUDE_DIR, "GCC", 0, 0, 0, 0 }, \
262 + { NATIVE_SYSTEM_HEADER_DIR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 0, 0 }, \
263 + { 0, 0, 0, 0, 0, 0 } \
264 +}; \
266 +#undef CPP_SPEC
267 +#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}"
269 +/* This is for -profile to use -lc_p instead of -lc. */
270 +#ifndef CC1_SPEC
271 +#define CC1_SPEC "%{profile:-p}"
272 +#endif
274 +/* The GNU C++ standard library requires that these macros be defined. */
275 +#undef CPLUSPLUS_CPP_SPEC
276 +#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
278 +#undef LIB_SPEC
279 +#define LIB_SPEC \
280 + "-lmui -lpthread -larossupport -lamiga %{!nostdc:%{!noposixc:-lposixc} -lstdcio -lstdc} -lcodesets -lkeymap -lexpansion -lcommodities -ldiskfont -lasl -lmuimaster -ldatatypes -lcybergraphics -lworkbench -licon -lintuition -lgadtools -llayers -laros -lpartition -liffparse -lgraphics -llocale -ldos -lutility -loop %{!nosysbase:-lexec} -lautoinit -llibinit -lautoinit %{nostdc:-lstdc.static}"
282 +#if !defined(USE_GNULIBC_1) && defined(HAVE_LD_EH_FRAME_HDR)
283 +#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
284 +#endif
286 +/* AROS uses its own collect-like program for the moment. */
287 +#undef LINKER_NAME
288 +#define LINKER_NAME "collect-aros"
290 +#define TARGET_HAS_F_SETLKW
291 diff -ruN gcc-5-20150111/gcc/config/aros.opt gcc-5-20150111.aros/gcc/config/aros.opt
292 --- gcc-5-20150111/gcc/config/aros.opt 1970-01-01 01:00:00.000000000 +0100
293 +++ gcc-5-20150111.aros/gcc/config/aros.opt 2015-01-27 01:05:48.038232619 +0000
294 @@ -0,0 +1,32 @@
295 +; Processor-independent options for AROS.
297 +; Copyright (C) 2015 Free Software Foundation, Inc.
299 +; This file is part of GCC.
301 +; GCC is free software; you can redistribute it and/or modify it under
302 +; the terms of the GNU General Public License as published by the Free
303 +; Software Foundation; either version 3, or (at your option) any later
304 +; version.
306 +; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
307 +; WARRANTY; without even the implied warranty of MERCHANTABILITY or
308 +; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
309 +; for more details.
311 +; You should have received a copy of the GNU General Public License
312 +; along with GCC; see the file COPYING3. If not see
313 +; <http://www.gnu.org/licenses/>.
315 +posix
316 +Driver
318 +noposixc
319 +Driver
321 +nostdc
322 +Driver
324 +nosysbase
325 +Driver
327 diff -ruN gcc-5-20150111/gcc/config/i386/aros64.h gcc-5-20150111.aros/gcc/config/i386/aros64.h
328 --- gcc-5-20150111/gcc/config/i386/aros64.h 1970-01-01 01:00:00.000000000 +0100
329 +++ gcc-5-20150111.aros/gcc/config/i386/aros64.h 2015-01-27 00:34:47.385773501 +0000
330 @@ -0,0 +1,34 @@
331 +/* Definitions for AMD x86_64 running AROS systems with ELF64 format.
332 + Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002
333 + Free Software Foundation, Inc.
334 + Contributed by Stanislaw Szymczyk <sszymczy@gmail.com>. Based on aros.h.
336 +This file is part of GNU CC.
338 +GNU CC is free software; you can redistribute it and/or modify
339 +it under the terms of the GNU General Public License as published by
340 +the Free Software Foundation; either version 2, or (at your option)
341 +any later version.
343 +GNU CC is distributed in the hope that it will be useful,
344 +but WITHOUT ANY WARRANTY; without even the implied warranty of
345 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
346 +GNU General Public License for more details.
348 +You should have received a copy of the GNU General Public License
349 +along with GNU CC; see the file COPYING. If not, write to
350 +the Free Software Foundation, 59 Temple Place - Suite 330,
351 +Boston, MA 02111-1307, USA. */
353 +/* The svr4 ABI for the i386 says that records and unions are returned
354 + in memory. In the 64bit compilation we will turn this flag off in
355 + override_options, as we never do pcc_struct_return scheme on this target. */
356 +#undef DEFAULT_PCC_STRUCT_RETURN
357 +#define DEFAULT_PCC_STRUCT_RETURN 1
359 +/* Provide a LINK_SPEC appropriate for AROS. */
361 +#undef LINK_SPEC
362 +#define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} -L %R/lib"
364 +/* FIXME: AROS doesn't support dw2 unwinding yet. */
365 diff -ruN gcc-5-20150111/gcc/config/i386/aros.h gcc-5-20150111.aros/gcc/config/i386/aros.h
366 --- gcc-5-20150111/gcc/config/i386/aros.h 1970-01-01 01:00:00.000000000 +0100
367 +++ gcc-5-20150111.aros/gcc/config/i386/aros.h 2015-01-27 00:34:47.385773501 +0000
368 @@ -0,0 +1,25 @@
369 +/* Definitions for Intel 386 running AROS systems with ELF format.
370 + Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002
371 + Free Software Foundation, Inc.
372 + Contributed by Fabio Alemagna.
373 + Based upon i386/linux.h by Eric Youngdale.
375 +This file is part of GNU CC.
377 +GNU CC is free software; you can redistribute it and/or modify
378 +it under the terms of the GNU General Public License as published by
379 +the Free Software Foundation; either version 2, or (at your option)
380 +any later version.
382 +GNU CC is distributed in the hope that it will be useful,
383 +but WITHOUT ANY WARRANTY; without even the implied warranty of
384 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
385 +GNU General Public License for more details.
387 +You should have received a copy of the GNU General Public License
388 +along with GNU CC; see the file COPYING. If not, write to
389 +the Free Software Foundation, 59 Temple Place - Suite 330,
390 +Boston, MA 02111-1307, USA. */
392 +#undef LINK_SPEC
393 +#define LINK_SPEC "-m elf_i386 -L%R/lib"
394 diff -ruN gcc-5-20150111/gcc/config/m68k/m68k.c gcc-5-20150111.aros/gcc/config/m68k/m68k.c
395 --- gcc-5-20150111/gcc/config/m68k/m68k.c 2015-01-09 20:18:42.000000000 +0000
396 +++ gcc-5-20150111.aros/gcc/config/m68k/m68k.c 2015-01-27 00:34:47.385773501 +0000
397 @@ -4461,7 +4461,7 @@
398 else if (letter == '/')
399 asm_fprintf (file, "%R");
400 else if (letter == '?')
401 - asm_fprintf (file, m68k_library_id_string);
402 + asm_fprintf (file, "%s", m68k_library_id_string);
403 else if (letter == 'p')
405 output_addr_const (file, op);
406 diff -ruN gcc-5-20150111/gcc/config/m68k/m68k.h gcc-5-20150111.aros/gcc/config/m68k/m68k.h
407 --- gcc-5-20150111/gcc/config/m68k/m68k.h 2015-01-05 12:33:28.000000000 +0000
408 +++ gcc-5-20150111.aros/gcc/config/m68k/m68k.h 2015-01-27 00:34:47.385773501 +0000
409 @@ -329,7 +329,9 @@
410 register elimination. */
411 #define FIRST_PSEUDO_REGISTER 25
413 -/* All m68k targets (except AmigaOS) use %a5 as the PIC register */
414 +/* All m68k targets (except AmigaOS) use %a5 as the PIC register.
415 + * On AmigaOS, we use %a4
416 + */
417 #define PIC_OFFSET_TABLE_REGNUM \
418 (!flag_pic ? INVALID_REGNUM \
419 : reload_completed ? REGNO (pic_offset_table_rtx) \
420 @@ -419,7 +421,8 @@
421 /* Most m68k targets use %a6 as a frame pointer. The AmigaOS
422 ABI uses %a6 for shared library calls, therefore the frame
423 pointer is shifted to %a5 on this target. */
424 -#define FRAME_POINTER_REGNUM A6_REG
425 +#define FRAME_POINTER_REGNUM A5_REG
426 +#define PIC_REG A4_REG
428 /* Base register for access to arguments of the function.
429 * This isn't a hardware register. It will be eliminated to the
430 diff -ruN gcc-5-20150111/gcc/config/m68k/m68k.md gcc-5-20150111.aros/gcc/config/m68k/m68k.md
431 --- gcc-5-20150111/gcc/config/m68k/m68k.md 2015-01-05 12:33:28.000000000 +0000
432 +++ gcc-5-20150111.aros/gcc/config/m68k/m68k.md 2015-01-27 00:34:47.385773501 +0000
433 @@ -133,7 +133,8 @@
434 [(D0_REG 0)
435 (A0_REG 8)
436 (A1_REG 9)
437 - (PIC_REG 13)
438 + (A4_REG 12)
439 + (A5_REG 13)
440 (A6_REG 14)
441 (SP_REG 15)
442 (FP0_REG 16)
443 @@ -7073,7 +7074,7 @@
445 if (TARGET_ID_SHARED_LIBRARY)
447 - operands[1] = gen_rtx_REG (Pmode, PIC_REG);
448 + operands[1] = gen_rtx_REG (Pmode, A4_REG);
449 return MOTOROLA ? "move.l %?(%1),%0" : "movel %1@(%?), %0";
451 else if (MOTOROLA)
452 diff -ruN gcc-5-20150111/gcc/config/m68k/t-aros gcc-5-20150111.aros/gcc/config/m68k/t-aros
453 --- gcc-5-20150111/gcc/config/m68k/t-aros 1970-01-01 01:00:00.000000000 +0100
454 +++ gcc-5-20150111.aros/gcc/config/m68k/t-aros 2015-01-27 00:34:47.385773501 +0000
455 @@ -0,0 +1,2 @@
456 +# Custom multilibs for AROS
457 +M68K_MLIB_CPU += && match(MLIB, "^68")
458 diff -ruN gcc-5-20150111/gcc/config/rs6000/aros.h gcc-5-20150111.aros/gcc/config/rs6000/aros.h
459 --- gcc-5-20150111/gcc/config/rs6000/aros.h 1970-01-01 01:00:00.000000000 +0100
460 +++ gcc-5-20150111.aros/gcc/config/rs6000/aros.h 2015-01-27 00:34:47.385773501 +0000
461 @@ -0,0 +1,151 @@
462 +/* Definitions for Powerpc running AROS systems with ELF format.
463 + Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002
464 + Free Software Foundation, Inc.
465 + Contributed by Markus Weiss.
466 + Based upon i386/aros.h by Fabio Alemagna.
468 +This file is part of GNU CC.
470 +GNU CC is free software; you can redistribute it and/or modify
471 +it under the terms of the GNU General Public License as published by
472 +the Free Software Foundation; either version 2, or (at your option)
473 +any later version.
475 +GNU CC is distributed in the hope that it will be useful,
476 +but WITHOUT ANY WARRANTY; without even the implied warranty of
477 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
478 +GNU General Public License for more details.
480 +You should have received a copy of the GNU General Public License
481 +along with GNU CC; see the file COPYING. If not, write to
482 +the Free Software Foundation, 59 Temple Place - Suite 330,
483 +Boston, MA 02111-1307, USA. */
485 +/* Symbols missing in comparison to i386/aros.h are either
486 + defined in elfos.h, rs6000/rs6000.h rs6000/sysv4.h
487 + or not needed for PowerPC.
490 +/* We need to define __powerpc__. */
492 +#undef TARGET_OS_CPP_BUILTINS
493 +#define TARGET_OS_CPP_BUILTINS() \
494 + do \
495 + { \
496 + builtin_define_std ("AROS"); \
497 + builtin_define ("AMIGA"); \
498 + builtin_define ("_AMIGA"); \
499 + builtin_define ("__powerpc__"); \
500 + builtin_define ("__ELF__"); \
501 + builtin_assert ("system=posix"); \
502 + if (flag_pic) \
503 + { \
504 + builtin_define ("__PIC__"); \
505 + builtin_define ("__pic__"); \
506 + } \
507 + } \
508 + while (0)
510 +/* This one taken from linux.h. */
511 +/* We are 32-bit all the time, so optimize a little. */
512 +#undef TARGET_64BIT
513 +#define TARGET_64BIT 0
515 +/* The svr4 ABI for the i386 says that records and unions are returned
516 + in memory. */
517 +/*#undef DEFAULT_PCC_STRUCT_RETURN
518 +#define DEFAULT_PCC_STRUCT_RETURN 1
519 +see rs6000/rs6000.h
523 +#undef ASM_COMMENT_START
524 +#define ASM_COMMENT_START "#"
525 +see rs6000/rs6000.h
529 +#undef DBX_REGISTER_NUMBER
530 +#define DBX_REGISTER_NUMBER(n) \
531 + (TARGET_64BIT ? dbx64_register_map[n] : svr4_dbx_register_map[n])
532 +see rs6000/sysv4.h
535 +/* Output assembler code to FILE to call the profiler.
536 + To the best of my knowledge, no Linux libc has required the label
537 + argument to mcount. */
540 +#define NO_PROFILE_COUNTERS 1
541 +not used by other similar ppc compilers
542 +only in darwin.h rs6000/linux64.h rs6000/rs6000.c
546 +#undef MCOUNT_NAME
547 +#define MCOUNT_NAME "mcount"
548 +see rs6000/sysv4.h RS6000_MCOUNT
551 +/* The GLIBC version of mcount for the x86 assumes that there is a
552 + frame, so we cannot allow profiling without a frame pointer. */
554 +#undef SUBTARGET_FRAME_POINTER_REQUIRED
555 +#define SUBTARGET_FRAME_POINTER_REQUIRED crtl->profile
556 +seems to be handled by rs6000/rs6000.h
559 +#undef CC1_SPEC
560 +#define CC1_SPEC "%(cc1_cpu) %{profile:-p}"
562 +/* Provide a LINK_SPEC appropriate for AROS. */
564 +#undef LINK_SPEC
565 +#define LINK_SPEC "-m elf32ppc -L %R/lib"
567 +/* A C statement (sans semicolon) to output to the stdio stream
568 + FILE the assembler definition of uninitialized global DECL named
569 + NAME whose size is SIZE bytes and alignment is ALIGN bytes.
570 + Try to use asm_output_aligned_bss to implement this macro. */
572 +#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
573 + asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
574 +see rs6000/sysv4.h
577 +/* A C statement to output to the stdio stream FILE an assembler
578 + command to advance the location counter to a multiple of 1<<LOG
579 + bytes if it is within MAX_SKIP bytes.
581 + This is used to align code labels according to Intel recommendations. */
583 +#ifdef HAVE_GAS_MAX_SKIP_P2ALIGN
584 +#define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE,LOG,MAX_SKIP) \
585 + do { \
586 + if ((LOG) != 0) { \
587 + if ((MAX_SKIP) == 0) fprintf ((FILE), "\t.p2align %d\n", (LOG)); \
588 + else fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)); \
589 + } \
590 + } while (0)
591 +#endif
592 +see rs6000/sysv4.h
595 +/* Handle special EH pointer encodings. Absolute, pc-relative, and
596 + indirect are handled automatically. */
598 +#define ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX(FILE, ENCODING, SIZE, ADDR, DONE) \
599 + do { \
600 + if ((SIZE) == 4 && ((ENCODING) & 0x70) == DW_EH_PE_datarel) \
601 + { \
602 + fputs (ASM_LONG, FILE); \
603 + assemble_name (FILE, XSTR (ADDR, 0)); \
604 + fputs (((ENCODING) & DW_EH_PE_indirect ? "@GOT" : "@GOTOFF"), FILE); \
605 + goto DONE; \
606 + } \
607 + } while (0)
608 +not used for PowerPC
611 +/* FIXME: AROS doesn't support dw2 unwinding yet. */
612 +#undef MD_FALLBACK_FRAME_STATE_FOR
613 diff -ruN gcc-5-20150111/gcc/config/rs6000/rs6000.c gcc-5-20150111.aros/gcc/config/rs6000/rs6000.c
614 --- gcc-5-20150111/gcc/config/rs6000/rs6000.c 2015-01-09 20:18:42.000000000 +0000
615 +++ gcc-5-20150111.aros/gcc/config/rs6000/rs6000.c 2015-01-27 00:34:47.385773501 +0000
616 @@ -1309,6 +1309,8 @@
617 false },
618 { "shortcall", 0, 0, false, true, true, rs6000_handle_longcall_attribute,
619 false },
620 + { "stackparm", 0, 0, false, true, true, rs6000_handle_longcall_attribute,
621 + false },
622 { "ms_struct", 0, 0, false, false, false, rs6000_handle_struct_attribute,
623 false },
624 { "gcc_struct", 0, 0, false, false, false, rs6000_handle_struct_attribute,
625 @@ -9235,6 +9237,9 @@
626 && !lookup_attribute ("shortcall", TYPE_ATTRIBUTES (fntype))))
627 cum->call_cookie |= CALL_LONG;
629 + cum->stackparm = fntype && lookup_attribute("stackparm",
630 + TYPE_ATTRIBUTES(fntype));
632 if (TARGET_DEBUG_ARG)
634 fprintf (stderr, "\ninit_cumulative_args:");
635 @@ -10347,6 +10352,9 @@
637 rs6000_discover_homogeneous_aggregate (mode, type, &elt_mode, &n_elts);
639 + if (cum->stackparm)
640 + return NULL_RTX;
642 if (TARGET_MACHO && rs6000_darwin64_struct_check_p (mode, type))
644 rtx rslt = rs6000_darwin64_record_arg (cum, type, named, /*retval= */false);
645 @@ -10949,6 +10957,9 @@
646 int first_reg_offset;
647 alias_set_type set;
649 + if (cum->stackparm)
650 + return;
652 /* Skip the last named argument. */
653 next_cum = *get_cumulative_args (cum);
654 rs6000_function_arg_advance_1 (&next_cum, mode, type, true, 0);
655 diff -ruN gcc-5-20150111/gcc/config/rs6000/rs6000.h gcc-5-20150111.aros/gcc/config/rs6000/rs6000.h
656 --- gcc-5-20150111/gcc/config/rs6000/rs6000.h 2015-01-05 12:33:28.000000000 +0000
657 +++ gcc-5-20150111.aros/gcc/config/rs6000/rs6000.h 2015-01-27 00:34:47.385773501 +0000
658 @@ -1765,6 +1765,7 @@
659 int nargs_prototype; /* # args left in the current prototype */
660 int prototype; /* Whether a prototype was defined */
661 int stdarg; /* Whether function is a stdarg function. */
662 + int stackparm; /* Whether function has all args on the stack */
663 int call_cookie; /* Do special things for this call */
664 int sysv_gregno; /* next available GP register */
665 int intoffset; /* running offset in struct (darwin64) */
666 diff -ruN gcc-5-20150111/gcc/config/t-aros gcc-5-20150111.aros/gcc/config/t-aros
667 --- gcc-5-20150111/gcc/config/t-aros 1970-01-01 01:00:00.000000000 +0100
668 +++ gcc-5-20150111.aros/gcc/config/t-aros 2015-01-27 00:34:47.385773501 +0000
669 @@ -0,0 +1,29 @@
670 +# In AROS, "/usr" is a four-letter word.
671 +# Must match NATIVE_SYSTEM_HEADER_COMPONENT in aros.h !
672 +NATIVE_SYSTEM_HEADER_DIR = /include
674 +# Don't add AROS target include path when compiling host compiler
675 +CPPFLAGS =
677 +# Copy AROS specific include replacement files
678 +LIBGCC_DEPS += stmp-aros-hrds
680 +EXTRA_AROS_HEADERS = aros/types/size_t.h aros/types/ptrdiff_t.h \
681 + aros/types/wchar_t.h aros/types/wint_t.h aros/types/null.h
683 +stmp-int-hdrs : | include/aros/types
685 +include/aros/types : $(addprefix $(srcdir)/ginclude/,$(EXTRA_AROS_HEADERS))
686 + -if [ -d include ] ; then true; else mkdir include; chmod a+rx include; fi
687 + -if [ -d include/aros/types ] ; \
688 + then true; \
689 + else \
690 + mkdir include/aros; chmod a+rx include/aros; \
691 + mkdir include/aros/types; chmod a+rx include/aros/types; \
692 + fi
693 + for file in $(EXTRA_AROS_HEADERS); do \
694 + $(STAMP) include/$$file; \
695 + rm -fr include/$$file; \
696 + cp $(srcdir)/ginclude/$$file include/$$file; \
697 + chmod a+r include/$$file; \
698 + done
699 diff -ruN gcc-5-20150111/gcc/config.build gcc-5-20150111.aros/gcc/config.build
700 --- gcc-5-20150111/gcc/config.build 2015-01-05 12:33:28.000000000 +0000
701 +++ gcc-5-20150111.aros/gcc/config.build 2015-01-27 00:34:47.385773501 +0000
702 @@ -102,6 +102,9 @@
703 # HP 9000 series 300
704 build_install_headers_dir=install-headers-cpio
706 + *-*-aros*)
707 + build_xm_file=xm-aros.h
708 + ;;
709 *-*-sysv*)
710 # All other System V variants.
711 build_install_headers_dir=install-headers-cpio
712 diff -ruN gcc-5-20150111/gcc/config.gcc gcc-5-20150111.aros/gcc/config.gcc
713 --- gcc-5-20150111/gcc/config.gcc 2015-01-09 14:06:02.000000000 +0000
714 +++ gcc-5-20150111.aros/gcc/config.gcc 2015-01-27 00:34:47.385773501 +0000
715 @@ -774,6 +774,15 @@
717 esac
719 +*-*-aros*)
720 + gas=yes
721 + gnu_ld=yes
722 + thread_file=posix
723 + use_collect2=no
724 + xm_defines='STDC_HEADERS=1'
725 + extra_options="${extra_options} aros.opt"
726 + ;;
728 *-*-openbsd*)
729 tmake_file="t-openbsd"
730 case ${enable_threads} in
731 @@ -956,6 +965,16 @@
732 tm_file="${tm_file} vms/vms.h alpha/vms.h"
733 tmake_file="${tmake_file} alpha/t-vms"
735 +arm*-*-aros*)
736 + tm_file="dbxelf.h elfos.h arm/elf.h arm/bpabi.h aros.h arm/aros.h arm/aout.h arm/arm.h"
737 + tm_file="$tm_file ../../libgcc/config/arm/bpabi-lib.h"
738 + tmake_file="${tmake_file} arm/t-arm arm/t-arm-elf arm/t-arm-softfp arm/t-bpabi arm/t-aros t-aros"
739 + xm_file="xm-aros.h"
740 + # The BPABI long long divmod functions return a 128-bit value in
741 + # registers r0-r3. Correctly modeling that requires the use of
742 + # TImode.
743 + need_64bit_hwint=yes
744 + ;;
745 arc*-*-elf*)
746 extra_headers="arc-simd.h"
747 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
748 @@ -1540,6 +1559,16 @@
749 done
750 TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
752 +i[34567]86-*-aros*)
753 + tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/i386elf.h aros.h i386/aros.h"
754 + xm_file=xm-aros.h
755 + tmake_file="${tmake_file} i386/t-i386elf t-aros"
756 + ;;
757 +x86_64-*-aros*)
758 + 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"
759 + tmake_file="${tmake_file} i386/t-i386elf t-aros"
760 + xm_file=xm-aros.h
761 + ;;
762 i[34567]86-pc-msdosdjgpp*)
763 xm_file=i386/xm-djgpp.h
764 tm_file="dbxcoff.h ${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/djgpp.h i386/djgpp-stdint.h"
765 @@ -1837,6 +1866,16 @@
766 thread_file='posix'
769 +m68k-*-aros*)
770 + default_m68k_cpu=68000
771 + default_cf_cpu=5206
772 + 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"
773 + tm_file="${tm_file} aros.h"
774 + tm_defines="${tm_defines} MOTOROLA=1"
775 + tmake_file="m68k/t-floatlib m68k/t-m68kbare m68k/t-m68kelf"
776 + tmake_file="$tmake_file m68k/t-aros m68k/t-mlibs t-aros"
777 + extra_parts="crtbegin.o crtend.o"
778 + ;;
779 m68k-*-elf* | fido-*-elf*)
780 case ${target} in
781 fido-*-elf*)
782 @@ -2332,6 +2371,13 @@
783 extra_options="${extra_options} rs6000/sysv4.opt"
784 tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-rtems rs6000/t-ppccomm"
786 +powerpc-*-aros*)
787 + tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h aros.h"
788 + extra_options="${extra_options} rs6000/sysv4.opt"
789 + tm_file="${tm_file} rs6000/aros.h"
790 + xm_file=xm-aros.h
791 + tmake_file="$tmake_file t-aros"
792 + ;;
793 powerpc*-*-linux*)
794 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h rs6000/sysv4.h"
795 extra_options="${extra_options} rs6000/sysv4.opt"
796 diff -ruN gcc-5-20150111/gcc/config.host gcc-5-20150111.aros/gcc/config.host
797 --- gcc-5-20150111/gcc/config.host 2015-01-09 14:06:02.000000000 +0000
798 +++ gcc-5-20150111.aros/gcc/config.host 2015-01-27 00:34:47.385773501 +0000
799 @@ -276,6 +276,10 @@
800 out_host_hook_obj=host-hpux.o
801 host_xmake_file="${host_xmake_file} x-hpux"
803 + *-*-aros*)
804 + host_can_use_collect2=no
805 + host_xm_file=xm-aros.h
806 + ;;
807 *-*-*vms*)
808 host_xm_file="vms/xm-vms.h"
809 host_xmake_file=vms/x-vms
810 diff -ruN gcc-5-20150111/gcc/ginclude/aros/types/null.h gcc-5-20150111.aros/gcc/ginclude/aros/types/null.h
811 --- gcc-5-20150111/gcc/ginclude/aros/types/null.h 1970-01-01 01:00:00.000000000 +0100
812 +++ gcc-5-20150111.aros/gcc/ginclude/aros/types/null.h 2015-01-27 00:34:47.385773501 +0000
813 @@ -0,0 +1,3 @@
814 +/* Replace AROS' NULL definition with gcc's one */
815 +#define __need_NULL
816 +#include <stddef.h>
817 diff -ruN gcc-5-20150111/gcc/ginclude/aros/types/ptrdiff_t.h gcc-5-20150111.aros/gcc/ginclude/aros/types/ptrdiff_t.h
818 --- gcc-5-20150111/gcc/ginclude/aros/types/ptrdiff_t.h 1970-01-01 01:00:00.000000000 +0100
819 +++ gcc-5-20150111.aros/gcc/ginclude/aros/types/ptrdiff_t.h 2015-01-27 00:34:47.385773501 +0000
820 @@ -0,0 +1,3 @@
821 +/* Replace AROS' ptrdiff_t definition with gcc's one */
822 +#define __need_ptrdiff_t
823 +#include <stddef.h>
824 diff -ruN gcc-5-20150111/gcc/ginclude/aros/types/size_t.h gcc-5-20150111.aros/gcc/ginclude/aros/types/size_t.h
825 --- gcc-5-20150111/gcc/ginclude/aros/types/size_t.h 1970-01-01 01:00:00.000000000 +0100
826 +++ gcc-5-20150111.aros/gcc/ginclude/aros/types/size_t.h 2015-01-27 00:34:47.385773501 +0000
827 @@ -0,0 +1,3 @@
828 +/* Replace AROS' size_t definition with gcc's one */
829 +#define __need_size_t
830 +#include <stddef.h>
831 diff -ruN gcc-5-20150111/gcc/ginclude/aros/types/wchar_t.h gcc-5-20150111.aros/gcc/ginclude/aros/types/wchar_t.h
832 --- gcc-5-20150111/gcc/ginclude/aros/types/wchar_t.h 1970-01-01 01:00:00.000000000 +0100
833 +++ gcc-5-20150111.aros/gcc/ginclude/aros/types/wchar_t.h 2015-01-27 00:34:47.385773501 +0000
834 @@ -0,0 +1,3 @@
835 +/* Replace AROS' wchar_t definition with gcc's one */
836 +#define __need_wchar_t
837 +#include <stddef.h>
838 diff -ruN gcc-5-20150111/gcc/ginclude/aros/types/wint_t.h gcc-5-20150111.aros/gcc/ginclude/aros/types/wint_t.h
839 --- gcc-5-20150111/gcc/ginclude/aros/types/wint_t.h 1970-01-01 01:00:00.000000000 +0100
840 +++ gcc-5-20150111.aros/gcc/ginclude/aros/types/wint_t.h 2015-01-27 00:34:47.385773501 +0000
841 @@ -0,0 +1,3 @@
842 +/* Replace AROS' wint_t definition with gcc's one */
843 +#define __need_wint_t
844 +#include <stddef.h>
845 diff -ruN gcc-5-20150111/gcc/ginclude/stddef.h gcc-5-20150111.aros/gcc/ginclude/stddef.h
846 --- gcc-5-20150111/gcc/ginclude/stddef.h 2015-01-05 12:33:28.000000000 +0000
847 +++ gcc-5-20150111.aros/gcc/ginclude/stddef.h 2015-01-27 00:34:47.385773501 +0000
848 @@ -131,6 +131,7 @@
849 #ifndef __PTRDIFF_T
850 #ifndef _PTRDIFF_T_
851 #ifndef _BSD_PTRDIFF_T_
852 +#ifndef _AROS_TYPES_PTRDIFF_T_H
853 #ifndef ___int_ptrdiff_t_h
854 #ifndef _GCC_PTRDIFF_T
855 #ifndef _PTRDIFF_T_DECLARED /* DragonFly */
856 @@ -140,6 +141,7 @@
857 #define __PTRDIFF_T
858 #define _PTRDIFF_T_
859 #define _BSD_PTRDIFF_T_
860 +#define _AROS_TYPES_PTRDIFF_T_H
861 #define ___int_ptrdiff_t_h
862 #define _GCC_PTRDIFF_T
863 #define _PTRDIFF_T_DECLARED
864 @@ -150,6 +152,7 @@
865 #endif /* _PTRDIFF_T_DECLARED */
866 #endif /* _GCC_PTRDIFF_T */
867 #endif /* ___int_ptrdiff_t_h */
868 +#endif /* _AROS_TYPES_PTRDIFF_T_H */
869 #endif /* _BSD_PTRDIFF_T_ */
870 #endif /* _PTRDIFF_T_ */
871 #endif /* __PTRDIFF_T */
872 @@ -176,6 +179,7 @@
873 #ifndef __SIZE_T
874 #ifndef _SIZE_T_
875 #ifndef _BSD_SIZE_T_
876 +#ifndef _AROS_TYPES_SIZE_T_H
877 #ifndef _SIZE_T_DEFINED_
878 #ifndef _SIZE_T_DEFINED
879 #ifndef _BSD_SIZE_T_DEFINED_ /* Darwin */
880 @@ -193,6 +197,7 @@
881 #define __SIZE_T
882 #define _SIZE_T_
883 #define _BSD_SIZE_T_
884 +#define _AROS_TYPES_SIZE_T_H
885 #define _SIZE_T_DEFINED_
886 #define _SIZE_T_DEFINED
887 #define _BSD_SIZE_T_DEFINED_ /* Darwin */
888 @@ -226,6 +231,7 @@
889 #endif /* _BSD_SIZE_T_DEFINED_ */
890 #endif /* _SIZE_T_DEFINED */
891 #endif /* _SIZE_T_DEFINED_ */
892 +#endif /* _AROS_TYPES_SIZE_T_H */
893 #endif /* _BSD_SIZE_T_ */
894 #endif /* _SIZE_T_ */
895 #endif /* __SIZE_T */
896 diff -ruN gcc-5-20150111/include/filenames.h gcc-5-20150111.aros/include/filenames.h
897 --- gcc-5-20150111/include/filenames.h 2014-11-11 23:33:25.000000000 +0000
898 +++ gcc-5-20150111.aros/include/filenames.h 2015-01-27 00:34:47.385773501 +0000
899 @@ -42,6 +42,10 @@
900 # define HAS_DRIVE_SPEC(f) HAS_DOS_DRIVE_SPEC (f)
901 # define IS_DIR_SEPARATOR(c) IS_DOS_DIR_SEPARATOR (c)
902 # define IS_ABSOLUTE_PATH(f) IS_DOS_ABSOLUTE_PATH (f)
903 +#elif defined __AROS__
904 +# define IS_DIR_SEPARATOR(c) ((c) == '/' || (c) == ':')
905 +# define IS_ABSOLUTE_PATH(f) (IS_DIR_SEPARATOR((f)[0]) || (strchr((f), ':')))
906 +# define HAVE_CASE_INSENSITIVE_FILE_SYSTEM
907 #else /* not DOSish */
908 # if defined(__APPLE__)
909 # ifndef HAVE_CASE_INSENSITIVE_FILE_SYSTEM
910 diff -ruN gcc-5-20150111/libgcc/config.host gcc-5-20150111.aros/libgcc/config.host
911 --- gcc-5-20150111/libgcc/config.host 2015-01-09 14:06:02.000000000 +0000
912 +++ gcc-5-20150111.aros/libgcc/config.host 2015-01-27 00:34:47.385773501 +0000
913 @@ -762,7 +762,7 @@
914 m32rle-*-linux*)
915 tmake_file="$tmake_file m32r/t-linux t-fdpbit"
917 -m68k-*-elf* | fido-*-elf)
918 +m68k-*-elf* | fido-*-elf | m68k-*-aros*)
919 tmake_file="$tmake_file m68k/t-floatlib"
921 m68k*-*-netbsdelf*)
922 @@ -1273,6 +1273,9 @@
923 tmake_file="$tmake_file nvptx/t-nvptx"
924 extra_parts="crt0.o"
926 +*-*-aros*)
927 + tmake_file=
928 + ;;
930 echo "*** Configuration ${host} not supported" 1>&2
931 exit 1
932 diff -ruN gcc-5-20150111/libgcc/gthr.h gcc-5-20150111.aros/libgcc/gthr.h
933 --- gcc-5-20150111/libgcc/gthr.h 2015-01-05 12:33:28.000000000 +0000
934 +++ gcc-5-20150111.aros/libgcc/gthr.h 2015-01-27 00:34:47.385773501 +0000
935 @@ -141,6 +141,11 @@
936 #define GTHREAD_USE_WEAK 0
937 #endif
939 +#ifdef __AROS__
940 +#undef GTHREAD_USE_WEAK
941 +#define GTHREAD_USE_WEAK 0
942 +#endif
944 #ifndef GTHREAD_USE_WEAK
945 #define GTHREAD_USE_WEAK 1
946 #endif
947 diff -ruN gcc-5-20150111/libgcc/unwind-dw2-fde.c gcc-5-20150111.aros/libgcc/unwind-dw2-fde.c
948 --- gcc-5-20150111/libgcc/unwind-dw2-fde.c 2015-01-05 12:33:28.000000000 +0000
949 +++ gcc-5-20150111.aros/libgcc/unwind-dw2-fde.c 2015-01-27 00:34:47.385773501 +0000
950 @@ -92,12 +92,16 @@
951 #endif
953 init_object_mutex_once ();
954 +#ifndef __AROS__ /* This is called when SysBase is not yet set up */
955 __gthread_mutex_lock (&object_mutex);
956 +#endif
958 ob->next = unseen_objects;
959 unseen_objects = ob;
961 +#ifndef __AROS__
962 __gthread_mutex_unlock (&object_mutex);
963 +#endif
966 void
967 diff -ruN gcc-5-20150111/libiberty/filename_cmp.c gcc-5-20150111.aros/libiberty/filename_cmp.c
968 --- gcc-5-20150111/libiberty/filename_cmp.c 2014-11-11 23:33:25.000000000 +0000
969 +++ gcc-5-20150111.aros/libiberty/filename_cmp.c 2015-01-27 00:34:47.385773501 +0000
970 @@ -55,9 +55,12 @@
972 filename_cmp (const char *s1, const char *s2)
974 -#if !defined(HAVE_DOS_BASED_FILE_SYSTEM) \
975 - && !defined(HAVE_CASE_INSENSITIVE_FILE_SYSTEM)
976 +#if !defined(HAVE_DOS_BASED_FILE_SYSTEM)
977 +#if defined(HAVE_CASE_INSENSITIVE_FILE_SYSTEM)
978 + return strcasecmp(s1, s2);
979 +#else
980 return strcmp(s1, s2);
981 +#endif
982 #else
983 for (;;)
985 diff -ruN gcc-5-20150111/libobjc/configure gcc-5-20150111.aros/libobjc/configure
986 --- gcc-5-20150111/libobjc/configure 2015-01-11 22:51:28.000000000 +0000
987 +++ gcc-5-20150111.aros/libobjc/configure 2015-01-27 00:34:47.385773501 +0000
988 @@ -11256,214 +11256,7 @@
989 # -----------
991 # Check if we have thread-local storage
994 - # Check whether --enable-tls was given.
995 -if test "${enable_tls+set}" = set; then :
996 - enableval=$enable_tls;
997 - case "$enableval" in
998 - yes|no) ;;
999 - *) as_fn_error "Argument to enable/disable tls must be yes or no" "$LINENO" 5 ;;
1000 - esac
1002 -else
1003 - enable_tls=yes
1007 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the target supports thread-local storage" >&5
1008 -$as_echo_n "checking whether the target supports thread-local storage... " >&6; }
1009 -if test "${gcc_cv_have_tls+set}" = set; then :
1010 - $as_echo_n "(cached) " >&6
1011 -else
1013 - if test "$cross_compiling" = yes; then :
1014 - if test x$gcc_no_link = xyes; then
1015 - as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
1017 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1018 -/* end confdefs.h. */
1019 -__thread int a; int b; int main() { return a = b; }
1020 -_ACEOF
1021 -if ac_fn_c_try_link "$LINENO"; then :
1022 - chktls_save_LDFLAGS="$LDFLAGS"
1023 - case $host in
1024 - *-*-linux*)
1025 - LDFLAGS="-shared -Wl,--no-undefined $LDFLAGS"
1026 - ;;
1027 - esac
1028 - chktls_save_CFLAGS="$CFLAGS"
1029 - CFLAGS="-fPIC $CFLAGS"
1030 - if test x$gcc_no_link = xyes; then
1031 - as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
1033 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1034 -/* end confdefs.h. */
1035 -int f() { return 0; }
1036 -_ACEOF
1037 -if ac_fn_c_try_link "$LINENO"; then :
1038 - if test x$gcc_no_link = xyes; then
1039 - as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
1041 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1042 -/* end confdefs.h. */
1043 -__thread int a; int b; int f() { return a = b; }
1044 -_ACEOF
1045 -if ac_fn_c_try_link "$LINENO"; then :
1046 - gcc_cv_have_tls=yes
1047 -else
1048 - gcc_cv_have_tls=no
1050 -rm -f core conftest.err conftest.$ac_objext \
1051 - conftest$ac_exeext conftest.$ac_ext
1052 -else
1053 - gcc_cv_have_tls=yes
1055 -rm -f core conftest.err conftest.$ac_objext \
1056 - conftest$ac_exeext conftest.$ac_ext
1057 - CFLAGS="$chktls_save_CFLAGS"
1058 - LDFLAGS="$chktls_save_LDFLAGS"
1059 -else
1060 - gcc_cv_have_tls=no
1062 -rm -f core conftest.err conftest.$ac_objext \
1063 - conftest$ac_exeext conftest.$ac_ext
1066 -else
1067 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1068 -/* end confdefs.h. */
1069 -__thread int a; int b; int main() { return a = b; }
1070 -_ACEOF
1071 -if ac_fn_c_try_run "$LINENO"; then :
1072 - chktls_save_LDFLAGS="$LDFLAGS"
1073 - LDFLAGS="-static $LDFLAGS"
1074 - if test x$gcc_no_link = xyes; then
1075 - as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
1077 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1078 -/* end confdefs.h. */
1079 -int main() { return 0; }
1080 -_ACEOF
1081 -if ac_fn_c_try_link "$LINENO"; then :
1082 - if test "$cross_compiling" = yes; then :
1083 - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
1084 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1085 -as_fn_error "cannot run test program while cross compiling
1086 -See \`config.log' for more details." "$LINENO" 5; }
1087 -else
1088 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1089 -/* end confdefs.h. */
1090 -__thread int a; int b; int main() { return a = b; }
1091 -_ACEOF
1092 -if ac_fn_c_try_run "$LINENO"; then :
1093 - gcc_cv_have_tls=yes
1094 -else
1095 - gcc_cv_have_tls=no
1097 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
1098 - conftest.$ac_objext conftest.beam conftest.$ac_ext
1101 -else
1102 - gcc_cv_have_tls=yes
1104 -rm -f core conftest.err conftest.$ac_objext \
1105 - conftest$ac_exeext conftest.$ac_ext
1106 - LDFLAGS="$chktls_save_LDFLAGS"
1107 - if test $gcc_cv_have_tls = yes; then
1108 - chktls_save_CFLAGS="$CFLAGS"
1109 - thread_CFLAGS=failed
1110 - for flag in '' '-pthread' '-lpthread'; do
1111 - CFLAGS="$flag $chktls_save_CFLAGS"
1112 - if test x$gcc_no_link = xyes; then
1113 - as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
1115 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1116 -/* end confdefs.h. */
1117 -#include <pthread.h>
1118 - void *g(void *d) { return NULL; }
1119 -int
1120 -main ()
1122 -pthread_t t; pthread_create(&t,NULL,g,NULL);
1124 - return 0;
1126 -_ACEOF
1127 -if ac_fn_c_try_link "$LINENO"; then :
1128 - thread_CFLAGS="$flag"
1130 -rm -f core conftest.err conftest.$ac_objext \
1131 - conftest$ac_exeext conftest.$ac_ext
1132 - if test "X$thread_CFLAGS" != Xfailed; then
1133 - break
1134 - fi
1135 - done
1136 - CFLAGS="$chktls_save_CFLAGS"
1137 - if test "X$thread_CFLAGS" != Xfailed; then
1138 - CFLAGS="$thread_CFLAGS $chktls_save_CFLAGS"
1139 - if test "$cross_compiling" = yes; then :
1140 - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
1141 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1142 -as_fn_error "cannot run test program while cross compiling
1143 -See \`config.log' for more details." "$LINENO" 5; }
1144 -else
1145 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1146 -/* end confdefs.h. */
1147 -#include <pthread.h>
1148 - __thread int a;
1149 - static int *volatile a_in_other_thread;
1150 - static void *
1151 - thread_func (void *arg)
1153 - a_in_other_thread = &a;
1154 - return (void *)0;
1156 -int
1157 -main ()
1159 -pthread_t thread;
1160 - void *thread_retval;
1161 - int *volatile a_in_main_thread;
1162 - a_in_main_thread = &a;
1163 - if (pthread_create (&thread, (pthread_attr_t *)0,
1164 - thread_func, (void *)0))
1165 - return 0;
1166 - if (pthread_join (thread, &thread_retval))
1167 - return 0;
1168 - return (a_in_other_thread == a_in_main_thread);
1170 - return 0;
1172 -_ACEOF
1173 -if ac_fn_c_try_run "$LINENO"; then :
1174 - gcc_cv_have_tls=yes
1175 -else
1176 - gcc_cv_have_tls=no
1178 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
1179 - conftest.$ac_objext conftest.beam conftest.$ac_ext
1182 - CFLAGS="$chktls_save_CFLAGS"
1183 - fi
1184 - fi
1185 -else
1186 - gcc_cv_have_tls=no
1188 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
1189 - conftest.$ac_objext conftest.beam conftest.$ac_ext
1193 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_have_tls" >&5
1194 -$as_echo "$gcc_cv_have_tls" >&6; }
1195 - if test "$enable_tls $gcc_cv_have_tls" = "yes yes"; then
1197 -$as_echo "#define HAVE_TLS 1" >>confdefs.h
1199 - fi
1200 +#dnl GCC_ENABLE_TLS
1202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for exception model to use" >&5
1203 $as_echo_n "checking for exception model to use... " >&6; }
1204 diff -ruN gcc-5-20150111/libobjc/configure.ac gcc-5-20150111.aros/libobjc/configure.ac
1205 --- gcc-5-20150111/libobjc/configure.ac 2015-01-05 12:33:28.000000000 +0000
1206 +++ gcc-5-20150111.aros/libobjc/configure.ac 2015-01-27 00:34:47.385773501 +0000
1207 @@ -210,7 +210,7 @@
1208 # -----------
1210 # Check if we have thread-local storage
1211 -GCC_CHECK_TLS
1212 +dnl GCC_CHECK_TLS
1214 AC_MSG_CHECKING([for exception model to use])
1215 AC_LANG_PUSH(C)
1216 diff -ruN gcc-5-20150111/libobjc/thr.c gcc-5-20150111.aros/libobjc/thr.c
1217 --- gcc-5-20150111/libobjc/thr.c 2015-01-05 12:33:28.000000000 +0000
1218 +++ gcc-5-20150111.aros/libobjc/thr.c 2015-01-27 00:34:47.385773501 +0000
1219 @@ -40,6 +40,7 @@
1220 #include "objc/runtime.h"
1221 #include "objc-private/module-abi-8.h"
1222 #include "objc-private/runtime.h"
1223 +#define __typedef_BOOL /* Remove definition of BOOL */
1224 #include <gthr.h>
1226 #include <stdlib.h>
1227 diff -ruN gcc-5-20150111/libstdc++-v3/config/os/aros/ctype_base.h gcc-5-20150111.aros/libstdc++-v3/config/os/aros/ctype_base.h
1228 --- gcc-5-20150111/libstdc++-v3/config/os/aros/ctype_base.h 1970-01-01 01:00:00.000000000 +0100
1229 +++ gcc-5-20150111.aros/libstdc++-v3/config/os/aros/ctype_base.h 2015-01-27 00:34:47.385773501 +0000
1230 @@ -0,0 +1,30 @@
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;
1254 +#if __cplusplus >= 201103L
1255 + static const mask blank = _ISblank;
1256 +#endif
1259 +_GLIBCXX_END_NAMESPACE_VERSION
1260 +} // namespace
1261 diff -ruN gcc-5-20150111/libstdc++-v3/config/os/aros/ctype_configure_char.cc gcc-5-20150111.aros/libstdc++-v3/config/os/aros/ctype_configure_char.cc
1262 --- gcc-5-20150111/libstdc++-v3/config/os/aros/ctype_configure_char.cc 1970-01-01 01:00:00.000000000 +0100
1263 +++ gcc-5-20150111.aros/libstdc++-v3/config/os/aros/ctype_configure_char.cc 2015-01-27 00:34:47.385773501 +0000
1264 @@ -0,0 +1,99 @@
1265 +// Locale support -*- C++ -*-
1267 +// Copyright (C) 2011-2013 Free Software Foundation, Inc.
1269 +// This file is part of the GNU ISO C++ Library. This library is free
1270 +// software; you can redistribute it and/or modify it under the
1271 +// terms of the GNU General Public License as published by the
1272 +// Free Software Foundation; either version 3, or (at your option)
1273 +// any later version.
1275 +// This library is distributed in the hope that it will be useful,
1276 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
1277 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1278 +// GNU General Public License for more details.
1280 +// Under Section 7 of GPL version 3, you are granted additional
1281 +// permissions described in the GCC Runtime Library Exception, version
1282 +// 3.1, as published by the Free Software Foundation.
1284 +// You should have received a copy of the GNU General Public License and
1285 +// a copy of the GCC Runtime Library Exception along with this program;
1286 +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
1287 +// <http://www.gnu.org/licenses/>.
1289 +/** @file ctype_configure_char.cc */
1292 +// ISO C++ 14882: 22.1 Locales
1295 +#include <locale>
1296 +#include <cstdlib>
1297 +#include <cstring>
1299 +namespace std _GLIBCXX_VISIBILITY(default)
1301 +_GLIBCXX_BEGIN_NAMESPACE_VERSION
1303 +// Information as gleaned from /usr/include/ctype.h
1305 + const ctype_base::mask*
1306 + ctype<char>::classic_table() throw()
1307 + { return 0; }
1309 + ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
1310 + size_t __refs)
1311 + : facet(__refs), _M_del(__table != 0 && __del),
1312 + _M_toupper(NULL), _M_tolower(NULL),
1313 + _M_table(__table ? __table : classic_table())
1314 + {
1315 + memset(_M_widen, 0, sizeof(_M_widen));
1316 + _M_widen_ok = 0;
1317 + memset(_M_narrow, 0, sizeof(_M_narrow));
1318 + _M_narrow_ok = 0;
1321 + ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
1322 + : facet(__refs), _M_del(__table != 0 && __del),
1323 + _M_toupper(NULL), _M_tolower(NULL),
1324 + _M_table(__table ? __table : classic_table())
1325 + {
1326 + memset(_M_widen, 0, sizeof(_M_widen));
1327 + _M_widen_ok = 0;
1328 + memset(_M_narrow, 0, sizeof(_M_narrow));
1329 + _M_narrow_ok = 0;
1332 + char
1333 + ctype<char>::do_toupper(char __c) const
1334 + { return ::toupper((int) __c); }
1336 + const char*
1337 + ctype<char>::do_toupper(char* __low, const char* __high) const
1339 + while (__low < __high)
1341 + *__low = ::toupper((int) *__low);
1342 + ++__low;
1344 + return __high;
1347 + char
1348 + ctype<char>::do_tolower(char __c) const
1349 + { return ::tolower((int) __c); }
1351 + const char*
1352 + ctype<char>::do_tolower(char* __low, const char* __high) const
1354 + while (__low < __high)
1356 + *__low = ::tolower((int) *__low);
1357 + ++__low;
1359 + return __high;
1362 +_GLIBCXX_END_NAMESPACE_VERSION
1363 +} // namespace
1364 diff -ruN gcc-5-20150111/libstdc++-v3/config/os/aros/ctype_inline.h gcc-5-20150111.aros/libstdc++-v3/config/os/aros/ctype_inline.h
1365 --- gcc-5-20150111/libstdc++-v3/config/os/aros/ctype_inline.h 1970-01-01 01:00:00.000000000 +0100
1366 +++ gcc-5-20150111.aros/libstdc++-v3/config/os/aros/ctype_inline.h 2015-01-27 00:34:47.385773501 +0000
1367 @@ -0,0 +1,173 @@
1368 +// Locale support -*- C++ -*-
1370 +// Copyright (C) 2000, 2003 Free Software Foundation, Inc.
1372 +// This file is part of the GNU ISO C++ Library. This library is free
1373 +// software; you can redistribute it and/or modify it under the
1374 +// terms of the GNU General Public License as published by the
1375 +// Free Software Foundation; either version 2, or (at your option)
1376 +// any later version.
1378 +// This library is distributed in the hope that it will be useful,
1379 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
1380 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1381 +// GNU General Public License for more details.
1383 +// You should have received a copy of the GNU General Public License along
1384 +// with this library; see the file COPYING. If not, write to the Free
1385 +// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
1386 +// USA.
1388 +// As a special exception, you may use this file as part of a free software
1389 +// library without restriction. Specifically, if other files instantiate
1390 +// templates or use macros or inline functions from this file, or you compile
1391 +// this file and link it with other files to produce an executable, this
1392 +// file does not by itself cause the resulting executable to be covered by
1393 +// the GNU General Public License. This exception does not however
1394 +// invalidate any other reasons why the executable file might be covered by
1395 +// the GNU General Public License.
1397 +/** @file ctype_inline.h
1398 + * This is an internal header file, included by other library headers.
1399 + * You should not attempt to use it directly.
1400 + */
1403 +// ISO C++ 14882: 22.1 Locales
1406 +// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*)
1407 +// functions go in ctype.cc
1409 +// The following definitions are portable, but insanely slow. If one
1410 +// cares at all about performance, then specialized ctype
1411 +// functionality should be added for the native os in question: see
1412 +// the config/os/bits/ctype_*.h files.
1414 +// Constructing a synthetic "C" table should be seriously considered...
1416 +namespace std _GLIBCXX_VISIBILITY(default)
1418 +_GLIBCXX_BEGIN_NAMESPACE_VERSION
1420 + bool
1421 + ctype<char>::
1422 + is(mask __m, char __c) const
1423 + {
1424 + if (_M_table)
1425 + return _M_table[static_cast<unsigned char>(__c)] & __m;
1426 + else
1428 + bool __ret = false;
1429 + const size_t __bitmasksize = 15;
1430 + size_t __bitcur = 0; // Lowest bitmask in ctype_base == 0
1431 + for (; __bitcur <= __bitmasksize; ++__bitcur)
1433 + const mask __bit = static_cast<mask>(1 << __bitcur);
1434 + if (__m & __bit)
1436 + bool __testis;
1437 + switch (__bit)
1439 + case space:
1440 + __testis = isspace(__c);
1441 + break;
1442 + case print:
1443 + __testis = isprint(__c);
1444 + break;
1445 + case cntrl:
1446 + __testis = iscntrl(__c);
1447 + break;
1448 + case upper:
1449 + __testis = isupper(__c);
1450 + break;
1451 + case lower:
1452 + __testis = islower(__c);
1453 + break;
1454 + case alpha:
1455 + __testis = isalpha(__c);
1456 + break;
1457 + case digit:
1458 + __testis = isdigit(__c);
1459 + break;
1460 + case punct:
1461 + __testis = ispunct(__c);
1462 + break;
1463 + case xdigit:
1464 + __testis = isxdigit(__c);
1465 + break;
1466 + case alnum:
1467 + __testis = isalnum(__c);
1468 + break;
1469 + case graph:
1470 + __testis = isgraph(__c);
1471 + break;
1472 + default:
1473 + __testis = false;
1474 + break;
1476 + __ret |= __testis;
1479 + return __ret;
1483 + const char*
1484 + ctype<char>::
1485 + is(const char* __low, const char* __high, mask* __vec) const
1487 + if (_M_table)
1488 + while (__low < __high)
1489 + *__vec++ = _M_table[static_cast<unsigned char>(*__low++)];
1490 + else
1492 + // Highest bitmask in ctype_base == 10.
1493 + const size_t __bitmasksize = 15;
1494 + for (;__low < __high; ++__vec, ++__low)
1496 + mask __m = 0;
1497 + // Lowest bitmask in ctype_base == 0
1498 + size_t __i = 0;
1499 + for (;__i <= __bitmasksize; ++__i)
1501 + const mask __bit = static_cast<mask>(1 << __i);
1502 + if (this->is(__bit, *__low))
1503 + __m |= __bit;
1505 + *__vec = __m;
1508 + return __high;
1511 + const char*
1512 + ctype<char>::
1513 + scan_is(mask __m, const char* __low, const char* __high) const
1515 + if (_M_table)
1516 + while (__low < __high
1517 + && !(_M_table[static_cast<unsigned char>(*__low)] & __m))
1518 + ++__low;
1519 + else
1520 + while (__low < __high && !this->is(__m, *__low))
1521 + ++__low;
1522 + return __low;
1525 + const char*
1526 + ctype<char>::
1527 + scan_not(mask __m, const char* __low, const char* __high) const
1529 + if (_M_table)
1530 + while (__low < __high
1531 + && (_M_table[static_cast<unsigned char>(*__low)] & __m) != 0)
1532 + ++__low;
1533 + else
1534 + while (__low < __high && this->is(__m, *__low) != 0)
1535 + ++__low;
1536 + return __low;
1539 +_GLIBCXX_END_NAMESPACE_VERSION
1540 +} // namespace
1541 diff -ruN gcc-5-20150111/libstdc++-v3/config/os/aros/ctype_noninline.h gcc-5-20150111.aros/libstdc++-v3/config/os/aros/ctype_noninline.h
1542 --- gcc-5-20150111/libstdc++-v3/config/os/aros/ctype_noninline.h 1970-01-01 01:00:00.000000000 +0100
1543 +++ gcc-5-20150111.aros/libstdc++-v3/config/os/aros/ctype_noninline.h 2015-01-27 00:34:47.385773501 +0000
1544 @@ -0,0 +1,56 @@
1545 + const ctype_base::mask*
1546 + ctype<char>::classic_table() throw()
1547 + { return *__ctype_b_ptr; }
1549 + ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
1550 + size_t __refs)
1551 + : facet(__refs), _M_del(__table != 0 && __del),
1552 + _M_toupper(NULL), _M_tolower(NULL),
1553 + _M_table(__table ? __table : classic_table())
1554 + {
1555 + memset(_M_widen, 0, sizeof(_M_widen));
1556 + _M_widen_ok = 0;
1557 + memset(_M_narrow, 0, sizeof(_M_narrow));
1558 + _M_narrow_ok = 0;
1561 + ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
1562 + : facet(__refs), _M_del(__table != 0 && __del),
1563 + _M_toupper(NULL), _M_tolower(NULL),
1564 + _M_table(__table ? __table : classic_table())
1565 + {
1566 + memset(_M_widen, 0, sizeof(_M_widen));
1567 + _M_widen_ok = 0;
1568 + memset(_M_narrow, 0, sizeof(_M_narrow));
1569 + _M_narrow_ok = 0;
1572 + char
1573 + ctype<char>::do_toupper(char __c) const
1574 + { return ::toupper((int) __c); }
1576 + const char*
1577 + ctype<char>::do_toupper(char* __low, const char* __high) const
1579 + while (__low < __high)
1581 + *__low = ::toupper((int) *__low);
1582 + ++__low;
1584 + return __high;
1587 + char
1588 + ctype<char>::do_tolower(char __c) const
1589 + { return ::tolower((int) __c); }
1591 + const char*
1592 + ctype<char>::do_tolower(char* __low, const char* __high) const
1594 + while (__low < __high)
1596 + *__low = ::tolower((int) *__low);
1597 + ++__low;
1599 + return __high;
1601 diff -ruN gcc-5-20150111/libstdc++-v3/config/os/aros/os_defines.h gcc-5-20150111.aros/libstdc++-v3/config/os/aros/os_defines.h
1602 --- gcc-5-20150111/libstdc++-v3/config/os/aros/os_defines.h 1970-01-01 01:00:00.000000000 +0100
1603 +++ gcc-5-20150111.aros/libstdc++-v3/config/os/aros/os_defines.h 2015-01-27 00:34:47.385773501 +0000
1604 @@ -0,0 +1,6 @@
1605 +#ifndef _GLIBCXX_OS_DEFINES
1606 +#define _GLIBCXX_OS_DEFINES
1608 +#define __off64_t off_t
1610 +#endif
1611 diff -ruN gcc-5-20150111/libstdc++-v3/configure gcc-5-20150111.aros/libstdc++-v3/configure
1612 --- gcc-5-20150111/libstdc++-v3/configure 2014-12-19 18:16:39.000000000 +0000
1613 +++ gcc-5-20150111.aros/libstdc++-v3/configure 2015-01-27 00:34:47.385773501 +0000
1614 @@ -5306,12 +5306,12 @@
1617 # Libtool setup.
1618 -if test "x${with_newlib}" != "xyes"; then
1619 - enable_dlopen=yes
1624 +#if test "x${with_newlib}" != "xyes"; then
1625 +# AC_LIBTOOL_DLOPEN
1629 +#fi
1630 case `pwd` in
1631 *\ * | *\ *)
1632 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
1633 @@ -8042,6 +8042,8 @@
1637 + enable_dlopen=no
1640 enable_win32_dll=no
1642 @@ -18660,6 +18662,7 @@
1644 struct iovec iov[2];
1645 writev(0, iov, 0);
1646 +#error be sure to fail
1648 return 0;
1650 @@ -18682,6 +18685,7 @@
1652 struct iovec iov[2];
1653 writev(0, iov, 0);
1654 +#error be sure to fail
1656 return 0;
1658 @@ -27858,6 +27862,58 @@
1660 # Base decisions on target environment.
1661 case "${host}" in
1662 + *-aros*)
1663 + for ac_header in nan.h ieeefp.h endian.h sys/isa_defs.h machine/endian.h \
1664 + machine/param.h sys/machine.h sys/types.h fp.h locale.h float.h inttypes.h
1665 +do :
1666 + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
1667 +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
1668 +eval as_val=\$$as_ac_Header
1669 + if test "x$as_val" = x""yes; then :
1670 + cat >>confdefs.h <<_ACEOF
1671 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
1672 +_ACEOF
1676 +done
1679 + GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
1680 + GLIBCXX_CHECK_WCHAR_T_SUPPORT
1682 + $as_echo "#define HAVE_FINITE 1" >>confdefs.h
1684 + $as_echo "#define HAVE_FINITEF 1" >>confdefs.h
1686 + $as_echo "#define HAVE_FREXPF 1" >>confdefs.h
1688 + $as_echo "#define HAVE_HYPOTF 1" >>confdefs.h
1690 + $as_echo "#define HAVE_ISINF 1" >>confdefs.h
1692 + $as_echo "#define HAVE_ISINFF 1" >>confdefs.h
1694 + $as_echo "#define HAVE_ISNAN 1" >>confdefs.h
1696 + $as_echo "#define HAVE_ISNANF 1" >>confdefs.h
1698 + $as_echo "#define HAVE_SINCOS 1" >>confdefs.h
1700 + $as_echo "#define HAVE_SINCOSF 1" >>confdefs.h
1702 + if test x"long_double_math_on_this_cpu" = x"yes"; then
1703 + $as_echo "#define HAVE_FINITEL 1" >>confdefs.h
1705 + $as_echo "#define HAVE_HYPOTL 1" >>confdefs.h
1707 + $as_echo "#define HAVE_ISINFL 1" >>confdefs.h
1709 + $as_echo "#define HAVE_ISNANL 1" >>confdefs.h
1711 + fi
1712 + ;;
1714 arm*-*-symbianelf*)
1715 # This is a freestanding configuration; there is nothing to do here.
1717 diff -ruN gcc-5-20150111/libstdc++-v3/configure.ac gcc-5-20150111.aros/libstdc++-v3/configure.ac
1718 --- gcc-5-20150111/libstdc++-v3/configure.ac 2014-12-19 18:16:39.000000000 +0000
1719 +++ gcc-5-20150111.aros/libstdc++-v3/configure.ac 2015-01-27 00:34:47.385773501 +0000
1720 @@ -89,9 +89,9 @@
1721 GLIBCXX_CONFIGURE
1723 # Libtool setup.
1724 -if test "x${with_newlib}" != "xyes"; then
1725 - AC_LIBTOOL_DLOPEN
1727 +#if test "x${with_newlib}" != "xyes"; then
1728 +# AC_LIBTOOL_DLOPEN
1729 +#fi
1730 AM_PROG_LIBTOOL
1731 ACX_LT_HOST_FLAGS
1732 AC_SUBST(enable_shared)
1733 diff -ruN gcc-5-20150111/libstdc++-v3/configure.host gcc-5-20150111.aros/libstdc++-v3/configure.host
1734 --- gcc-5-20150111/libstdc++-v3/configure.host 2015-01-09 14:06:02.000000000 +0000
1735 +++ gcc-5-20150111.aros/libstdc++-v3/configure.host 2015-01-27 00:34:47.385773501 +0000
1736 @@ -235,6 +235,9 @@
1737 os_include_dir="os/generic"
1738 atomicity_dir="cpu/generic"
1740 + aros*)
1741 + os_include_dir="os/aros"
1742 + ;;
1743 bsd*)
1744 # Plain BSD attempts to share FreeBSD files.
1745 os_include_dir="os/bsd/freebsd"
1746 diff -ruN gcc-5-20150111/libstdc++-v3/crossconfig.m4 gcc-5-20150111.aros/libstdc++-v3/crossconfig.m4
1747 --- gcc-5-20150111/libstdc++-v3/crossconfig.m4 2014-04-22 13:30:59.000000000 +0100
1748 +++ gcc-5-20150111.aros/libstdc++-v3/crossconfig.m4 2015-01-27 00:34:47.385773501 +0000
1749 @@ -5,6 +5,31 @@
1750 AC_DEFUN([GLIBCXX_CROSSCONFIG],[
1751 # Base decisions on target environment.
1752 case "${host}" in
1753 + *-aros*)
1754 + AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h machine/endian.h \
1755 + machine/param.h sys/machine.h sys/types.h fp.h locale.h float.h inttypes.h])
1757 + GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
1758 + GLIBCXX_CHECK_WCHAR_T_SUPPORT
1760 + AC_DEFINE(HAVE_FINITE)
1761 + AC_DEFINE(HAVE_FINITEF)
1762 + AC_DEFINE(HAVE_FREXPF)
1763 + AC_DEFINE(HAVE_HYPOTF)
1764 + AC_DEFINE(HAVE_ISINF)
1765 + AC_DEFINE(HAVE_ISINFF)
1766 + AC_DEFINE(HAVE_ISNAN)
1767 + AC_DEFINE(HAVE_ISNANF)
1768 + AC_DEFINE(HAVE_SINCOS)
1769 + AC_DEFINE(HAVE_SINCOSF)
1770 + if test x"long_double_math_on_this_cpu" = x"yes"; then
1771 + AC_DEFINE(HAVE_FINITEL)
1772 + AC_DEFINE(HAVE_HYPOTL)
1773 + AC_DEFINE(HAVE_ISINFL)
1774 + AC_DEFINE(HAVE_ISNANL)
1775 + fi
1776 + ;;
1778 arm*-*-symbianelf*)
1779 # This is a freestanding configuration; there is nothing to do here.
1781 diff -ruN gcc-5-20150111/libstdc++-v3/include/Makefile.in gcc-5-20150111.aros/libstdc++-v3/include/Makefile.in
1782 --- gcc-5-20150111/libstdc++-v3/include/Makefile.in 2014-12-19 18:16:39.000000000 +0000
1783 +++ gcc-5-20150111.aros/libstdc++-v3/include/Makefile.in 2015-01-27 00:34:47.385773501 +0000
1784 @@ -1594,6 +1594,7 @@
1785 -e '/^#/s/\(${uppercase}${uppercase}*\)/_GLIBCXX_\1/g' \
1786 -e 's/_GLIBCXX_SUPPORTS_WEAK/__GXX_WEAK__/g' \
1787 -e 's/_GLIBCXX___MINGW32_GLIBCXX___/__MINGW32__/g' \
1788 + -e 's/_GLIBCXX___AROS__/__AROS__/g' \
1789 -e 's,^#include "\(.*\)",#include <bits/\1>,g' \
1790 < $< > $@
1792 diff -ruN gcc-5-20150111/libstdc++-v3/include/std/ratio gcc-5-20150111.aros/libstdc++-v3/include/std/ratio
1793 --- gcc-5-20150111/libstdc++-v3/include/std/ratio 2015-01-05 12:33:28.000000000 +0000
1794 +++ gcc-5-20150111.aros/libstdc++-v3/include/std/ratio 2015-01-27 00:34:47.385773501 +0000
1795 @@ -211,10 +211,10 @@
1797 private:
1798 static_assert(__d != 0, "Internal library error");
1799 - static_assert(sizeof (uintmax_t) == sizeof (unsigned long long),
1800 - "This library calls __builtin_clzll on uintmax_t, which "
1801 - "is unsafe on your platform. Please complain to "
1802 - "http://gcc.gnu.org/bugzilla/");
1803 +// static_assert(sizeof (uintmax_t) == sizeof (unsigned long long),
1804 +// "This library calls __builtin_clzll on uintmax_t, which "
1805 +// "is unsafe on your platform. Please complain to "
1806 +// "http://gcc.gnu.org/bugzilla/");
1807 static constexpr int __shift = __builtin_clzll(__d);
1808 static constexpr int __coshift_ = sizeof(uintmax_t) * 8 - __shift;
1809 static constexpr int __coshift = (__shift != 0) ? __coshift_ : 0;