Added some SD files which are needed by "contrib".
[AROS.git] / tools / crosstools / gcc-4.8.3-aros.diff
blob6d637dae2c267f2bb4be67b47bb4aa947a49920f
1 diff -urN gcc-4.8.3/configure gcc-4.8.3.new/configure
2 --- gcc-4.8.3/configure 2011-12-18 05:03:44.000000000 -0500
3 +++ gcc-4.8.3.new/configure 2013-12-02 20:22:15.904776124 -0500
4 @@ -3730,6 +3730,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 @@ -3852,6 +3855,8 @@
15 rs6000-*-aix*)
16 host_makefile_frag="config/mh-ppc-aix"
18 + *-*-aros*)
19 + ;;
20 esac
23 diff -urN gcc-4.8.3/configure.ac gcc-4.8.3.new/configure.ac
24 --- gcc-4.8.3/configure.ac 2011-11-18 06:45:44.000000000 -0500
25 +++ gcc-4.8.3.new/configure.ac 2013-12-02 20:22:15.904776124 -0500
26 @@ -1069,6 +1069,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 @@ -1172,6 +1175,8 @@
37 rs6000-*-aix*)
38 host_makefile_frag="config/mh-ppc-aix"
40 + *-*-aros*)
41 + ;;
42 esac
45 diff -urN gcc-4.8.3/fixincludes/configure gcc-4.8.3.new/fixincludes/configure
46 --- gcc-4.8.3/fixincludes/configure 2010-06-03 02:45:02.000000000 -0400
47 +++ gcc-4.8.3.new/fixincludes/configure 2013-12-02 20:22:15.904776124 -0500
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 -urN gcc-4.8.3/fixincludes/configure.ac gcc-4.8.3.new/fixincludes/configure.ac
57 --- gcc-4.8.3/fixincludes/configure.ac 2010-06-03 02:45:02.000000000 -0400
58 +++ gcc-4.8.3.new/fixincludes/configure.ac 2013-12-02 20:22:15.904776124 -0500
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 -urN gcc-4.8.3/gcc/config/arm/aros.h gcc-4.8.3.new/gcc/config/arm/aros.h
68 --- gcc-4.8.3/gcc/config/arm/aros.h 1969-12-31 19:00:00.000000000 -0500
69 +++ gcc-4.8.3.new/gcc/config/arm/aros.h 2013-12-02 20:22:15.904776124 -0500
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 -urN gcc-4.8.3/gcc/config/arm/t-aros gcc-4.8.3.new/gcc/config/arm/t-aros
154 --- gcc-4.8.3/gcc/config/arm/t-aros 1969-12-31 19:00:00.000000000 -0500
155 +++ gcc-4.8.3.new/gcc/config/arm/t-aros 2013-12-02 20:22:15.904776124 -0500
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 -urN gcc-4.8.3/gcc/config/aros.h gcc-4.8.3.new/gcc/config/aros.h
179 --- gcc-4.8.3/gcc/config/aros.h 1969-12-31 19:00:00.000000000 -0500
180 +++ gcc-4.8.3.new/gcc/config/aros.h 2013-12-02 20:22:15.908776146 -0500
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 + "%{detach:detach.o%s} startup.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 "%{!nostdinc:-isystem %R/include%{!nostdc:%{!noposixc: -isystem %R/include/aros/posixc} -isystem %R/include/aros/stdc}}"
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 -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 -urN gcc-4.8.3/gcc/config/i386/aros64.h gcc-4.8.3.new/gcc/config/i386/aros64.h
292 --- gcc-4.8.3/gcc/config/i386/aros64.h 1969-12-31 19:00:00.000000000 -0500
293 +++ gcc-4.8.3.new/gcc/config/i386/aros64.h 2013-12-02 20:22:15.908776146 -0500
294 @@ -0,0 +1,40 @@
295 +/* Definitions for AMD x86_64 running AROS systems with ELF64 format.
296 + Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002
297 + Free Software Foundation, Inc.
298 + Contributed by Stanislaw Szymczyk <sszymczy@gmail.com>. Based on aros.h.
300 +This file is part of GNU CC.
302 +GNU CC is free software; you can redistribute it and/or modify
303 +it under the terms of the GNU General Public License as published by
304 +the Free Software Foundation; either version 2, or (at your option)
305 +any later version.
307 +GNU CC is distributed in the hope that it will be useful,
308 +but WITHOUT ANY WARRANTY; without even the implied warranty of
309 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
310 +GNU General Public License for more details.
312 +You should have received a copy of the GNU General Public License
313 +along with GNU CC; see the file COPYING. If not, write to
314 +the Free Software Foundation, 59 Temple Place - Suite 330,
315 +Boston, MA 02111-1307, USA. */
317 +/* Output at beginning of assembler file. */
318 +/* The .file command should always begin the output. */
320 +#undef TARGET_VERSION
321 +#define TARGET_VERSION fprintf (stderr, " (x86_64 AROS/ELF)");
323 +/* The svr4 ABI for the i386 says that records and unions are returned
324 + in memory. In the 64bit compilation we will turn this flag off in
325 + override_options, as we never do pcc_struct_return scheme on this target. */
326 +#undef DEFAULT_PCC_STRUCT_RETURN
327 +#define DEFAULT_PCC_STRUCT_RETURN 1
329 +/* Provide a LINK_SPEC appropriate for AROS. */
331 +#undef LINK_SPEC
332 +#define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} -L %R/lib"
334 +/* FIXME: AROS doesn't support dw2 unwinding yet. */
335 diff -urN gcc-4.8.3/gcc/config/i386/aros.h gcc-4.8.3.new/gcc/config/i386/aros.h
336 --- gcc-4.8.3/gcc/config/i386/aros.h 1969-12-31 19:00:00.000000000 -0500
337 +++ gcc-4.8.3.new/gcc/config/i386/aros.h 2013-12-02 20:22:15.908776146 -0500
338 @@ -0,0 +1,25 @@
339 +/* Definitions for Intel 386 running AROS systems with ELF format.
340 + Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002
341 + Free Software Foundation, Inc.
342 + Contributed by Fabio Alemagna.
343 + Based upon i386/linux.h by Eric Youngdale.
345 +This file is part of GNU CC.
347 +GNU CC is free software; you can redistribute it and/or modify
348 +it under the terms of the GNU General Public License as published by
349 +the Free Software Foundation; either version 2, or (at your option)
350 +any later version.
352 +GNU CC is distributed in the hope that it will be useful,
353 +but WITHOUT ANY WARRANTY; without even the implied warranty of
354 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
355 +GNU General Public License for more details.
357 +You should have received a copy of the GNU General Public License
358 +along with GNU CC; see the file COPYING. If not, write to
359 +the Free Software Foundation, 59 Temple Place - Suite 330,
360 +Boston, MA 02111-1307, USA. */
362 +#undef LINK_SPEC
363 +#define LINK_SPEC "-m elf_i386 -L%R/lib"
364 diff -urN gcc-4.8.3/gcc/config/m68k/m68k.c gcc-4.8.3.new/gcc/config/m68k/m68k.c
365 --- gcc-4.8.3/gcc/config/m68k/m68k.c 2011-07-31 11:09:25.000000000 -0400
366 +++ gcc-4.8.3.new/gcc/config/m68k/m68k.c 2013-12-02 20:22:15.908776146 -0500
367 @@ -4437,7 +4437,7 @@
368 else if (letter == '/')
369 asm_fprintf (file, "%R");
370 else if (letter == '?')
371 - asm_fprintf (file, m68k_library_id_string);
372 + asm_fprintf (file, "%s", m68k_library_id_string);
373 else if (letter == 'p')
375 output_addr_const (file, op);
376 diff -urN gcc-4.8.3/gcc/config/m68k/m68k.h gcc-4.8.3.new/gcc/config/m68k/m68k.h
377 --- gcc-4.8.3/gcc/config/m68k/m68k.h 2010-11-21 20:57:50.000000000 -0500
378 +++ gcc-4.8.3.new/gcc/config/m68k/m68k.h 2013-12-02 20:22:15.908776146 -0500
379 @@ -337,7 +337,9 @@
380 register elimination. */
381 #define FIRST_PSEUDO_REGISTER 25
383 -/* All m68k targets (except AmigaOS) use %a5 as the PIC register */
384 +/* All m68k targets (except AmigaOS) use %a5 as the PIC register.
385 + * On AmigaOS, we use %a4
386 + */
387 #define PIC_OFFSET_TABLE_REGNUM \
388 (!flag_pic ? INVALID_REGNUM \
389 : reload_completed ? REGNO (pic_offset_table_rtx) \
390 @@ -427,7 +429,8 @@
391 /* Most m68k targets use %a6 as a frame pointer. The AmigaOS
392 ABI uses %a6 for shared library calls, therefore the frame
393 pointer is shifted to %a5 on this target. */
394 -#define FRAME_POINTER_REGNUM A6_REG
395 +#define FRAME_POINTER_REGNUM A5_REG
396 +#define PIC_REG A4_REG
398 /* Base register for access to arguments of the function.
399 * This isn't a hardware register. It will be eliminated to the
400 diff -urN gcc-4.8.3/gcc/config/m68k/m68k.md gcc-4.8.3.new/gcc/config/m68k/m68k.md
401 --- gcc-4.8.3/gcc/config/m68k/m68k.md 2009-12-30 18:03:46.000000000 -0500
402 +++ gcc-4.8.3.new/gcc/config/m68k/m68k.md 2013-12-02 20:22:15.912776170 -0500
403 @@ -133,7 +133,8 @@
404 [(D0_REG 0)
405 (A0_REG 8)
406 (A1_REG 9)
407 - (PIC_REG 13)
408 + (A4_REG 12)
409 + (A5_REG 13)
410 (A6_REG 14)
411 (SP_REG 15)
412 (FP0_REG 16)
413 @@ -7078,7 +7079,7 @@
415 if (TARGET_ID_SHARED_LIBRARY)
417 - operands[1] = gen_rtx_REG (Pmode, PIC_REG);
418 + operands[1] = gen_rtx_REG (Pmode, A4_REG);
419 return MOTOROLA ? "move.l %?(%1),%0" : "movel %1@(%?), %0";
421 else if (MOTOROLA)
422 diff -urN gcc-4.8.3/gcc/config/m68k/t-aros gcc-4.8.3.new/gcc/config/m68k/t-aros
423 --- gcc-4.8.3/gcc/config/m68k/t-aros 1969-12-31 19:00:00.000000000 -0500
424 +++ gcc-4.8.3.new/gcc/config/m68k/t-aros 2013-12-02 20:22:15.912776170 -0500
425 @@ -0,0 +1,2 @@
426 +# Custom multilibs for AROS
427 +M68K_MLIB_CPU += && match(MLIB, "^68")
428 diff -urN gcc-4.8.3/gcc/config/rs6000/aros.h gcc-4.8.3.new/gcc/config/rs6000/aros.h
429 --- gcc-4.8.3/gcc/config/rs6000/aros.h 1969-12-31 19:00:00.000000000 -0500
430 +++ gcc-4.8.3.new/gcc/config/rs6000/aros.h 2013-12-02 20:22:15.912776170 -0500
431 @@ -0,0 +1,161 @@
432 +/* Definitions for Powerpc running AROS systems with ELF format.
433 + Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002
434 + Free Software Foundation, Inc.
435 + Contributed by Markus Weiss.
436 + Based upon i386/aros.h by Fabio Alemagna.
438 +This file is part of GNU CC.
440 +GNU CC is free software; you can redistribute it and/or modify
441 +it under the terms of the GNU General Public License as published by
442 +the Free Software Foundation; either version 2, or (at your option)
443 +any later version.
445 +GNU CC is distributed in the hope that it will be useful,
446 +but WITHOUT ANY WARRANTY; without even the implied warranty of
447 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
448 +GNU General Public License for more details.
450 +You should have received a copy of the GNU General Public License
451 +along with GNU CC; see the file COPYING. If not, write to
452 +the Free Software Foundation, 59 Temple Place - Suite 330,
453 +Boston, MA 02111-1307, USA. */
455 +/* Symbols missing in comparison to i386/aros.h are either
456 + defined in elfos.h, rs6000/rs6000.h rs6000/sysv4.h
457 + or not needed for PowerPC.
460 +/* We need to define __powerpc__. */
462 +#undef TARGET_OS_CPP_BUILTINS
463 +#define TARGET_OS_CPP_BUILTINS() \
464 + do \
465 + { \
466 + builtin_define_std ("AROS"); \
467 + builtin_define ("AMIGA"); \
468 + builtin_define ("_AMIGA"); \
469 + builtin_define ("__powerpc__"); \
470 + builtin_define ("__ELF__"); \
471 + builtin_assert ("system=posix"); \
472 + if (flag_pic) \
473 + { \
474 + builtin_define ("__PIC__"); \
475 + builtin_define ("__pic__"); \
476 + } \
477 + } \
478 + while (0)
480 +/* This one taken from linux.h. */
481 +/* We are 32-bit all the time, so optimize a little. */
482 +#undef TARGET_64BIT
483 +#define TARGET_64BIT 0
485 +/* Output at beginning of assembler file. */
486 +/* The .file command should always begin the output. */
487 +/*#undef TARGET_ASM_FILE_START_FILE_DIRECTIVE
488 +#define TARGET_ASM_FILE_START_FILE_DIRECTIVE true
489 +defined in elfos.h
492 +#undef TARGET_VERSION
493 +#define TARGET_VERSION fprintf (stderr, " (PowerPC AROS/ELF)");
495 +/* The svr4 ABI for the i386 says that records and unions are returned
496 + in memory. */
497 +/*#undef DEFAULT_PCC_STRUCT_RETURN
498 +#define DEFAULT_PCC_STRUCT_RETURN 1
499 +see rs6000/rs6000.h
503 +#undef ASM_COMMENT_START
504 +#define ASM_COMMENT_START "#"
505 +see rs6000/rs6000.h
509 +#undef DBX_REGISTER_NUMBER
510 +#define DBX_REGISTER_NUMBER(n) \
511 + (TARGET_64BIT ? dbx64_register_map[n] : svr4_dbx_register_map[n])
512 +see rs6000/sysv4.h
515 +/* Output assembler code to FILE to call the profiler.
516 + To the best of my knowledge, no Linux libc has required the label
517 + argument to mcount. */
520 +#define NO_PROFILE_COUNTERS 1
521 +not used by other similar ppc compilers
522 +only in darwin.h rs6000/linux64.h rs6000/rs6000.c
526 +#undef MCOUNT_NAME
527 +#define MCOUNT_NAME "mcount"
528 +see rs6000/sysv4.h RS6000_MCOUNT
531 +/* The GLIBC version of mcount for the x86 assumes that there is a
532 + frame, so we cannot allow profiling without a frame pointer. */
534 +#undef SUBTARGET_FRAME_POINTER_REQUIRED
535 +#define SUBTARGET_FRAME_POINTER_REQUIRED crtl->profile
536 +seems to be handled by rs6000/rs6000.h
539 +#undef CC1_SPEC
540 +#define CC1_SPEC "%(cc1_cpu) %{profile:-p}"
542 +/* Provide a LINK_SPEC appropriate for AROS. */
544 +#undef LINK_SPEC
545 +#define LINK_SPEC "-m elf32ppc -L %R/lib"
547 +/* A C statement (sans semicolon) to output to the stdio stream
548 + FILE the assembler definition of uninitialized global DECL named
549 + NAME whose size is SIZE bytes and alignment is ALIGN bytes.
550 + Try to use asm_output_aligned_bss to implement this macro. */
552 +#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
553 + asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
554 +see rs6000/sysv4.h
557 +/* A C statement to output to the stdio stream FILE an assembler
558 + command to advance the location counter to a multiple of 1<<LOG
559 + bytes if it is within MAX_SKIP bytes.
561 + This is used to align code labels according to Intel recommendations. */
563 +#ifdef HAVE_GAS_MAX_SKIP_P2ALIGN
564 +#define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE,LOG,MAX_SKIP) \
565 + do { \
566 + if ((LOG) != 0) { \
567 + if ((MAX_SKIP) == 0) fprintf ((FILE), "\t.p2align %d\n", (LOG)); \
568 + else fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)); \
569 + } \
570 + } while (0)
571 +#endif
572 +see rs6000/sysv4.h
575 +/* Handle special EH pointer encodings. Absolute, pc-relative, and
576 + indirect are handled automatically. */
578 +#define ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX(FILE, ENCODING, SIZE, ADDR, DONE) \
579 + do { \
580 + if ((SIZE) == 4 && ((ENCODING) & 0x70) == DW_EH_PE_datarel) \
581 + { \
582 + fputs (ASM_LONG, FILE); \
583 + assemble_name (FILE, XSTR (ADDR, 0)); \
584 + fputs (((ENCODING) & DW_EH_PE_indirect ? "@GOT" : "@GOTOFF"), FILE); \
585 + goto DONE; \
586 + } \
587 + } while (0)
588 +not used for PowerPC
591 +/* FIXME: AROS doesn't support dw2 unwinding yet. */
592 +#undef MD_FALLBACK_FRAME_STATE_FOR
593 diff -urN gcc-4.8.3/gcc/config/rs6000/rs6000.c gcc-4.8.3.new/gcc/config/rs6000/rs6000.c
594 --- gcc-4.8.3/gcc/config/rs6000/rs6000.c 2013-02-08 10:07:55.000000000 -0500
595 +++ gcc-4.8.3.new/gcc/config/rs6000/rs6000.c 2013-12-02 20:22:15.916776186 -0500
596 @@ -1246,6 +1246,8 @@
597 false },
598 { "shortcall", 0, 0, false, true, true, rs6000_handle_longcall_attribute,
599 false },
600 + { "stackparm", 0, 0, false, true, true, rs6000_handle_longcall_attribute,
601 + false },
602 { "ms_struct", 0, 0, false, false, false, rs6000_handle_struct_attribute,
603 false },
604 { "gcc_struct", 0, 0, false, false, false, rs6000_handle_struct_attribute,
605 @@ -9026,6 +9028,9 @@
606 && !lookup_attribute ("shortcall", TYPE_ATTRIBUTES (fntype))))
607 cum->call_cookie |= CALL_LONG;
609 + cum->stackparm = fntype && lookup_attribute("stackparm",
610 + TYPE_ATTRIBUTES(fntype));
612 if (TARGET_DEBUG_ARG)
614 fprintf (stderr, "\ninit_cumulative_args:");
615 @@ -10104,6 +10109,9 @@
617 rs6000_discover_homogeneous_aggregate (mode, type, &elt_mode, &n_elts);
619 + if (cum->stackparm)
620 + return NULL_RTX;
622 if (TARGET_MACHO && rs6000_darwin64_struct_check_p (mode, type))
624 rtx rslt = rs6000_darwin64_record_arg (cum, type, named, /*retval= */false);
625 @@ -10619,6 +10627,9 @@
626 int first_reg_offset;
627 alias_set_type set;
629 + if (cum->stackparm)
630 + return;
632 /* Skip the last named argument. */
633 next_cum = *get_cumulative_args (cum);
634 rs6000_function_arg_advance_1 (&next_cum, mode, type, true, 0);
635 diff -urN gcc-4.8.3/gcc/config/rs6000/rs6000.h gcc-4.8.3.new/gcc/config/rs6000/rs6000.h
636 --- gcc-4.8.3/gcc/config/rs6000/rs6000.h 2012-04-13 17:55:15.000000000 -0400
637 +++ gcc-4.8.3.new/gcc/config/rs6000/rs6000.h 2013-12-02 20:22:15.916776186 -0500
638 @@ -1717,6 +1717,7 @@
639 int nargs_prototype; /* # args left in the current prototype */
640 int prototype; /* Whether a prototype was defined */
641 int stdarg; /* Whether function is a stdarg function. */
642 + int stackparm; /* Whether function has all args on the stack */
643 int call_cookie; /* Do special things for this call */
644 int sysv_gregno; /* next available GP register */
645 int intoffset; /* running offset in struct (darwin64) */
646 diff -urN gcc-4.8.3/gcc/config/t-aros gcc-4.8.3.new/gcc/config/t-aros
647 --- gcc-4.8.3/gcc/config/t-aros 1969-12-31 19:00:00.000000000 -0500
648 +++ gcc-4.8.3.new/gcc/config/t-aros 2013-12-02 20:22:15.920776210 -0500
649 @@ -0,0 +1,29 @@
650 +# In AROS, "/usr" is a four-letter word.
651 +# Must match NATIVE_SYSTEM_HEADER_COMPONENT in aros.h !
652 +NATIVE_SYSTEM_HEADER_DIR = /include
654 +# Don't add AROS target include path when compiling host compiler
655 +CPPFLAGS =
657 +# Copy AROS specific include replacement files
658 +LIBGCC_DEPS += stmp-aros-hrds
660 +EXTRA_AROS_HEADERS = aros/types/size_t.h aros/types/ptrdiff_t.h \
661 + aros/types/wchar_t.h aros/types/wint_t.h aros/types/null.h
663 +stmp-int-hdrs : | include/aros/types
665 +include/aros/types : $(addprefix $(srcdir)/ginclude/,$(EXTRA_AROS_HEADERS))
666 + -if [ -d include ] ; then true; else mkdir include; chmod a+rx include; fi
667 + -if [ -d include/aros/types ] ; \
668 + then true; \
669 + else \
670 + mkdir include/aros; chmod a+rx include/aros; \
671 + mkdir include/aros/types; chmod a+rx include/aros/types; \
672 + fi
673 + for file in $(EXTRA_AROS_HEADERS); do \
674 + $(STAMP) include/$$file; \
675 + rm -fr include/$$file; \
676 + cp $(srcdir)/ginclude/$$file include/$$file; \
677 + chmod a+r include/$$file; \
678 + done
679 diff -urN gcc-4.8.3/gcc/config.build gcc-4.8.3.new/gcc/config.build
680 --- gcc-4.8.3/gcc/config.build 2010-04-12 14:36:30.000000000 -0400
681 +++ gcc-4.8.3.new/gcc/config.build 2013-12-02 20:22:15.920776210 -0500
682 @@ -102,6 +102,9 @@
683 # HP 9000 series 300
684 build_install_headers_dir=install-headers-cpio
686 + *-*-aros*)
687 + build_xm_file=xm-aros.h
688 + ;;
689 *-*-sysv*)
690 # All other System V variants.
691 build_install_headers_dir=install-headers-cpio
692 diff -urN gcc-4.8.3/gcc/config.gcc gcc-4.8.3.new/gcc/config.gcc
693 --- gcc-4.8.3/gcc/config.gcc 2013-03-06 12:40:07.000000000 -0500
694 +++ gcc-4.8.3.new/gcc/config.gcc 2013-12-02 20:22:15.920776210 -0500
695 @@ -713,6 +713,14 @@
697 esac
699 +*-*-aros*)
700 + gas=yes
701 + gnu_ld=yes
702 + thread_file=single
703 + use_collect2=no
704 + xm_defines='STDC_HEADERS=1'
705 + ;;
707 *-*-openbsd*)
708 tmake_file="t-openbsd"
709 case ${enable_threads} in
710 @@ -860,6 +868,16 @@
711 tm_file="${tm_file} vms/vms.h alpha/vms.h"
712 tmake_file="${tmake_file} alpha/t-vms"
714 +arm*-*-aros*)
715 + tm_file="dbxelf.h elfos.h arm/elf.h arm/bpabi.h aros.h arm/aros.h arm/aout.h arm/arm.h"
716 + tm_file="$tm_file ../../libgcc/config/arm/bpabi-lib.h"
717 + tmake_file="${tmake_file} arm/t-arm arm/t-arm-elf arm/t-arm-softfp arm/t-bpabi arm/t-aros t-aros"
718 + xm_file="xm-aros.h"
719 + # The BPABI long long divmod functions return a 128-bit value in
720 + # registers r0-r3. Correctly modeling that requires the use of
721 + # TImode.
722 + need_64bit_hwint=yes
723 + ;;
724 arm-wrs-vxworks)
725 tm_file="elfos.h arm/elf.h arm/aout.h ${tm_file} vx-common.h vxworks.h arm/vxworks.h"
726 extra_options="${extra_options} arm/vxworks.opt"
727 @@ -1361,6 +1379,16 @@
728 done
729 TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
731 +i[34567]86-*-aros*)
732 + tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/i386elf.h aros.h i386/aros.h"
733 + xm_file=xm-aros.h
734 + tmake_file="${tmake_file} i386/t-i386elf t-aros"
735 + ;;
736 +x86_64-*-aros*)
737 + 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"
738 + tmake_file="${tmake_file} i386/t-i386elf t-aros"
739 + xm_file=xm-aros.h
740 + ;;
741 i[34567]86-pc-msdosdjgpp*)
742 xm_file=i386/xm-djgpp.h
743 tm_file="dbxcoff.h ${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/djgpp.h i386/djgpp-stdint.h"
744 @@ -1651,6 +1679,16 @@
745 thread_file='posix'
748 +m68k-*-aros*)
749 + default_m68k_cpu=68000
750 + default_cf_cpu=5206
751 + 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"
752 + tm_file="${tm_file} aros.h"
753 + tm_defines="${tm_defines} MOTOROLA=1"
754 + tmake_file="m68k/t-floatlib m68k/t-m68kbare m68k/t-m68kelf"
755 + tmake_file="$tmake_file m68k/t-aros m68k/t-mlibs t-aros"
756 + extra_parts="crtbegin.o crtend.o"
757 + ;;
758 m68k-*-elf* | fido-*-elf*)
759 case ${target} in
760 fido-*-elf*)
761 @@ -2075,6 +2113,13 @@
762 extra_options="${extra_options} rs6000/sysv4.opt"
763 tmake_file="rs6000/t-fprules rs6000/t-rtems t-rtems rs6000/t-ppccomm"
765 +powerpc-*-aros*)
766 + tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h aros.h"
767 + extra_options="${extra_options} rs6000/sysv4.opt"
768 + tm_file="${tm_file} rs6000/aros.h"
769 + xm_file=xm-aros.h
770 + tmake_file="$tmake_file t-aros"
771 + ;;
772 powerpc*-*-linux*)
773 tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h"
774 extra_options="${extra_options} rs6000/sysv4.opt"
775 diff -urN gcc-4.8.3/gcc/config.host gcc-4.8.3.new/gcc/config.host
776 --- gcc-4.8.3/gcc/config.host 2011-02-15 04:49:14.000000000 -0500
777 +++ gcc-4.8.3.new/gcc/config.host 2013-12-02 20:22:15.920776210 -0500
778 @@ -276,6 +276,10 @@
779 out_host_hook_obj=host-hpux.o
780 host_xmake_file="${host_xmake_file} x-hpux"
782 + *-*-aros*)
783 + host_can_use_collect2=no
784 + host_xm_file=xm-aros.h
785 + ;;
786 *-*-*vms*)
787 host_xm_file="vms/xm-vms.h"
788 host_xmake_file=vms/x-vms
789 diff -urN gcc-4.8.3/gcc/ginclude/aros/types/null.h gcc-4.8.3.new/gcc/ginclude/aros/types/null.h
790 --- gcc-4.8.3/gcc/ginclude/aros/types/null.h 1969-12-31 19:00:00.000000000 -0500
791 +++ gcc-4.8.3.new/gcc/ginclude/aros/types/null.h 2013-12-02 20:22:15.936776290 -0500
792 @@ -0,0 +1,3 @@
793 +/* Replace AROS' NULL definition with gcc's one */
794 +#define __need_NULL
795 +#include <stddef.h>
796 diff -urN gcc-4.8.3/gcc/ginclude/aros/types/ptrdiff_t.h gcc-4.8.3.new/gcc/ginclude/aros/types/ptrdiff_t.h
797 --- gcc-4.8.3/gcc/ginclude/aros/types/ptrdiff_t.h 1969-12-31 19:00:00.000000000 -0500
798 +++ gcc-4.8.3.new/gcc/ginclude/aros/types/ptrdiff_t.h 2013-12-02 20:22:15.936776290 -0500
799 @@ -0,0 +1,3 @@
800 +/* Replace AROS' ptrdiff_t definition with gcc's one */
801 +#define __need_ptrdiff_t
802 +#include <stddef.h>
803 diff -urN gcc-4.8.3/gcc/ginclude/aros/types/size_t.h gcc-4.8.3.new/gcc/ginclude/aros/types/size_t.h
804 --- gcc-4.8.3/gcc/ginclude/aros/types/size_t.h 1969-12-31 19:00:00.000000000 -0500
805 +++ gcc-4.8.3.new/gcc/ginclude/aros/types/size_t.h 2013-12-02 20:22:15.936776290 -0500
806 @@ -0,0 +1,3 @@
807 +/* Replace AROS' size_t definition with gcc's one */
808 +#define __need_size_t
809 +#include <stddef.h>
810 diff -urN gcc-4.8.3/gcc/ginclude/aros/types/wchar_t.h gcc-4.8.3.new/gcc/ginclude/aros/types/wchar_t.h
811 --- gcc-4.8.3/gcc/ginclude/aros/types/wchar_t.h 1969-12-31 19:00:00.000000000 -0500
812 +++ gcc-4.8.3.new/gcc/ginclude/aros/types/wchar_t.h 2013-12-02 20:22:15.936776290 -0500
813 @@ -0,0 +1,3 @@
814 +/* Replace AROS' wchar_t definition with gcc's one */
815 +#define __need_wchar_t
816 +#include <stddef.h>
817 diff -urN gcc-4.8.3/gcc/ginclude/aros/types/wint_t.h gcc-4.8.3.new/gcc/ginclude/aros/types/wint_t.h
818 --- gcc-4.8.3/gcc/ginclude/aros/types/wint_t.h 1969-12-31 19:00:00.000000000 -0500
819 +++ gcc-4.8.3.new/gcc/ginclude/aros/types/wint_t.h 2013-12-02 20:22:15.936776290 -0500
820 @@ -0,0 +1,3 @@
821 +/* Replace AROS' wint_t definition with gcc's one */
822 +#define __need_wint_t
823 +#include <stddef.h>
824 diff -urN gcc-4.8.3/gcc/ginclude/stddef.h gcc-4.8.3.new/gcc/ginclude/stddef.h
825 --- gcc-4.8.3/gcc/ginclude/stddef.h 2011-01-29 17:15:52.000000000 -0500
826 +++ gcc-4.8.3.new/gcc/ginclude/stddef.h 2013-12-02 20:22:15.936776290 -0500
827 @@ -131,6 +131,7 @@
828 #ifndef __PTRDIFF_T
829 #ifndef _PTRDIFF_T_
830 #ifndef _BSD_PTRDIFF_T_
831 +#ifndef _AROS_TYPES_PTRDIFF_T_H
832 #ifndef ___int_ptrdiff_t_h
833 #ifndef _GCC_PTRDIFF_T
834 #define _PTRDIFF_T
835 @@ -139,6 +140,7 @@
836 #define __PTRDIFF_T
837 #define _PTRDIFF_T_
838 #define _BSD_PTRDIFF_T_
839 +#define _AROS_TYPES_PTRDIFF_T_H
840 #define ___int_ptrdiff_t_h
841 #define _GCC_PTRDIFF_T
842 #ifndef __PTRDIFF_TYPE__
843 @@ -147,6 +149,7 @@
844 typedef __PTRDIFF_TYPE__ ptrdiff_t;
845 #endif /* _GCC_PTRDIFF_T */
846 #endif /* ___int_ptrdiff_t_h */
847 +#endif /* _AROS_TYPES_PTRDIFF_T_H */
848 #endif /* _BSD_PTRDIFF_T_ */
849 #endif /* _PTRDIFF_T_ */
850 #endif /* __PTRDIFF_T */
851 @@ -173,6 +176,7 @@
852 #ifndef __SIZE_T
853 #ifndef _SIZE_T_
854 #ifndef _BSD_SIZE_T_
855 +#ifndef _AROS_TYPES_SIZE_T_H
856 #ifndef _SIZE_T_DEFINED_
857 #ifndef _SIZE_T_DEFINED
858 #ifndef _BSD_SIZE_T_DEFINED_ /* Darwin */
859 @@ -190,6 +194,7 @@
860 #define __SIZE_T
861 #define _SIZE_T_
862 #define _BSD_SIZE_T_
863 +#define _AROS_TYPES_SIZE_T_H
864 #define _SIZE_T_DEFINED_
865 #define _SIZE_T_DEFINED
866 #define _BSD_SIZE_T_DEFINED_ /* Darwin */
867 @@ -222,6 +227,7 @@
868 #endif /* _BSD_SIZE_T_DEFINED_ */
869 #endif /* _SIZE_T_DEFINED */
870 #endif /* _SIZE_T_DEFINED_ */
871 +#endif /* _AROS_TYPES_SIZE_T_H */
872 #endif /* _BSD_SIZE_T_ */
873 #endif /* _SIZE_T_ */
874 #endif /* __SIZE_T */
875 diff -urN gcc-4.8.3/include/filenames.h gcc-4.8.3.new/include/filenames.h
876 --- gcc-4.8.3/include/filenames.h 2011-02-28 13:23:25.000000000 -0500
877 +++ gcc-4.8.3.new/include/filenames.h 2013-12-02 20:22:15.936776290 -0500
878 @@ -42,6 +42,10 @@
879 # define HAS_DRIVE_SPEC(f) HAS_DOS_DRIVE_SPEC (f)
880 # define IS_DIR_SEPARATOR(c) IS_DOS_DIR_SEPARATOR (c)
881 # define IS_ABSOLUTE_PATH(f) IS_DOS_ABSOLUTE_PATH (f)
882 +#elif defined __AROS__
883 +# define IS_DIR_SEPARATOR(c) ((c) == '/' || (c) == ':')
884 +# define IS_ABSOLUTE_PATH(f) (IS_DIR_SEPARATOR((f)[0]) || (strchr((f), ':')))
885 +# define HAVE_CASE_INSENSITIVE_FILE_SYSTEM
886 #else /* not DOSish */
887 # if defined(__APPLE__)
888 # ifndef HAVE_CASE_INSENSITIVE_FILE_SYSTEM
889 diff -urN gcc-4.8.3/libcpp/configure gcc-4.8.3.new/libcpp/configure
890 --- gcc-4.8.3/libcpp/configure 2013-04-12 05:58:00.000000000 -0400
891 +++ gcc-4.8.3.new/libcpp/configure 2013-12-02 20:22:15.940776306 -0500
892 @@ -7155,6 +7155,7 @@
893 arm*-*-*eabi* | \
894 arm*-*-rtems* | \
895 arm*-*-symbianelf* | \
896 + arm*-*-aros | \
897 x86_64-*-* | \
898 ia64-*-* | \
899 hppa*64*-*-* | \
900 diff -urN gcc-4.8.3/libcpp/configure.ac gcc-4.8.3.new/libcpp/configure.ac
901 --- gcc-4.8.3/libcpp/configure.ac 2013-04-03 11:45:53.000000000 -0400
902 +++ gcc-4.8.3.new/libcpp/configure.ac 2013-12-02 20:22:15.940776306 -0500
903 @@ -187,6 +187,7 @@
904 arm*-*-*eabi* | \
905 arm*-*-rtems* | \
906 arm*-*-symbianelf* | \
907 + arm*-*-aros | \
908 x86_64-*-* | \
909 ia64-*-* | \
910 hppa*64*-*-* | \
911 diff -urN gcc-4.8.3/libgcc/config.host gcc-4.8.3.new/libgcc/config.host
912 --- gcc-4.8.3/libgcc/config.host 2011-11-23 17:15:54.000000000 -0500
913 +++ gcc-4.8.3.new/libgcc/config.host 2013-12-02 20:22:15.940776306 -0500
914 @@ -1117,6 +1117,9 @@
915 tmake_file="mep/t-mep t-fdpbit"
916 extra_parts="crtbegin.o crtend.o"
918 +*-*-aros*)
919 + tmake_file=
920 + ;;
922 echo "*** Configuration ${host} not supported" 1>&2
923 exit 1
924 diff -urN gcc-4.8.3/libiberty/filename_cmp.c gcc-4.8.3.new/libiberty/filename_cmp.c
925 --- gcc-4.8.3/libiberty/filename_cmp.c 2011-02-28 13:23:25.000000000 -0500
926 +++ gcc-4.8.3.new/libiberty/filename_cmp.c 2013-12-02 20:22:15.940776306 -0500
927 @@ -50,9 +50,12 @@
929 filename_cmp (const char *s1, const char *s2)
931 -#if !defined(HAVE_DOS_BASED_FILE_SYSTEM) \
932 - && !defined(HAVE_CASE_INSENSITIVE_FILE_SYSTEM)
933 +#if !defined(HAVE_DOS_BASED_FILE_SYSTEM)
934 +#if defined(HAVE_CASE_INSENSITIVE_FILE_SYSTEM)
935 + return strcasecmp(s1, s2);
936 +#else
937 return strcmp(s1, s2);
938 +#endif
939 #else
940 for (;;)
942 diff -urN gcc-4.8.3/libobjc/configure gcc-4.8.3.new/libobjc/configure
943 --- gcc-4.8.3/libobjc/configure 2011-11-20 16:24:07.000000000 -0500
944 +++ gcc-4.8.3.new/libobjc/configure 2013-12-02 20:22:15.944776326 -0500
945 @@ -11256,214 +11256,7 @@
946 # -----------
948 # Check if we have thread-local storage
951 - # Check whether --enable-tls was given.
952 -if test "${enable_tls+set}" = set; then :
953 - enableval=$enable_tls;
954 - case "$enableval" in
955 - yes|no) ;;
956 - *) as_fn_error "Argument to enable/disable tls must be yes or no" "$LINENO" 5 ;;
957 - esac
959 -else
960 - enable_tls=yes
964 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the target supports thread-local storage" >&5
965 -$as_echo_n "checking whether the target supports thread-local storage... " >&6; }
966 -if test "${gcc_cv_have_tls+set}" = set; then :
967 - $as_echo_n "(cached) " >&6
968 -else
970 - if test "$cross_compiling" = yes; then :
971 - if test x$gcc_no_link = xyes; then
972 - as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
974 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
975 -/* end confdefs.h. */
976 -__thread int a; int b; int main() { return a = b; }
977 -_ACEOF
978 -if ac_fn_c_try_link "$LINENO"; then :
979 - chktls_save_LDFLAGS="$LDFLAGS"
980 - case $host in
981 - *-*-linux*)
982 - LDFLAGS="-shared -Wl,--no-undefined $LDFLAGS"
983 - ;;
984 - esac
985 - chktls_save_CFLAGS="$CFLAGS"
986 - CFLAGS="-fPIC $CFLAGS"
987 - if test x$gcc_no_link = xyes; then
988 - as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
990 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
991 -/* end confdefs.h. */
992 -int f() { return 0; }
993 -_ACEOF
994 -if ac_fn_c_try_link "$LINENO"; then :
995 - if test x$gcc_no_link = xyes; then
996 - as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
998 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
999 -/* end confdefs.h. */
1000 -__thread int a; int b; int f() { return a = b; }
1001 -_ACEOF
1002 -if ac_fn_c_try_link "$LINENO"; then :
1003 - gcc_cv_have_tls=yes
1004 -else
1005 - gcc_cv_have_tls=no
1007 -rm -f core conftest.err conftest.$ac_objext \
1008 - conftest$ac_exeext conftest.$ac_ext
1009 -else
1010 - gcc_cv_have_tls=yes
1012 -rm -f core conftest.err conftest.$ac_objext \
1013 - conftest$ac_exeext conftest.$ac_ext
1014 - CFLAGS="$chktls_save_CFLAGS"
1015 - LDFLAGS="$chktls_save_LDFLAGS"
1016 -else
1017 - gcc_cv_have_tls=no
1019 -rm -f core conftest.err conftest.$ac_objext \
1020 - conftest$ac_exeext conftest.$ac_ext
1023 -else
1024 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1025 -/* end confdefs.h. */
1026 -__thread int a; int b; int main() { return a = b; }
1027 -_ACEOF
1028 -if ac_fn_c_try_run "$LINENO"; then :
1029 - chktls_save_LDFLAGS="$LDFLAGS"
1030 - LDFLAGS="-static $LDFLAGS"
1031 - if test x$gcc_no_link = xyes; then
1032 - as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
1034 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1035 -/* end confdefs.h. */
1036 -int main() { return 0; }
1037 -_ACEOF
1038 -if ac_fn_c_try_link "$LINENO"; then :
1039 - if test "$cross_compiling" = yes; then :
1040 - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
1041 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1042 -as_fn_error "cannot run test program while cross compiling
1043 -See \`config.log' for more details." "$LINENO" 5; }
1044 -else
1045 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1046 -/* end confdefs.h. */
1047 -__thread int a; int b; int main() { return a = b; }
1048 -_ACEOF
1049 -if ac_fn_c_try_run "$LINENO"; then :
1050 - gcc_cv_have_tls=yes
1051 -else
1052 - gcc_cv_have_tls=no
1054 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
1055 - conftest.$ac_objext conftest.beam conftest.$ac_ext
1058 -else
1059 - gcc_cv_have_tls=yes
1061 -rm -f core conftest.err conftest.$ac_objext \
1062 - conftest$ac_exeext conftest.$ac_ext
1063 - LDFLAGS="$chktls_save_LDFLAGS"
1064 - if test $gcc_cv_have_tls = yes; then
1065 - chktls_save_CFLAGS="$CFLAGS"
1066 - thread_CFLAGS=failed
1067 - for flag in '' '-pthread' '-lpthread'; do
1068 - CFLAGS="$flag $chktls_save_CFLAGS"
1069 - if test x$gcc_no_link = xyes; then
1070 - as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
1072 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1073 -/* end confdefs.h. */
1074 -#include <pthread.h>
1075 - void *g(void *d) { return NULL; }
1076 -int
1077 -main ()
1079 -pthread_t t; pthread_create(&t,NULL,g,NULL);
1081 - return 0;
1083 -_ACEOF
1084 -if ac_fn_c_try_link "$LINENO"; then :
1085 - thread_CFLAGS="$flag"
1087 -rm -f core conftest.err conftest.$ac_objext \
1088 - conftest$ac_exeext conftest.$ac_ext
1089 - if test "X$thread_CFLAGS" != Xfailed; then
1090 - break
1091 - fi
1092 - done
1093 - CFLAGS="$chktls_save_CFLAGS"
1094 - if test "X$thread_CFLAGS" != Xfailed; then
1095 - CFLAGS="$thread_CFLAGS $chktls_save_CFLAGS"
1096 - if test "$cross_compiling" = yes; then :
1097 - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
1098 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1099 -as_fn_error "cannot run test program while cross compiling
1100 -See \`config.log' for more details." "$LINENO" 5; }
1101 -else
1102 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1103 -/* end confdefs.h. */
1104 -#include <pthread.h>
1105 - __thread int a;
1106 - static int *volatile a_in_other_thread;
1107 - static void *
1108 - thread_func (void *arg)
1110 - a_in_other_thread = &a;
1111 - return (void *)0;
1113 -int
1114 -main ()
1116 -pthread_t thread;
1117 - void *thread_retval;
1118 - int *volatile a_in_main_thread;
1119 - a_in_main_thread = &a;
1120 - if (pthread_create (&thread, (pthread_attr_t *)0,
1121 - thread_func, (void *)0))
1122 - return 0;
1123 - if (pthread_join (thread, &thread_retval))
1124 - return 0;
1125 - return (a_in_other_thread == a_in_main_thread);
1127 - return 0;
1129 -_ACEOF
1130 -if ac_fn_c_try_run "$LINENO"; then :
1131 - gcc_cv_have_tls=yes
1132 -else
1133 - gcc_cv_have_tls=no
1135 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
1136 - conftest.$ac_objext conftest.beam conftest.$ac_ext
1139 - CFLAGS="$chktls_save_CFLAGS"
1140 - fi
1141 - fi
1142 -else
1143 - gcc_cv_have_tls=no
1145 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
1146 - conftest.$ac_objext conftest.beam conftest.$ac_ext
1150 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_have_tls" >&5
1151 -$as_echo "$gcc_cv_have_tls" >&6; }
1152 - if test "$enable_tls $gcc_cv_have_tls" = "yes yes"; then
1154 -$as_echo "#define HAVE_TLS 1" >>confdefs.h
1156 - fi
1157 +#dnl GCC_ENABLE_TLS
1159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for exception model to use" >&5
1160 $as_echo_n "checking for exception model to use... " >&6; }
1161 diff -urN gcc-4.8.3/libobjc/configure.ac gcc-4.8.3.new/libobjc/configure.ac
1162 --- gcc-4.8.3/libobjc/configure.ac 2010-12-05 19:50:04.000000000 -0500
1163 +++ gcc-4.8.3.new/libobjc/configure.ac 2013-12-02 20:22:15.944776326 -0500
1164 @@ -210,7 +210,7 @@
1165 # -----------
1167 # Check if we have thread-local storage
1168 -GCC_CHECK_TLS
1169 +dnl GCC_CHECK_TLS
1171 AC_MSG_CHECKING([for exception model to use])
1172 AC_LANG_PUSH(C)
1173 diff -urN gcc-4.8.3/libstdc++-v3/config/os/aros/ctype_base.h gcc-4.8.3.new/libstdc++-v3/config/os/aros/ctype_base.h
1174 --- gcc-4.8.3/libstdc++-v3/config/os/aros/ctype_base.h 1969-12-31 19:00:00.000000000 -0500
1175 +++ gcc-4.8.3.new/libstdc++-v3/config/os/aros/ctype_base.h 2013-12-02 20:22:15.944776326 -0500
1176 @@ -0,0 +1,27 @@
1177 +namespace std _GLIBCXX_VISIBILITY(default)
1179 +_GLIBCXX_BEGIN_NAMESPACE_VERSION
1181 +struct ctype_base {
1182 + /* Non-standard typedefs */
1183 + typedef int * __to_type;
1185 + /* NB: Offsets into ctype<char>::_M_table force a particular size
1186 + on the mask type. Because of this, we don't use an enum. */
1187 + typedef unsigned short int mask;
1189 + static const mask upper = _ISupper;
1190 + static const mask lower = _ISlower;
1191 + static const mask alpha = _ISalpha;
1192 + static const mask digit = _ISdigit;
1193 + static const mask xdigit = _ISxdigit;
1194 + static const mask space = _ISspace;
1195 + static const mask print = _ISprint;
1196 + static const mask graph = _ISgraph;
1197 + static const mask cntrl = _IScntrl;
1198 + static const mask punct = _ISpunct;
1199 + static const mask alnum = _ISalnum;
1202 +_GLIBCXX_END_NAMESPACE_VERSION
1203 +} // namespace
1204 diff -ruN gcc-4.8.3/libstdc++-v3/config/os/aros/ctype_configure_char.cc gcc-4.8.3.aros/libstdc++-v3/config/os/aros/ctype_configure_char.cc
1205 --- gcc-4.8.3/libstdc++-v3/config/os/aros/ctype_configure_char.cc 1970-01-01 01:00:00.000000000 +0100
1206 +++ gcc-4.8.3.aros/libstdc++-v3/config/os/aros/ctype_configure_char.cc 2013-02-03 17:54:05.000000000 +0000
1207 @@ -0,0 +1,99 @@
1208 +// Locale support -*- C++ -*-
1210 +// Copyright (C) 2011-2013 Free Software Foundation, Inc.
1212 +// This file is part of the GNU ISO C++ Library. This library is free
1213 +// software; you can redistribute it and/or modify it under the
1214 +// terms of the GNU General Public License as published by the
1215 +// Free Software Foundation; either version 3, or (at your option)
1216 +// any later version.
1218 +// This library is distributed in the hope that it will be useful,
1219 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
1220 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1221 +// GNU General Public License for more details.
1223 +// Under Section 7 of GPL version 3, you are granted additional
1224 +// permissions described in the GCC Runtime Library Exception, version
1225 +// 3.1, as published by the Free Software Foundation.
1227 +// You should have received a copy of the GNU General Public License and
1228 +// a copy of the GCC Runtime Library Exception along with this program;
1229 +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
1230 +// <http://www.gnu.org/licenses/>.
1232 +/** @file ctype_configure_char.cc */
1235 +// ISO C++ 14882: 22.1 Locales
1238 +#include <locale>
1239 +#include <cstdlib>
1240 +#include <cstring>
1242 +namespace std _GLIBCXX_VISIBILITY(default)
1244 +_GLIBCXX_BEGIN_NAMESPACE_VERSION
1246 +// Information as gleaned from /usr/include/ctype.h
1248 + const ctype_base::mask*
1249 + ctype<char>::classic_table() throw()
1250 + { return 0; }
1252 + ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
1253 + size_t __refs)
1254 + : facet(__refs), _M_del(__table != 0 && __del),
1255 + _M_toupper(NULL), _M_tolower(NULL),
1256 + _M_table(__table ? __table : classic_table())
1257 + {
1258 + memset(_M_widen, 0, sizeof(_M_widen));
1259 + _M_widen_ok = 0;
1260 + memset(_M_narrow, 0, sizeof(_M_narrow));
1261 + _M_narrow_ok = 0;
1264 + ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
1265 + : facet(__refs), _M_del(__table != 0 && __del),
1266 + _M_toupper(NULL), _M_tolower(NULL),
1267 + _M_table(__table ? __table : classic_table())
1268 + {
1269 + memset(_M_widen, 0, sizeof(_M_widen));
1270 + _M_widen_ok = 0;
1271 + memset(_M_narrow, 0, sizeof(_M_narrow));
1272 + _M_narrow_ok = 0;
1275 + char
1276 + ctype<char>::do_toupper(char __c) const
1277 + { return ::toupper((int) __c); }
1279 + const char*
1280 + ctype<char>::do_toupper(char* __low, const char* __high) const
1282 + while (__low < __high)
1284 + *__low = ::toupper((int) *__low);
1285 + ++__low;
1287 + return __high;
1290 + char
1291 + ctype<char>::do_tolower(char __c) const
1292 + { return ::tolower((int) __c); }
1294 + const char*
1295 + ctype<char>::do_tolower(char* __low, const char* __high) const
1297 + while (__low < __high)
1299 + *__low = ::tolower((int) *__low);
1300 + ++__low;
1302 + return __high;
1305 +_GLIBCXX_END_NAMESPACE_VERSION
1306 +} // namespace
1307 diff -urN gcc-4.8.3/libstdc++-v3/config/os/aros/ctype_inline.h gcc-4.8.3.new/libstdc++-v3/config/os/aros/ctype_inline.h
1308 --- gcc-4.8.3/libstdc++-v3/config/os/aros/ctype_inline.h 1969-12-31 19:00:00.000000000 -0500
1309 +++ gcc-4.8.3.new/libstdc++-v3/config/os/aros/ctype_inline.h 2013-12-02 20:22:15.944776326 -0500
1310 @@ -0,0 +1,173 @@
1311 +// Locale support -*- C++ -*-
1313 +// Copyright (C) 2000, 2003 Free Software Foundation, Inc.
1315 +// This file is part of the GNU ISO C++ Library. This library is free
1316 +// software; you can redistribute it and/or modify it under the
1317 +// terms of the GNU General Public License as published by the
1318 +// Free Software Foundation; either version 2, or (at your option)
1319 +// any later version.
1321 +// This library is distributed in the hope that it will be useful,
1322 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
1323 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1324 +// GNU General Public License for more details.
1326 +// You should have received a copy of the GNU General Public License along
1327 +// with this library; see the file COPYING. If not, write to the Free
1328 +// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
1329 +// USA.
1331 +// As a special exception, you may use this file as part of a free software
1332 +// library without restriction. Specifically, if other files instantiate
1333 +// templates or use macros or inline functions from this file, or you compile
1334 +// this file and link it with other files to produce an executable, this
1335 +// file does not by itself cause the resulting executable to be covered by
1336 +// the GNU General Public License. This exception does not however
1337 +// invalidate any other reasons why the executable file might be covered by
1338 +// the GNU General Public License.
1340 +/** @file ctype_inline.h
1341 + * This is an internal header file, included by other library headers.
1342 + * You should not attempt to use it directly.
1343 + */
1346 +// ISO C++ 14882: 22.1 Locales
1349 +// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*)
1350 +// functions go in ctype.cc
1352 +// The following definitions are portable, but insanely slow. If one
1353 +// cares at all about performance, then specialized ctype
1354 +// functionality should be added for the native os in question: see
1355 +// the config/os/bits/ctype_*.h files.
1357 +// Constructing a synthetic "C" table should be seriously considered...
1359 +namespace std _GLIBCXX_VISIBILITY(default)
1361 +_GLIBCXX_BEGIN_NAMESPACE_VERSION
1363 + bool
1364 + ctype<char>::
1365 + is(mask __m, char __c) const
1366 + {
1367 + if (_M_table)
1368 + return _M_table[static_cast<unsigned char>(__c)] & __m;
1369 + else
1371 + bool __ret = false;
1372 + const size_t __bitmasksize = 15;
1373 + size_t __bitcur = 0; // Lowest bitmask in ctype_base == 0
1374 + for (; __bitcur <= __bitmasksize; ++__bitcur)
1376 + const mask __bit = static_cast<mask>(1 << __bitcur);
1377 + if (__m & __bit)
1379 + bool __testis;
1380 + switch (__bit)
1382 + case space:
1383 + __testis = isspace(__c);
1384 + break;
1385 + case print:
1386 + __testis = isprint(__c);
1387 + break;
1388 + case cntrl:
1389 + __testis = iscntrl(__c);
1390 + break;
1391 + case upper:
1392 + __testis = isupper(__c);
1393 + break;
1394 + case lower:
1395 + __testis = islower(__c);
1396 + break;
1397 + case alpha:
1398 + __testis = isalpha(__c);
1399 + break;
1400 + case digit:
1401 + __testis = isdigit(__c);
1402 + break;
1403 + case punct:
1404 + __testis = ispunct(__c);
1405 + break;
1406 + case xdigit:
1407 + __testis = isxdigit(__c);
1408 + break;
1409 + case alnum:
1410 + __testis = isalnum(__c);
1411 + break;
1412 + case graph:
1413 + __testis = isgraph(__c);
1414 + break;
1415 + default:
1416 + __testis = false;
1417 + break;
1419 + __ret |= __testis;
1422 + return __ret;
1426 + const char*
1427 + ctype<char>::
1428 + is(const char* __low, const char* __high, mask* __vec) const
1430 + if (_M_table)
1431 + while (__low < __high)
1432 + *__vec++ = _M_table[static_cast<unsigned char>(*__low++)];
1433 + else
1435 + // Highest bitmask in ctype_base == 10.
1436 + const size_t __bitmasksize = 15;
1437 + for (;__low < __high; ++__vec, ++__low)
1439 + mask __m = 0;
1440 + // Lowest bitmask in ctype_base == 0
1441 + size_t __i = 0;
1442 + for (;__i <= __bitmasksize; ++__i)
1444 + const mask __bit = static_cast<mask>(1 << __i);
1445 + if (this->is(__bit, *__low))
1446 + __m |= __bit;
1448 + *__vec = __m;
1451 + return __high;
1454 + const char*
1455 + ctype<char>::
1456 + scan_is(mask __m, const char* __low, const char* __high) const
1458 + if (_M_table)
1459 + while (__low < __high
1460 + && !(_M_table[static_cast<unsigned char>(*__low)] & __m))
1461 + ++__low;
1462 + else
1463 + while (__low < __high && !this->is(__m, *__low))
1464 + ++__low;
1465 + return __low;
1468 + const char*
1469 + ctype<char>::
1470 + scan_not(mask __m, const char* __low, const char* __high) const
1472 + if (_M_table)
1473 + while (__low < __high
1474 + && (_M_table[static_cast<unsigned char>(*__low)] & __m) != 0)
1475 + ++__low;
1476 + else
1477 + while (__low < __high && this->is(__m, *__low) != 0)
1478 + ++__low;
1479 + return __low;
1482 +_GLIBCXX_END_NAMESPACE_VERSION
1483 +} // namespace
1484 diff -urN gcc-4.8.3/libstdc++-v3/config/os/aros/ctype_noninline.h gcc-4.8.3.new/libstdc++-v3/config/os/aros/ctype_noninline.h
1485 --- gcc-4.8.3/libstdc++-v3/config/os/aros/ctype_noninline.h 1969-12-31 19:00:00.000000000 -0500
1486 +++ gcc-4.8.3.new/libstdc++-v3/config/os/aros/ctype_noninline.h 2013-12-02 20:22:15.944776326 -0500
1487 @@ -0,0 +1,56 @@
1488 + const ctype_base::mask*
1489 + ctype<char>::classic_table() throw()
1490 + { return *__ctype_b_ptr; }
1492 + ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
1493 + size_t __refs)
1494 + : facet(__refs), _M_del(__table != 0 && __del),
1495 + _M_toupper(NULL), _M_tolower(NULL),
1496 + _M_table(__table ? __table : classic_table())
1497 + {
1498 + memset(_M_widen, 0, sizeof(_M_widen));
1499 + _M_widen_ok = 0;
1500 + memset(_M_narrow, 0, sizeof(_M_narrow));
1501 + _M_narrow_ok = 0;
1504 + ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
1505 + : facet(__refs), _M_del(__table != 0 && __del),
1506 + _M_toupper(NULL), _M_tolower(NULL),
1507 + _M_table(__table ? __table : classic_table())
1508 + {
1509 + memset(_M_widen, 0, sizeof(_M_widen));
1510 + _M_widen_ok = 0;
1511 + memset(_M_narrow, 0, sizeof(_M_narrow));
1512 + _M_narrow_ok = 0;
1515 + char
1516 + ctype<char>::do_toupper(char __c) const
1517 + { return ::toupper((int) __c); }
1519 + const char*
1520 + ctype<char>::do_toupper(char* __low, const char* __high) const
1522 + while (__low < __high)
1524 + *__low = ::toupper((int) *__low);
1525 + ++__low;
1527 + return __high;
1530 + char
1531 + ctype<char>::do_tolower(char __c) const
1532 + { return ::tolower((int) __c); }
1534 + const char*
1535 + ctype<char>::do_tolower(char* __low, const char* __high) const
1537 + while (__low < __high)
1539 + *__low = ::tolower((int) *__low);
1540 + ++__low;
1542 + return __high;
1544 diff -urN gcc-4.8.3/libstdc++-v3/config/os/aros/os_defines.h gcc-4.8.3.new/libstdc++-v3/config/os/aros/os_defines.h
1545 --- gcc-4.8.3/libstdc++-v3/config/os/aros/os_defines.h 1969-12-31 19:00:00.000000000 -0500
1546 +++ gcc-4.8.3.new/libstdc++-v3/config/os/aros/os_defines.h 2013-12-02 20:22:15.944776326 -0500
1547 @@ -0,0 +1,6 @@
1548 +#ifndef _GLIBCXX_OS_DEFINES
1549 +#define _GLIBCXX_OS_DEFINES
1551 +#define __off64_t off_t
1553 +#endif
1554 diff -urN gcc-4.8.3/libstdc++-v3/configure gcc-4.8.3.new/libstdc++-v3/configure
1555 --- gcc-4.8.3/libstdc++-v3/configure 2012-07-22 12:46:02.000000000 -0400
1556 +++ gcc-4.8.3.new/libstdc++-v3/configure 2013-12-02 20:22:15.956776384 -0500
1557 @@ -5288,12 +5288,12 @@
1560 # Libtool setup.
1561 -if test "x${with_newlib}" != "xyes"; then
1562 - enable_dlopen=yes
1567 +#if test "x${with_newlib}" != "xyes"; then
1568 +# AC_LIBTOOL_DLOPEN
1572 +#fi
1573 case `pwd` in
1574 *\ * | *\ *)
1575 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
1576 @@ -8024,6 +8024,8 @@
1580 + enable_dlopen=no
1583 enable_win32_dll=no
1585 @@ -18572,6 +18574,7 @@
1587 struct iovec iov[2];
1588 writev(0, iov, 0);
1589 +#error be sure to fail
1591 return 0;
1593 @@ -18594,6 +18597,7 @@
1595 struct iovec iov[2];
1596 writev(0, iov, 0);
1597 +#error be sure to fail
1599 return 0;
1601 @@ -27615,6 +27619,58 @@
1603 # Base decisions on target environment.
1604 case "${host}" in
1605 + *-aros*)
1606 + for ac_header in nan.h ieeefp.h endian.h sys/isa_defs.h machine/endian.h \
1607 + machine/param.h sys/machine.h sys/types.h fp.h locale.h float.h inttypes.h
1608 +do :
1609 + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
1610 +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
1611 +eval as_val=\$$as_ac_Header
1612 + if test "x$as_val" = x""yes; then :
1613 + cat >>confdefs.h <<_ACEOF
1614 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
1615 +_ACEOF
1619 +done
1622 + GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
1623 + GLIBCXX_CHECK_WCHAR_T_SUPPORT
1625 + $as_echo "#define HAVE_FINITE 1" >>confdefs.h
1627 + $as_echo "#define HAVE_FINITEF 1" >>confdefs.h
1629 + $as_echo "#define HAVE_FREXPF 1" >>confdefs.h
1631 + $as_echo "#define HAVE_HYPOTF 1" >>confdefs.h
1633 + $as_echo "#define HAVE_ISINF 1" >>confdefs.h
1635 + $as_echo "#define HAVE_ISINFF 1" >>confdefs.h
1637 + $as_echo "#define HAVE_ISNAN 1" >>confdefs.h
1639 + $as_echo "#define HAVE_ISNANF 1" >>confdefs.h
1641 + $as_echo "#define HAVE_SINCOS 1" >>confdefs.h
1643 + $as_echo "#define HAVE_SINCOSF 1" >>confdefs.h
1645 + if test x"long_double_math_on_this_cpu" = x"yes"; then
1646 + $as_echo "#define HAVE_FINITEL 1" >>confdefs.h
1648 + $as_echo "#define HAVE_HYPOTL 1" >>confdefs.h
1650 + $as_echo "#define HAVE_ISINFL 1" >>confdefs.h
1652 + $as_echo "#define HAVE_ISNANL 1" >>confdefs.h
1654 + fi
1655 + ;;
1657 arm*-*-symbianelf*)
1658 # This is a freestanding configuration; there is nothing to do here.
1660 diff -urN gcc-4.8.3/libstdc++-v3/configure.ac gcc-4.8.3.new/libstdc++-v3/configure.ac
1661 --- gcc-4.8.3/libstdc++-v3/configure.ac 2012-07-22 12:46:02.000000000 -0400
1662 +++ gcc-4.8.3.new/libstdc++-v3/configure.ac 2013-12-02 20:22:15.956776384 -0500
1663 @@ -89,9 +89,9 @@
1664 GLIBCXX_CONFIGURE
1666 # Libtool setup.
1667 -if test "x${with_newlib}" != "xyes"; then
1668 - AC_LIBTOOL_DLOPEN
1670 +#if test "x${with_newlib}" != "xyes"; then
1671 +# AC_LIBTOOL_DLOPEN
1672 +#fi
1673 AM_PROG_LIBTOOL
1674 ACX_LT_HOST_FLAGS
1675 AC_SUBST(enable_shared)
1676 diff -urN gcc-4.8.3/libstdc++-v3/configure.host gcc-4.8.3.new/libstdc++-v3/configure.host
1677 --- gcc-4.8.3/libstdc++-v3/configure.host 2010-12-05 19:50:04.000000000 -0500
1678 +++ gcc-4.8.3.new/libstdc++-v3/configure.host 2013-12-02 20:22:15.956776384 -0500
1679 @@ -230,6 +230,9 @@
1680 os_include_dir="os/generic"
1681 atomicity_dir="cpu/generic"
1683 + aros*)
1684 + os_include_dir="os/aros"
1685 + ;;
1686 bsd*)
1687 # Plain BSD attempts to share FreeBSD files.
1688 os_include_dir="os/bsd/freebsd"
1689 diff -urN gcc-4.8.3/libstdc++-v3/crossconfig.m4 gcc-4.8.3.new/libstdc++-v3/crossconfig.m4
1690 --- gcc-4.8.3/libstdc++-v3/crossconfig.m4 2011-02-04 02:26:57.000000000 -0500
1691 +++ gcc-4.8.3.new/libstdc++-v3/crossconfig.m4 2013-12-02 20:22:15.956776384 -0500
1692 @@ -5,6 +5,31 @@
1693 AC_DEFUN([GLIBCXX_CROSSCONFIG],[
1694 # Base decisions on target environment.
1695 case "${host}" in
1696 + *-aros*)
1697 + AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h machine/endian.h \
1698 + machine/param.h sys/machine.h sys/types.h fp.h locale.h float.h inttypes.h])
1700 + GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
1701 + GLIBCXX_CHECK_WCHAR_T_SUPPORT
1703 + AC_DEFINE(HAVE_FINITE)
1704 + AC_DEFINE(HAVE_FINITEF)
1705 + AC_DEFINE(HAVE_FREXPF)
1706 + AC_DEFINE(HAVE_HYPOTF)
1707 + AC_DEFINE(HAVE_ISINF)
1708 + AC_DEFINE(HAVE_ISINFF)
1709 + AC_DEFINE(HAVE_ISNAN)
1710 + AC_DEFINE(HAVE_ISNANF)
1711 + AC_DEFINE(HAVE_SINCOS)
1712 + AC_DEFINE(HAVE_SINCOSF)
1713 + if test x"long_double_math_on_this_cpu" = x"yes"; then
1714 + AC_DEFINE(HAVE_FINITEL)
1715 + AC_DEFINE(HAVE_HYPOTL)
1716 + AC_DEFINE(HAVE_ISINFL)
1717 + AC_DEFINE(HAVE_ISNANL)
1718 + fi
1719 + ;;
1721 arm*-*-symbianelf*)
1722 # This is a freestanding configuration; there is nothing to do here.