adjust inbuilt specs used by cross tool chain to better match those used by the gener...
[AROS.git] / tools / crosstools / gcc-4.6.4-aros.diff
blob8914ddeb2b90b2f6f263a7279200f8c70d9d39ac
1 diff -urN gcc-4.6.4/configure gcc-4.6.4.new/configure
2 --- gcc-4.6.4/configure 2011-12-18 05:03:44.000000000 -0500
3 +++ gcc-4.6.4.new/configure 2013-12-02 20:22:15.904776124 -0500
4 @@ -2997,6 +2997,9 @@
5 ppc*-*-pe)
6 noconfigdirs="$noconfigdirs patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl gnuserv"
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 tk itcl libgui gdb dejagnu readline"
14 @@ -3810,6 +3813,8 @@
15 # Build the stage2 and stage3 compilers with -fomit-frame-pointer.
16 host_makefile_frag="config/mh-x86omitfp"
18 + *-*-aros*)
19 + ;;
20 esac
23 diff -urN gcc-4.6.4/configure.ac gcc-4.6.4.new/configure.ac
24 --- gcc-4.6.4/configure.ac 2011-11-18 06:45:44.000000000 -0500
25 +++ gcc-4.6.4.new/configure.ac 2013-12-02 20:22:15.904776124 -0500
26 @@ -453,6 +453,9 @@
27 ppc*-*-pe)
28 noconfigdirs="$noconfigdirs patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl gnuserv"
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 tk itcl libgui gdb dejagnu readline"
36 @@ -1237,6 +1240,8 @@
37 # Build the stage2 and stage3 compilers with -fomit-frame-pointer.
38 host_makefile_frag="config/mh-x86omitfp"
40 + *-*-aros*)
41 + ;;
42 esac
45 diff -urN gcc-4.6.4/fixincludes/configure gcc-4.6.4.new/fixincludes/configure
46 --- gcc-4.6.4/fixincludes/configure 2010-06-03 02:45:02.000000000 -0400
47 +++ gcc-4.6.4.new/fixincludes/configure 2013-12-02 20:22:15.904776124 -0500
48 @@ -4245,6 +4245,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.6.4/fixincludes/configure.ac gcc-4.6.4.new/fixincludes/configure.ac
57 --- gcc-4.6.4/fixincludes/configure.ac 2010-06-03 02:45:02.000000000 -0400
58 +++ gcc-4.6.4.new/fixincludes/configure.ac 2013-12-02 20:22:15.904776124 -0500
59 @@ -49,6 +49,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.6.4/gcc/config/arm/aros.h gcc-4.6.4.new/gcc/config/arm/aros.h
68 --- gcc-4.6.4/gcc/config/arm/aros.h 1969-12-31 19:00:00.000000000 -0500
69 +++ gcc-4.6.4.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:%{!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.6.4/gcc/config/arm/t-aros gcc-4.6.4.new/gcc/config/arm/t-aros
154 --- gcc-4.6.4/gcc/config/arm/t-aros 1969-12-31 19:00:00.000000000 -0500
155 +++ gcc-4.6.4.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.6.4/gcc/config/arm/unwind-arm.c gcc-4.6.4.new/gcc/config/arm/unwind-arm.c
179 --- gcc-4.6.4/gcc/config/arm/unwind-arm.c 2009-10-30 10:55:10.000000000 -0400
180 +++ gcc-4.6.4.new/gcc/config/arm/unwind-arm.c 2013-12-02 20:22:15.908776146 -0500
181 @@ -40,8 +40,10 @@
182 bool is_reference,
183 void **matched_object);
185 +#if !defined(__AROS__)
186 _Unwind_Ptr __attribute__((weak))
187 __gnu_Unwind_Find_exidx (_Unwind_Ptr, int *);
188 +#endif
190 /* Misc constants. */
191 #define R_IP 12
192 @@ -598,6 +600,7 @@
193 instruction itself. */
194 return_address -= 2;
196 +#if !defined(__AROS__)
197 if (__gnu_Unwind_Find_exidx)
199 eitp = (const __EIT_entry *) __gnu_Unwind_Find_exidx (return_address,
200 @@ -609,6 +612,7 @@
203 else
204 +#endif
206 eitp = &__exidx_start;
207 nrec = &__exidx_end - &__exidx_start;
208 diff -urN gcc-4.6.4/gcc/config/aros.h gcc-4.6.4.new/gcc/config/aros.h
209 --- gcc-4.6.4/gcc/config/aros.h 1969-12-31 19:00:00.000000000 -0500
210 +++ gcc-4.6.4.new/gcc/config/aros.h 2013-12-02 20:22:15.908776146 -0500
211 @@ -0,0 +1,109 @@
212 +/* Definitions for AROS
213 + Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
214 + Contributed by Fabio Alemagna
215 + Based upon linux.h, contributed by Eric Youngdale.
217 +This file is part of GNU CC.
219 +GNU CC is free software; you can redistribute it and/or modify
220 +it under the terms of the GNU General Public License as published by
221 +the Free Software Foundation; either version 2, or (at your option)
222 +any later version.
224 +GNU CC is distributed in the hope that it will be useful,
225 +but WITHOUT ANY WARRANTY; without even the implied warranty of
226 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
227 +GNU General Public License for more details.
229 +You should have received a copy of the GNU General Public License
230 +along with GNU CC; see the file COPYING. If not, write to
231 +the Free Software Foundation, 59 Temple Place - Suite 330,
232 +Boston, MA 02111-1307, USA. */
234 +/* Don't assume anything about the header files. */
235 +#define NO_IMPLICIT_EXTERN_C
237 +#undef SIZE_TYPE
238 +#define SIZE_TYPE "long unsigned int"
240 +#undef WCHAR_TYPE
241 +#define WCHAR_TYPE "char"
243 +#undef WCHAR_TYPE_SIZE
244 +#define WCHAR_TYPE_SIZE 8
246 +#undef PTRDIFF_TYPE
247 +#define PTRDIFF_TYPE "long int"
249 +#undef TARGET_OS_CPP_BUILTINS
250 +#define TARGET_OS_CPP_BUILTINS() \
251 + do \
252 + { \
253 + builtin_define_std ("AROS"); \
254 + builtin_define ("AMIGA"); \
255 + builtin_define ("_AMIGA"); \
256 + builtin_define ("__ELF__"); \
257 + builtin_assert ("system=posix"); \
258 + } \
259 + while (0)
261 +#undef ASM_APP_ON
262 +#define ASM_APP_ON "#APP\n"
264 +#undef ASM_APP_OFF
265 +#define ASM_APP_OFF "#NO_APP\n"
267 +#undef MD_EXEC_PREFIX
268 +#undef MD_STARTFILE_PREFIX
270 +/* Provide a STARTFILE_SPEC appropriate for AROS. AROS has its own
271 + set of startup files which also take care of handling C++
272 + constructors/destructors. */
274 +#undef STARTFILE_SPEC
275 +#define STARTFILE_SPEC \
276 + "startup.o%s %{detach:detach.o%s} %{nix:nixmain.o%s}"
278 +/* Provide a ENDFILE_SPEC appropriate for AROS. */
280 +#undef ENDFILE_SPEC
281 +#define ENDFILE_SPEC \
282 + "-lautoinit"
284 +#undef INCLUDE_DEFAULTS
285 +#define INCLUDE_DEFAULTS \
286 +{ \
287 + { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, 0, 0 }, \
288 + { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, 0, 1 }, \
289 + { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, 0, 0 }, \
290 + { "/local/include", 0, 0, 1, 1, 0 }, \
291 + { "/include", STANDARD_INCLUDE_COMPONENT, 0, 0, 1, 0 }, \
292 + { GCC_INCLUDE_DIR, "GCC", 0, 0, 0, 0 }, \
293 + { 0, 0, 0, 0, 0, 0 } \
294 +}; \
296 +#undef CPP_SPEC
297 +#define CPP_SPEC "%(cc1_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}"
299 +/* This is for -profile to use -lc_p instead of -lc. */
300 +#ifndef CC1_SPEC
301 +#define CC1_SPEC "%{profile:-p}"
302 +#endif
304 +/* The GNU C++ standard library requires that these macros be defined. */
305 +#undef CPLUSPLUS_CPP_SPEC
306 +#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
308 +#undef LIB_SPEC
309 +#define LIB_SPEC \
310 + "-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}"
312 +#if !defined(USE_GNULIBC_1) && defined(HAVE_LD_EH_FRAME_HDR)
313 +#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
314 +#endif
316 +/* AROS uses its own collect-like program for the moment. */
317 +#undef LINKER_NAME
318 +#define LINKER_NAME "collect-aros"
320 +#define TARGET_HAS_F_SETLKW
321 diff -urN gcc-4.6.4/gcc/config/i386/aros64.h gcc-4.6.4.new/gcc/config/i386/aros64.h
322 --- gcc-4.6.4/gcc/config/i386/aros64.h 1969-12-31 19:00:00.000000000 -0500
323 +++ gcc-4.6.4.new/gcc/config/i386/aros64.h 2013-12-02 20:22:15.908776146 -0500
324 @@ -0,0 +1,40 @@
325 +/* Definitions for AMD x86_64 running AROS systems with ELF64 format.
326 + Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002
327 + Free Software Foundation, Inc.
328 + Contributed by Stanislaw Szymczyk <sszymczy@gmail.com>. Based on aros.h.
330 +This file is part of GNU CC.
332 +GNU CC is free software; you can redistribute it and/or modify
333 +it under the terms of the GNU General Public License as published by
334 +the Free Software Foundation; either version 2, or (at your option)
335 +any later version.
337 +GNU CC is distributed in the hope that it will be useful,
338 +but WITHOUT ANY WARRANTY; without even the implied warranty of
339 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
340 +GNU General Public License for more details.
342 +You should have received a copy of the GNU General Public License
343 +along with GNU CC; see the file COPYING. If not, write to
344 +the Free Software Foundation, 59 Temple Place - Suite 330,
345 +Boston, MA 02111-1307, USA. */
347 +/* Output at beginning of assembler file. */
348 +/* The .file command should always begin the output. */
350 +#undef TARGET_VERSION
351 +#define TARGET_VERSION fprintf (stderr, " (x86_64 AROS/ELF)");
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 -urN gcc-4.6.4/gcc/config/i386/aros.h gcc-4.6.4.new/gcc/config/i386/aros.h
366 --- gcc-4.6.4/gcc/config/i386/aros.h 1969-12-31 19:00:00.000000000 -0500
367 +++ gcc-4.6.4.new/gcc/config/i386/aros.h 2013-12-02 20:22:15.908776146 -0500
368 @@ -0,0 +1,28 @@
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 TARGET_VERSION
393 +#define TARGET_VERSION fprintf (stderr, " (i386 AROS/ELF)");
395 +#undef LINK_SPEC
396 +#define LINK_SPEC "-m elf_i386 -L%R/lib"
397 diff -urN gcc-4.6.4/gcc/config/m68k/m68k.c gcc-4.6.4.new/gcc/config/m68k/m68k.c
398 --- gcc-4.6.4/gcc/config/m68k/m68k.c 2011-07-31 11:09:25.000000000 -0400
399 +++ gcc-4.6.4.new/gcc/config/m68k/m68k.c 2013-12-02 20:22:15.908776146 -0500
400 @@ -4522,7 +4522,7 @@
401 else if (letter == '/')
402 asm_fprintf (file, "%R");
403 else if (letter == '?')
404 - asm_fprintf (file, m68k_library_id_string);
405 + asm_fprintf (file, "%s", m68k_library_id_string);
406 else if (letter == 'p')
408 output_addr_const (file, op);
409 diff -urN gcc-4.6.4/gcc/config/m68k/m68k.h gcc-4.6.4.new/gcc/config/m68k/m68k.h
410 --- gcc-4.6.4/gcc/config/m68k/m68k.h 2010-11-21 20:57:50.000000000 -0500
411 +++ gcc-4.6.4.new/gcc/config/m68k/m68k.h 2013-12-02 20:22:15.908776146 -0500
412 @@ -342,7 +342,9 @@
413 register elimination. */
414 #define FIRST_PSEUDO_REGISTER 25
416 -/* All m68k targets (except AmigaOS) use %a5 as the PIC register */
417 +/* All m68k targets (except AmigaOS) use %a5 as the PIC register.
418 + * On AmigaOS, we use %a4
419 + */
420 #define PIC_OFFSET_TABLE_REGNUM \
421 (!flag_pic ? INVALID_REGNUM \
422 : reload_completed ? REGNO (pic_offset_table_rtx) \
423 @@ -432,7 +434,8 @@
424 /* Most m68k targets use %a6 as a frame pointer. The AmigaOS
425 ABI uses %a6 for shared library calls, therefore the frame
426 pointer is shifted to %a5 on this target. */
427 -#define FRAME_POINTER_REGNUM A6_REG
428 +#define FRAME_POINTER_REGNUM A5_REG
429 +#define PIC_REG A4_REG
431 /* Base register for access to arguments of the function.
432 * This isn't a hardware register. It will be eliminated to the
433 diff -urN gcc-4.6.4/gcc/config/m68k/m68k.md gcc-4.6.4.new/gcc/config/m68k/m68k.md
434 --- gcc-4.6.4/gcc/config/m68k/m68k.md 2009-12-30 18:03:46.000000000 -0500
435 +++ gcc-4.6.4.new/gcc/config/m68k/m68k.md 2013-12-02 20:22:15.912776170 -0500
436 @@ -131,7 +131,8 @@
437 [(D0_REG 0)
438 (A0_REG 8)
439 (A1_REG 9)
440 - (PIC_REG 13)
441 + (A4_REG 12)
442 + (A5_REG 13)
443 (A6_REG 14)
444 (SP_REG 15)
445 (FP0_REG 16)
446 @@ -7295,7 +7296,7 @@
448 if (TARGET_ID_SHARED_LIBRARY)
450 - operands[1] = gen_rtx_REG (Pmode, PIC_REG);
451 + operands[1] = gen_rtx_REG (Pmode, A4_REG);
452 return MOTOROLA ? "move.l %?(%1),%0" : "movel %1@(%?), %0";
454 else if (MOTOROLA)
455 diff -urN gcc-4.6.4/gcc/config/m68k/t-aros gcc-4.6.4.new/gcc/config/m68k/t-aros
456 --- gcc-4.6.4/gcc/config/m68k/t-aros 1969-12-31 19:00:00.000000000 -0500
457 +++ gcc-4.6.4.new/gcc/config/m68k/t-aros 2013-12-02 20:22:15.912776170 -0500
458 @@ -0,0 +1,2 @@
459 +# Custom multilibs for AROS
460 +M68K_MLIB_CPU += && match(MLIB, "^68")
461 diff -urN gcc-4.6.4/gcc/config/rs6000/aros.h gcc-4.6.4.new/gcc/config/rs6000/aros.h
462 --- gcc-4.6.4/gcc/config/rs6000/aros.h 1969-12-31 19:00:00.000000000 -0500
463 +++ gcc-4.6.4.new/gcc/config/rs6000/aros.h 2013-12-02 20:22:15.912776170 -0500
464 @@ -0,0 +1,161 @@
465 +/* Definitions for Powerpc running AROS systems with ELF format.
466 + Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002
467 + Free Software Foundation, Inc.
468 + Contributed by Markus Weiss.
469 + Based upon i386/aros.h by Fabio Alemagna.
471 +This file is part of GNU CC.
473 +GNU CC is free software; you can redistribute it and/or modify
474 +it under the terms of the GNU General Public License as published by
475 +the Free Software Foundation; either version 2, or (at your option)
476 +any later version.
478 +GNU CC is distributed in the hope that it will be useful,
479 +but WITHOUT ANY WARRANTY; without even the implied warranty of
480 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
481 +GNU General Public License for more details.
483 +You should have received a copy of the GNU General Public License
484 +along with GNU CC; see the file COPYING. If not, write to
485 +the Free Software Foundation, 59 Temple Place - Suite 330,
486 +Boston, MA 02111-1307, USA. */
488 +/* Symbols missing in comparison to i386/aros.h are either
489 + defined in elfos.h, rs6000/rs6000.h rs6000/sysv4.h
490 + or not needed for PowerPC.
493 +/* We need to define __powerpc__. */
495 +#undef TARGET_OS_CPP_BUILTINS
496 +#define TARGET_OS_CPP_BUILTINS() \
497 + do \
498 + { \
499 + builtin_define_std ("AROS"); \
500 + builtin_define ("AMIGA"); \
501 + builtin_define ("_AMIGA"); \
502 + builtin_define ("__powerpc__"); \
503 + builtin_define ("__ELF__"); \
504 + builtin_assert ("system=posix"); \
505 + if (flag_pic) \
506 + { \
507 + builtin_define ("__PIC__"); \
508 + builtin_define ("__pic__"); \
509 + } \
510 + } \
511 + while (0)
513 +/* This one taken from linux.h. */
514 +/* We are 32-bit all the time, so optimize a little. */
515 +#undef TARGET_64BIT
516 +#define TARGET_64BIT 0
518 +/* Output at beginning of assembler file. */
519 +/* The .file command should always begin the output. */
520 +/*#undef TARGET_ASM_FILE_START_FILE_DIRECTIVE
521 +#define TARGET_ASM_FILE_START_FILE_DIRECTIVE true
522 +defined in elfos.h
525 +#undef TARGET_VERSION
526 +#define TARGET_VERSION fprintf (stderr, " (PowerPC AROS/ELF)");
528 +/* The svr4 ABI for the i386 says that records and unions are returned
529 + in memory. */
530 +/*#undef DEFAULT_PCC_STRUCT_RETURN
531 +#define DEFAULT_PCC_STRUCT_RETURN 1
532 +see rs6000/rs6000.h
536 +#undef ASM_COMMENT_START
537 +#define ASM_COMMENT_START "#"
538 +see rs6000/rs6000.h
542 +#undef DBX_REGISTER_NUMBER
543 +#define DBX_REGISTER_NUMBER(n) \
544 + (TARGET_64BIT ? dbx64_register_map[n] : svr4_dbx_register_map[n])
545 +see rs6000/sysv4.h
548 +/* Output assembler code to FILE to call the profiler.
549 + To the best of my knowledge, no Linux libc has required the label
550 + argument to mcount. */
553 +#define NO_PROFILE_COUNTERS 1
554 +not used by other similar ppc compilers
555 +only in darwin.h rs6000/linux64.h rs6000/rs6000.c
559 +#undef MCOUNT_NAME
560 +#define MCOUNT_NAME "mcount"
561 +see rs6000/sysv4.h RS6000_MCOUNT
564 +/* The GLIBC version of mcount for the x86 assumes that there is a
565 + frame, so we cannot allow profiling without a frame pointer. */
567 +#undef SUBTARGET_FRAME_POINTER_REQUIRED
568 +#define SUBTARGET_FRAME_POINTER_REQUIRED crtl->profile
569 +seems to be handled by rs6000/rs6000.h
572 +#undef CC1_SPEC
573 +#define CC1_SPEC "%(cc1_cpu) %{profile:-p}"
575 +/* Provide a LINK_SPEC appropriate for AROS. */
577 +#undef LINK_SPEC
578 +#define LINK_SPEC "-m elf32ppc -L %R/lib"
580 +/* A C statement (sans semicolon) to output to the stdio stream
581 + FILE the assembler definition of uninitialized global DECL named
582 + NAME whose size is SIZE bytes and alignment is ALIGN bytes.
583 + Try to use asm_output_aligned_bss to implement this macro. */
585 +#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
586 + asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
587 +see rs6000/sysv4.h
590 +/* A C statement to output to the stdio stream FILE an assembler
591 + command to advance the location counter to a multiple of 1<<LOG
592 + bytes if it is within MAX_SKIP bytes.
594 + This is used to align code labels according to Intel recommendations. */
596 +#ifdef HAVE_GAS_MAX_SKIP_P2ALIGN
597 +#define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE,LOG,MAX_SKIP) \
598 + do { \
599 + if ((LOG) != 0) { \
600 + if ((MAX_SKIP) == 0) fprintf ((FILE), "\t.p2align %d\n", (LOG)); \
601 + else fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)); \
602 + } \
603 + } while (0)
604 +#endif
605 +see rs6000/sysv4.h
608 +/* Handle special EH pointer encodings. Absolute, pc-relative, and
609 + indirect are handled automatically. */
611 +#define ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX(FILE, ENCODING, SIZE, ADDR, DONE) \
612 + do { \
613 + if ((SIZE) == 4 && ((ENCODING) & 0x70) == DW_EH_PE_datarel) \
614 + { \
615 + fputs (ASM_LONG, FILE); \
616 + assemble_name (FILE, XSTR (ADDR, 0)); \
617 + fputs (((ENCODING) & DW_EH_PE_indirect ? "@GOT" : "@GOTOFF"), FILE); \
618 + goto DONE; \
619 + } \
620 + } while (0)
621 +not used for PowerPC
624 +/* FIXME: AROS doesn't support dw2 unwinding yet. */
625 +#undef MD_FALLBACK_FRAME_STATE_FOR
626 diff -urN gcc-4.6.4/gcc/config/rs6000/rs6000.c gcc-4.6.4.new/gcc/config/rs6000/rs6000.c
627 --- gcc-4.6.4/gcc/config/rs6000/rs6000.c 2013-02-08 10:07:55.000000000 -0500
628 +++ gcc-4.6.4.new/gcc/config/rs6000/rs6000.c 2013-12-02 20:22:15.916776186 -0500
629 @@ -1308,6 +1308,7 @@
630 { "altivec", 1, 1, false, true, false, rs6000_handle_altivec_attribute },
631 { "longcall", 0, 0, false, true, true, rs6000_handle_longcall_attribute },
632 { "shortcall", 0, 0, false, true, true, rs6000_handle_longcall_attribute },
633 + { "stackparm", 0, 0, false, true, true, rs6000_handle_longcall_attribute },
634 { "ms_struct", 0, 0, false, false, false, rs6000_handle_struct_attribute },
635 { "gcc_struct", 0, 0, false, false, false, rs6000_handle_struct_attribute },
636 #ifdef SUBTARGET_ATTRIBUTE_TABLE
637 @@ -8070,6 +8071,9 @@
638 && !lookup_attribute ("shortcall", TYPE_ATTRIBUTES (fntype))))
639 cum->call_cookie |= CALL_LONG;
641 + cum->stackparm = fntype && lookup_attribute("stackparm",
642 + TYPE_ATTRIBUTES(fntype));
644 if (TARGET_DEBUG_ARG)
646 fprintf (stderr, "\ninit_cumulative_args:");
647 @@ -9045,6 +9049,9 @@
648 return GEN_INT (cum->call_cookie);
651 + if (cum->stackparm)
652 + return NULL_RTX;
654 if (TARGET_MACHO && rs6000_darwin64_struct_check_p (mode, type))
656 rtx rslt = rs6000_darwin64_record_arg (cum, type, named, /*retval= */false);
657 @@ -9460,6 +9467,9 @@
658 int first_reg_offset;
659 alias_set_type set;
661 + if (cum->stackparm)
662 + return;
664 /* Skip the last named argument. */
665 next_cum = *cum;
666 rs6000_function_arg_advance_1 (&next_cum, mode, type, true, 0);
667 diff -urN gcc-4.6.4/gcc/config/rs6000/rs6000.h gcc-4.6.4.new/gcc/config/rs6000/rs6000.h
668 --- gcc-4.6.4/gcc/config/rs6000/rs6000.h 2012-04-13 17:55:15.000000000 -0400
669 +++ gcc-4.6.4.new/gcc/config/rs6000/rs6000.h 2013-12-02 20:22:15.916776186 -0500
670 @@ -1564,6 +1564,7 @@
671 int nargs_prototype; /* # args left in the current prototype */
672 int prototype; /* Whether a prototype was defined */
673 int stdarg; /* Whether function is a stdarg function. */
674 + int stackparm; /* Whether function has all args on the stack */
675 int call_cookie; /* Do special things for this call */
676 int sysv_gregno; /* next available GP register */
677 int intoffset; /* running offset in struct (darwin64) */
678 diff -urN gcc-4.6.4/gcc/config/t-aros gcc-4.6.4.new/gcc/config/t-aros
679 --- gcc-4.6.4/gcc/config/t-aros 1969-12-31 19:00:00.000000000 -0500
680 +++ gcc-4.6.4.new/gcc/config/t-aros 2013-12-02 20:22:15.920776210 -0500
681 @@ -0,0 +1,29 @@
682 +# In AROS, "/usr" is a four-letter word.
683 +# Must match STANDARD_INCLUDE_DIR in aros.h !
684 +NATIVE_SYSTEM_HEADER_DIR = /include
686 +# Don't add AROS target include path when compiling host compiler
687 +CPPFLAGS =
689 +# Copy AROS specific include replacement files
690 +LIBGCC_DEPS += stmp-aros-hrds
692 +EXTRA_AROS_HEADERS = aros/types/size_t.h aros/types/ptrdiff_t.h \
693 + aros/types/wchar_t.h aros/types/wint_t.h aros/types/null.h
695 +stmp-int-hdrs : | include/aros/types
697 +include/aros/types : $(addprefix $(srcdir)/ginclude/,$(EXTRA_AROS_HEADERS))
698 + -if [ -d include ] ; then true; else mkdir include; chmod a+rx include; fi
699 + -if [ -d include/aros/types ] ; \
700 + then true; \
701 + else \
702 + mkdir include/aros; chmod a+rx include/aros; \
703 + mkdir include/aros/types; chmod a+rx include/aros/types; \
704 + fi
705 + for file in $(EXTRA_AROS_HEADERS); do \
706 + $(STAMP) include/$$file; \
707 + rm -fr include/$$file; \
708 + cp $(srcdir)/ginclude/$$file include/$$file; \
709 + chmod a+r include/$$file; \
710 + done
711 diff -urN gcc-4.6.4/gcc/config.build gcc-4.6.4.new/gcc/config.build
712 --- gcc-4.6.4/gcc/config.build 2010-04-12 14:36:30.000000000 -0400
713 +++ gcc-4.6.4.new/gcc/config.build 2013-12-02 20:22:15.920776210 -0500
714 @@ -124,6 +124,9 @@
715 # HP 9000 series 300
716 build_install_headers_dir=install-headers-cpio
718 + *-*-aros*)
719 + build_xm_file=xm-aros.h
720 + ;;
721 *-*-sysv*)
722 # All other System V variants.
723 build_install_headers_dir=install-headers-cpio
724 diff -urN gcc-4.6.4/gcc/config.gcc gcc-4.6.4.new/gcc/config.gcc
725 --- gcc-4.6.4/gcc/config.gcc 2013-03-06 12:40:07.000000000 -0500
726 +++ gcc-4.6.4.new/gcc/config.gcc 2013-12-02 20:22:15.920776210 -0500
727 @@ -656,6 +656,14 @@
729 esac
731 +*-*-aros*)
732 + gas=yes
733 + gnu_ld=yes
734 + thread_file=single
735 + use_collect2=no
736 + xm_defines='STDC_HEADERS=1'
737 + ;;
739 *-*-openbsd*)
740 tmake_file="t-libc-ok t-openbsd t-libgcc-pic"
741 case ${enable_threads} in
742 @@ -793,6 +801,16 @@
743 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
744 extra_parts="crtinit.o crtfini.o"
746 +arm*-*-aros*)
747 + tm_file="dbxelf.h elfos.h arm/elf.h arm/bpabi.h aros.h arm/aros.h arm/aout.h arm/arm.h"
748 + tm_file="$tm_file ../../libgcc/config/arm/bpabi-lib.h"
749 + tmake_file="${tmake_file} arm/t-arm arm/t-arm-elf arm/t-arm-softfp arm/t-bpabi arm/t-aros t-aros"
750 + xm_file="xm-aros.h"
751 + # The BPABI long long divmod functions return a 128-bit value in
752 + # registers r0-r3. Correctly modeling that requires the use of
753 + # TImode.
754 + need_64bit_hwint=yes
755 + ;;
756 arm-wrs-vxworks)
757 tm_file="elfos.h arm/elf.h arm/aout.h ${tm_file} vx-common.h vxworks.h arm/vxworks.h"
758 extra_options="${extra_options} arm/vxworks.opt"
759 @@ -1316,6 +1334,16 @@
760 esac
761 tmake_file="${tmake_file} i386/t-linux64 i386/t-crtstuff i386/t-crtpc i386/t-crtfm t-dfprules"
763 +i[34567]86-*-aros*)
764 + tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/i386elf.h aros.h i386/aros.h"
765 + xm_file=xm-aros.h
766 + tmake_file="${tmake_file} i386/t-i386elf t-aros"
767 + ;;
768 +x86_64-*-aros*)
769 + 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"
770 + tmake_file="${tmake_file} i386/t-i386elf t-aros"
771 + xm_file=xm-aros.h
772 + ;;
773 i[34567]86-pc-msdosdjgpp*)
774 xm_file=i386/xm-djgpp.h
775 tm_file="dbxcoff.h ${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/djgpp.h i386/djgpp-stdint.h"
776 @@ -1724,6 +1752,16 @@
777 extra_options="${extra_options} m68hc11/m68hc11.opt"
778 use_gcc_stdint=wrap
780 +m68k-*-aros*)
781 + default_m68k_cpu=68000
782 + default_cf_cpu=5206
783 + 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"
784 + tm_file="${tm_file} aros.h"
785 + tm_defines="${tm_defines} MOTOROLA=1"
786 + tmake_file="m68k/t-floatlib m68k/t-m68kbare m68k/t-m68kelf"
787 + tmake_file="$tmake_file m68k/t-aros m68k/t-mlibs t-aros"
788 + extra_parts="crtbegin.o crtend.o"
789 + ;;
790 m68k-*-elf* | fido-*-elf*)
791 case ${target} in
792 fido-*-elf*)
793 @@ -2147,6 +2185,13 @@
794 extra_options="${extra_options} rs6000/sysv4.opt"
795 tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-rtems t-rtems rs6000/t-ppccomm"
797 +powerpc-*-aros*)
798 + tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h aros.h"
799 + extra_options="${extra_options} rs6000/sysv4.opt"
800 + tm_file="${tm_file} rs6000/aros.h"
801 + xm_file=xm-aros.h
802 + tmake_file="$tmake_file t-aros"
803 + ;;
804 powerpc-*-linux* | powerpc64-*-linux*)
805 tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h"
806 extra_options="${extra_options} rs6000/sysv4.opt"
807 diff -urN gcc-4.6.4/gcc/config.host gcc-4.6.4.new/gcc/config.host
808 --- gcc-4.6.4/gcc/config.host 2011-02-15 04:49:14.000000000 -0500
809 +++ gcc-4.6.4.new/gcc/config.host 2013-12-02 20:22:15.920776210 -0500
810 @@ -277,4 +277,8 @@
811 out_host_hook_obj=host-hpux.o
812 host_xmake_file="${host_xmake_file} x-hpux"
814 + *-*-aros*)
815 + host_can_use_collect2=no
816 + host_xm_file=xm-aros.h
817 + ;;
818 esac
819 diff -urN gcc-4.6.4/gcc/ginclude/aros/types/null.h gcc-4.6.4.new/gcc/ginclude/aros/types/null.h
820 --- gcc-4.6.4/gcc/ginclude/aros/types/null.h 1969-12-31 19:00:00.000000000 -0500
821 +++ gcc-4.6.4.new/gcc/ginclude/aros/types/null.h 2013-12-02 20:22:15.936776290 -0500
822 @@ -0,0 +1,3 @@
823 +/* Replace AROS' NULL definition with gcc's one */
824 +#define __need_NULL
825 +#include <stddef.h>
826 diff -urN gcc-4.6.4/gcc/ginclude/aros/types/ptrdiff_t.h gcc-4.6.4.new/gcc/ginclude/aros/types/ptrdiff_t.h
827 --- gcc-4.6.4/gcc/ginclude/aros/types/ptrdiff_t.h 1969-12-31 19:00:00.000000000 -0500
828 +++ gcc-4.6.4.new/gcc/ginclude/aros/types/ptrdiff_t.h 2013-12-02 20:22:15.936776290 -0500
829 @@ -0,0 +1,3 @@
830 +/* Replace AROS' ptrdiff_t definition with gcc's one */
831 +#define __need_ptrdiff_t
832 +#include <stddef.h>
833 diff -urN gcc-4.6.4/gcc/ginclude/aros/types/size_t.h gcc-4.6.4.new/gcc/ginclude/aros/types/size_t.h
834 --- gcc-4.6.4/gcc/ginclude/aros/types/size_t.h 1969-12-31 19:00:00.000000000 -0500
835 +++ gcc-4.6.4.new/gcc/ginclude/aros/types/size_t.h 2013-12-02 20:22:15.936776290 -0500
836 @@ -0,0 +1,3 @@
837 +/* Replace AROS' size_t definition with gcc's one */
838 +#define __need_size_t
839 +#include <stddef.h>
840 diff -urN gcc-4.6.4/gcc/ginclude/aros/types/wchar_t.h gcc-4.6.4.new/gcc/ginclude/aros/types/wchar_t.h
841 --- gcc-4.6.4/gcc/ginclude/aros/types/wchar_t.h 1969-12-31 19:00:00.000000000 -0500
842 +++ gcc-4.6.4.new/gcc/ginclude/aros/types/wchar_t.h 2013-12-02 20:22:15.936776290 -0500
843 @@ -0,0 +1,3 @@
844 +/* Replace AROS' wchar_t definition with gcc's one */
845 +#define __need_wchar_t
846 +#include <stddef.h>
847 diff -urN gcc-4.6.4/gcc/ginclude/aros/types/wint_t.h gcc-4.6.4.new/gcc/ginclude/aros/types/wint_t.h
848 --- gcc-4.6.4/gcc/ginclude/aros/types/wint_t.h 1969-12-31 19:00:00.000000000 -0500
849 +++ gcc-4.6.4.new/gcc/ginclude/aros/types/wint_t.h 2013-12-02 20:22:15.936776290 -0500
850 @@ -0,0 +1,3 @@
851 +/* Replace AROS' wint_t definition with gcc's one */
852 +#define __need_wint_t
853 +#include <stddef.h>
854 diff -urN gcc-4.6.4/gcc/ginclude/stddef.h gcc-4.6.4.new/gcc/ginclude/stddef.h
855 --- gcc-4.6.4/gcc/ginclude/stddef.h 2011-01-29 17:15:52.000000000 -0500
856 +++ gcc-4.6.4.new/gcc/ginclude/stddef.h 2013-12-02 20:22:15.936776290 -0500
857 @@ -134,6 +134,7 @@
858 #ifndef __PTRDIFF_T
859 #ifndef _PTRDIFF_T_
860 #ifndef _BSD_PTRDIFF_T_
861 +#ifndef _AROS_TYPES_PTRDIFF_T_H
862 #ifndef ___int_ptrdiff_t_h
863 #ifndef _GCC_PTRDIFF_T
864 #define _PTRDIFF_T
865 @@ -142,6 +143,7 @@
866 #define __PTRDIFF_T
867 #define _PTRDIFF_T_
868 #define _BSD_PTRDIFF_T_
869 +#define _AROS_TYPES_PTRDIFF_T_H
870 #define ___int_ptrdiff_t_h
871 #define _GCC_PTRDIFF_T
872 #ifndef __PTRDIFF_TYPE__
873 @@ -150,6 +152,7 @@
874 typedef __PTRDIFF_TYPE__ ptrdiff_t;
875 #endif /* _GCC_PTRDIFF_T */
876 #endif /* ___int_ptrdiff_t_h */
877 +#endif /* _AROS_TYPES_PTRDIFF_T_H */
878 #endif /* _BSD_PTRDIFF_T_ */
879 #endif /* _PTRDIFF_T_ */
880 #endif /* __PTRDIFF_T */
881 @@ -176,6 +179,7 @@
882 #ifndef __SIZE_T
883 #ifndef _SIZE_T_
884 #ifndef _BSD_SIZE_T_
885 +#ifndef _AROS_TYPES_SIZE_T_H
886 #ifndef _SIZE_T_DEFINED_
887 #ifndef _SIZE_T_DEFINED
888 #ifndef _BSD_SIZE_T_DEFINED_ /* Darwin */
889 @@ -193,6 +197,7 @@
890 #define __SIZE_T
891 #define _SIZE_T_
892 #define _BSD_SIZE_T_
893 +#define _AROS_TYPES_SIZE_T_H
894 #define _SIZE_T_DEFINED_
895 #define _SIZE_T_DEFINED
896 #define _BSD_SIZE_T_DEFINED_ /* Darwin */
897 @@ -222,6 +227,7 @@
898 #endif /* _BSD_SIZE_T_DEFINED_ */
899 #endif /* _SIZE_T_DEFINED */
900 #endif /* _SIZE_T_DEFINED_ */
901 +#endif /* _AROS_TYPES_SIZE_T_H */
902 #endif /* _BSD_SIZE_T_ */
903 #endif /* _SIZE_T_ */
904 #endif /* __SIZE_T */
905 diff -urN gcc-4.6.4/include/filenames.h gcc-4.6.4.new/include/filenames.h
906 --- gcc-4.6.4/include/filenames.h 2011-02-28 13:23:25.000000000 -0500
907 +++ gcc-4.6.4.new/include/filenames.h 2013-12-02 20:22:15.936776290 -0500
908 @@ -37,6 +37,10 @@
909 # define HAS_DRIVE_SPEC(f) HAS_DOS_DRIVE_SPEC (f)
910 # define IS_DIR_SEPARATOR(c) IS_DOS_DIR_SEPARATOR (c)
911 # define IS_ABSOLUTE_PATH(f) IS_DOS_ABSOLUTE_PATH (f)
912 +#elif defined __AROS__
913 +# define IS_DIR_SEPARATOR(c) ((c) == '/' || (c) == ':')
914 +# define IS_ABSOLUTE_PATH(f) (IS_DIR_SEPARATOR((f)[0]) || (strchr((f), ':')))
915 +# define HAVE_CASE_INSENSITIVE_FILE_SYSTEM
916 #else /* not DOSish */
917 # define HAS_DRIVE_SPEC(f) (0)
918 # define IS_DIR_SEPARATOR(c) IS_UNIX_DIR_SEPARATOR (c)
919 diff -urN gcc-4.6.4/libcpp/configure gcc-4.6.4.new/libcpp/configure
920 --- gcc-4.6.4/libcpp/configure 2013-04-12 05:58:00.000000000 -0400
921 +++ gcc-4.6.4.new/libcpp/configure 2013-12-02 20:22:15.940776306 -0500
922 @@ -7092,6 +7092,7 @@
923 arm*-*-*eabi* | \
924 arm*-*-rtems[.0-9]* | \
925 arm*-*-symbianelf* | \
926 + arm*-*-aros | \
927 x86_64-*-* | \
928 ia64-*-* | \
929 hppa*64*-*-* | \
930 diff -urN gcc-4.6.4/libcpp/configure.ac gcc-4.6.4.new/libcpp/configure.ac
931 --- gcc-4.6.4/libcpp/configure.ac 2013-04-03 11:45:53.000000000 -0400
932 +++ gcc-4.6.4.new/libcpp/configure.ac 2013-12-02 20:22:15.940776306 -0500
933 @@ -142,6 +142,7 @@
934 arm*-*-*eabi* | \
935 arm*-*-rtems[.0-9]* | \
936 arm*-*-symbianelf* | \
937 + arm*-*-aros | \
938 x86_64-*-* | \
939 ia64-*-* | \
940 hppa*64*-*-* | \
941 diff -urN gcc-4.6.4/libgcc/config.host gcc-4.6.4.new/libgcc/config.host
942 --- gcc-4.6.4/libgcc/config.host 2011-11-23 17:15:54.000000000 -0500
943 +++ gcc-4.6.4.new/libgcc/config.host 2013-12-02 20:22:15.940776306 -0500
944 @@ -590,6 +590,8 @@
946 mep*-*-*)
948 +*-*-aros*)
949 + ;;
951 echo "*** Configuration ${host} not supported" 1>&2
952 exit 1
953 diff -urN gcc-4.6.4/libiberty/filename_cmp.c gcc-4.6.4.new/libiberty/filename_cmp.c
954 --- gcc-4.6.4/libiberty/filename_cmp.c 2011-02-28 13:23:25.000000000 -0500
955 +++ gcc-4.6.4.new/libiberty/filename_cmp.c 2013-12-02 20:22:15.940776306 -0500
956 @@ -51,7 +51,11 @@
957 filename_cmp (const char *s1, const char *s2)
959 #ifndef HAVE_DOS_BASED_FILE_SYSTEM
960 +#ifdef HAVE_CASE_INSENSITIVE_FILE_SYSTEM
961 + return strcasecmp(s1, s2);
962 +#else
963 return strcmp(s1, s2);
964 +#endif
965 #else
966 for (;;)
968 diff -urN gcc-4.6.4/libobjc/configure gcc-4.6.4.new/libobjc/configure
969 --- gcc-4.6.4/libobjc/configure 2011-11-20 16:24:07.000000000 -0500
970 +++ gcc-4.6.4.new/libobjc/configure 2013-12-02 20:22:15.944776326 -0500
971 @@ -11249,215 +11249,7 @@
975 -# Check if we have thread-local storage
978 - # Check whether --enable-tls was given.
979 -if test "${enable_tls+set}" = set; then :
980 - enableval=$enable_tls;
981 - case "$enableval" in
982 - yes|no) ;;
983 - *) as_fn_error "Argument to enable/disable tls must be yes or no" "$LINENO" 5 ;;
984 - esac
986 -else
987 - enable_tls=yes
991 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the target supports thread-local storage" >&5
992 -$as_echo_n "checking whether the target supports thread-local storage... " >&6; }
993 -if test "${gcc_cv_have_tls+set}" = set; then :
994 - $as_echo_n "(cached) " >&6
995 -else
997 - if test "$cross_compiling" = yes; then :
998 - if test x$gcc_no_link = xyes; then
999 - as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
1001 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1002 -/* end confdefs.h. */
1003 -__thread int a; int b; int main() { return a = b; }
1004 -_ACEOF
1005 -if ac_fn_c_try_link "$LINENO"; then :
1006 - chktls_save_LDFLAGS="$LDFLAGS"
1007 - case $host in
1008 - *-*-linux*)
1009 - LDFLAGS="-shared -Wl,--no-undefined $LDFLAGS"
1010 - ;;
1011 - esac
1012 - chktls_save_CFLAGS="$CFLAGS"
1013 - CFLAGS="-fPIC $CFLAGS"
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 -int f() { return 0; }
1020 -_ACEOF
1021 -if ac_fn_c_try_link "$LINENO"; then :
1022 - if test x$gcc_no_link = xyes; then
1023 - as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
1025 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1026 -/* end confdefs.h. */
1027 -__thread int a; int b; int f() { return a = b; }
1028 -_ACEOF
1029 -if ac_fn_c_try_link "$LINENO"; then :
1030 - gcc_cv_have_tls=yes
1031 -else
1032 - gcc_cv_have_tls=no
1034 -rm -f core conftest.err conftest.$ac_objext \
1035 - conftest$ac_exeext conftest.$ac_ext
1036 -else
1037 - gcc_cv_have_tls=yes
1039 -rm -f core conftest.err conftest.$ac_objext \
1040 - conftest$ac_exeext conftest.$ac_ext
1041 - CFLAGS="$chktls_save_CFLAGS"
1042 - LDFLAGS="$chktls_save_LDFLAGS"
1043 -else
1044 - gcc_cv_have_tls=no
1046 -rm -f core conftest.err conftest.$ac_objext \
1047 - conftest$ac_exeext conftest.$ac_ext
1050 -else
1051 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1052 -/* end confdefs.h. */
1053 -__thread int a; int b; int main() { return a = b; }
1054 -_ACEOF
1055 -if ac_fn_c_try_run "$LINENO"; then :
1056 - chktls_save_LDFLAGS="$LDFLAGS"
1057 - LDFLAGS="-static $LDFLAGS"
1058 - if test x$gcc_no_link = xyes; then
1059 - as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
1061 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1062 -/* end confdefs.h. */
1063 -int main() { return 0; }
1064 -_ACEOF
1065 -if ac_fn_c_try_link "$LINENO"; then :
1066 - if test "$cross_compiling" = yes; then :
1067 - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
1068 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1069 -as_fn_error "cannot run test program while cross compiling
1070 -See \`config.log' for more details." "$LINENO" 5; }
1071 -else
1072 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1073 -/* end confdefs.h. */
1074 -__thread int a; int b; int main() { return a = b; }
1075 -_ACEOF
1076 -if ac_fn_c_try_run "$LINENO"; then :
1077 - gcc_cv_have_tls=yes
1078 -else
1079 - gcc_cv_have_tls=no
1081 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
1082 - conftest.$ac_objext conftest.beam conftest.$ac_ext
1085 -else
1086 - gcc_cv_have_tls=yes
1088 -rm -f core conftest.err conftest.$ac_objext \
1089 - conftest$ac_exeext conftest.$ac_ext
1090 - LDFLAGS="$chktls_save_LDFLAGS"
1091 - if test $gcc_cv_have_tls = yes; then
1092 - chktls_save_CFLAGS="$CFLAGS"
1093 - thread_CFLAGS=failed
1094 - for flag in '' '-pthread' '-lpthread'; do
1095 - CFLAGS="$flag $chktls_save_CFLAGS"
1096 - if test x$gcc_no_link = xyes; then
1097 - as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
1099 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1100 -/* end confdefs.h. */
1101 -#include <pthread.h>
1102 - void *g(void *d) { return NULL; }
1103 -int
1104 -main ()
1106 -pthread_t t; pthread_create(&t,NULL,g,NULL);
1108 - return 0;
1110 -_ACEOF
1111 -if ac_fn_c_try_link "$LINENO"; then :
1112 - thread_CFLAGS="$flag"
1114 -rm -f core conftest.err conftest.$ac_objext \
1115 - conftest$ac_exeext conftest.$ac_ext
1116 - if test "X$thread_CFLAGS" != Xfailed; then
1117 - break
1118 - fi
1119 - done
1120 - CFLAGS="$chktls_save_CFLAGS"
1121 - if test "X$thread_CFLAGS" != Xfailed; then
1122 - CFLAGS="$thread_CFLAGS $chktls_save_CFLAGS"
1123 - if test "$cross_compiling" = yes; then :
1124 - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
1125 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1126 -as_fn_error "cannot run test program while cross compiling
1127 -See \`config.log' for more details." "$LINENO" 5; }
1128 -else
1129 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1130 -/* end confdefs.h. */
1131 -#include <pthread.h>
1132 - __thread int a;
1133 - static int *volatile a_in_other_thread;
1134 - static void *
1135 - thread_func (void *arg)
1137 - a_in_other_thread = &a;
1138 - return (void *)0;
1140 -int
1141 -main ()
1143 -pthread_t thread;
1144 - void *thread_retval;
1145 - int *volatile a_in_main_thread;
1146 - a_in_main_thread = &a;
1147 - if (pthread_create (&thread, (pthread_attr_t *)0,
1148 - thread_func, (void *)0))
1149 - return 0;
1150 - if (pthread_join (thread, &thread_retval))
1151 - return 0;
1152 - return (a_in_other_thread == a_in_main_thread);
1154 - return 0;
1156 -_ACEOF
1157 -if ac_fn_c_try_run "$LINENO"; then :
1158 - gcc_cv_have_tls=yes
1159 -else
1160 - gcc_cv_have_tls=no
1162 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
1163 - conftest.$ac_objext conftest.beam conftest.$ac_ext
1166 - CFLAGS="$chktls_save_CFLAGS"
1167 - fi
1168 - fi
1169 -else
1170 - gcc_cv_have_tls=no
1172 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
1173 - conftest.$ac_objext conftest.beam conftest.$ac_ext
1177 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_have_tls" >&5
1178 -$as_echo "$gcc_cv_have_tls" >&6; }
1179 - if test "$enable_tls $gcc_cv_have_tls" = "yes yes"; then
1181 -$as_echo "#define HAVE_TLS 1" >>confdefs.h
1183 - fi
1184 +#dnl GCC_ENABLE_TLS
1186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for exception model to use" >&5
1187 $as_echo_n "checking for exception model to use... " >&6; }
1188 diff -urN gcc-4.6.4/libobjc/configure.ac gcc-4.6.4.new/libobjc/configure.ac
1189 --- gcc-4.6.4/libobjc/configure.ac 2010-12-05 19:50:04.000000000 -0500
1190 +++ gcc-4.6.4.new/libobjc/configure.ac 2013-12-02 20:22:15.944776326 -0500
1191 @@ -217,7 +217,7 @@
1194 # Check if we have thread-local storage
1195 -GCC_CHECK_TLS
1196 +dnl GCC_CHECK_TLS
1198 AC_MSG_CHECKING([for exception model to use])
1199 AC_LANG_PUSH(C)
1200 diff -urN gcc-4.6.4/libstdc++-v3/config/os/aros/ctype_base.h gcc-4.6.4.new/libstdc++-v3/config/os/aros/ctype_base.h
1201 --- gcc-4.6.4/libstdc++-v3/config/os/aros/ctype_base.h 1969-12-31 19:00:00.000000000 -0500
1202 +++ gcc-4.6.4.new/libstdc++-v3/config/os/aros/ctype_base.h 2013-12-02 20:22:15.944776326 -0500
1203 @@ -0,0 +1,27 @@
1204 +namespace std _GLIBCXX_VISIBILITY(default)
1206 +_GLIBCXX_BEGIN_NAMESPACE_VERSION
1208 +struct ctype_base {
1209 + /* Non-standard typedefs */
1210 + typedef int * __to_type;
1212 + /* NB: Offsets into ctype<char>::_M_table force a particular size
1213 + on the mask type. Because of this, we don't use an enum. */
1214 + typedef unsigned short int mask;
1216 + static const mask upper = _ISupper;
1217 + static const mask lower = _ISlower;
1218 + static const mask alpha = _ISalpha;
1219 + static const mask digit = _ISdigit;
1220 + static const mask xdigit = _ISxdigit;
1221 + static const mask space = _ISspace;
1222 + static const mask print = _ISprint;
1223 + static const mask graph = _ISgraph;
1224 + static const mask cntrl = _IScntrl;
1225 + static const mask punct = _ISpunct;
1226 + static const mask alnum = _ISalnum;
1229 +_GLIBCXX_END_NAMESPACE_VERSION
1230 +} // namespace
1231 diff -urN gcc-4.6.4/libstdc++-v3/config/os/aros/ctype_inline.h gcc-4.6.4.new/libstdc++-v3/config/os/aros/ctype_inline.h
1232 --- gcc-4.6.4/libstdc++-v3/config/os/aros/ctype_inline.h 1969-12-31 19:00:00.000000000 -0500
1233 +++ gcc-4.6.4.new/libstdc++-v3/config/os/aros/ctype_inline.h 2013-12-02 20:22:15.944776326 -0500
1234 @@ -0,0 +1,173 @@
1235 +// Locale support -*- C++ -*-
1237 +// Copyright (C) 2000, 2003 Free Software Foundation, Inc.
1239 +// This file is part of the GNU ISO C++ Library. This library is free
1240 +// software; you can redistribute it and/or modify it under the
1241 +// terms of the GNU General Public License as published by the
1242 +// Free Software Foundation; either version 2, or (at your option)
1243 +// any later version.
1245 +// This library is distributed in the hope that it will be useful,
1246 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
1247 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1248 +// GNU General Public License for more details.
1250 +// You should have received a copy of the GNU General Public License along
1251 +// with this library; see the file COPYING. If not, write to the Free
1252 +// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
1253 +// USA.
1255 +// As a special exception, you may use this file as part of a free software
1256 +// library without restriction. Specifically, if other files instantiate
1257 +// templates or use macros or inline functions from this file, or you compile
1258 +// this file and link it with other files to produce an executable, this
1259 +// file does not by itself cause the resulting executable to be covered by
1260 +// the GNU General Public License. This exception does not however
1261 +// invalidate any other reasons why the executable file might be covered by
1262 +// the GNU General Public License.
1264 +/** @file ctype_inline.h
1265 + * This is an internal header file, included by other library headers.
1266 + * You should not attempt to use it directly.
1267 + */
1270 +// ISO C++ 14882: 22.1 Locales
1273 +// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*)
1274 +// functions go in ctype.cc
1276 +// The following definitions are portable, but insanely slow. If one
1277 +// cares at all about performance, then specialized ctype
1278 +// functionality should be added for the native os in question: see
1279 +// the config/os/bits/ctype_*.h files.
1281 +// Constructing a synthetic "C" table should be seriously considered...
1283 +namespace std _GLIBCXX_VISIBILITY(default)
1285 +_GLIBCXX_BEGIN_NAMESPACE_VERSION
1287 + bool
1288 + ctype<char>::
1289 + is(mask __m, char __c) const
1290 + {
1291 + if (_M_table)
1292 + return _M_table[static_cast<unsigned char>(__c)] & __m;
1293 + else
1295 + bool __ret = false;
1296 + const size_t __bitmasksize = 15;
1297 + size_t __bitcur = 0; // Lowest bitmask in ctype_base == 0
1298 + for (; __bitcur <= __bitmasksize; ++__bitcur)
1300 + const mask __bit = static_cast<mask>(1 << __bitcur);
1301 + if (__m & __bit)
1303 + bool __testis;
1304 + switch (__bit)
1306 + case space:
1307 + __testis = isspace(__c);
1308 + break;
1309 + case print:
1310 + __testis = isprint(__c);
1311 + break;
1312 + case cntrl:
1313 + __testis = iscntrl(__c);
1314 + break;
1315 + case upper:
1316 + __testis = isupper(__c);
1317 + break;
1318 + case lower:
1319 + __testis = islower(__c);
1320 + break;
1321 + case alpha:
1322 + __testis = isalpha(__c);
1323 + break;
1324 + case digit:
1325 + __testis = isdigit(__c);
1326 + break;
1327 + case punct:
1328 + __testis = ispunct(__c);
1329 + break;
1330 + case xdigit:
1331 + __testis = isxdigit(__c);
1332 + break;
1333 + case alnum:
1334 + __testis = isalnum(__c);
1335 + break;
1336 + case graph:
1337 + __testis = isgraph(__c);
1338 + break;
1339 + default:
1340 + __testis = false;
1341 + break;
1343 + __ret |= __testis;
1346 + return __ret;
1350 + const char*
1351 + ctype<char>::
1352 + is(const char* __low, const char* __high, mask* __vec) const
1354 + if (_M_table)
1355 + while (__low < __high)
1356 + *__vec++ = _M_table[static_cast<unsigned char>(*__low++)];
1357 + else
1359 + // Highest bitmask in ctype_base == 10.
1360 + const size_t __bitmasksize = 15;
1361 + for (;__low < __high; ++__vec, ++__low)
1363 + mask __m = 0;
1364 + // Lowest bitmask in ctype_base == 0
1365 + size_t __i = 0;
1366 + for (;__i <= __bitmasksize; ++__i)
1368 + const mask __bit = static_cast<mask>(1 << __i);
1369 + if (this->is(__bit, *__low))
1370 + __m |= __bit;
1372 + *__vec = __m;
1375 + return __high;
1378 + const char*
1379 + ctype<char>::
1380 + scan_is(mask __m, const char* __low, const char* __high) const
1382 + if (_M_table)
1383 + while (__low < __high
1384 + && !(_M_table[static_cast<unsigned char>(*__low)] & __m))
1385 + ++__low;
1386 + else
1387 + while (__low < __high && !this->is(__m, *__low))
1388 + ++__low;
1389 + return __low;
1392 + const char*
1393 + ctype<char>::
1394 + scan_not(mask __m, const char* __low, const char* __high) const
1396 + if (_M_table)
1397 + while (__low < __high
1398 + && (_M_table[static_cast<unsigned char>(*__low)] & __m) != 0)
1399 + ++__low;
1400 + else
1401 + while (__low < __high && this->is(__m, *__low) != 0)
1402 + ++__low;
1403 + return __low;
1406 +_GLIBCXX_END_NAMESPACE_VERSION
1407 +} // namespace
1408 diff -urN gcc-4.6.4/libstdc++-v3/config/os/aros/ctype_noninline.h gcc-4.6.4.new/libstdc++-v3/config/os/aros/ctype_noninline.h
1409 --- gcc-4.6.4/libstdc++-v3/config/os/aros/ctype_noninline.h 1969-12-31 19:00:00.000000000 -0500
1410 +++ gcc-4.6.4.new/libstdc++-v3/config/os/aros/ctype_noninline.h 2013-12-02 20:22:15.944776326 -0500
1411 @@ -0,0 +1,56 @@
1412 + const ctype_base::mask*
1413 + ctype<char>::classic_table() throw()
1414 + { return *__ctype_b_ptr; }
1416 + ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
1417 + size_t __refs)
1418 + : facet(__refs), _M_del(__table != 0 && __del),
1419 + _M_toupper(NULL), _M_tolower(NULL),
1420 + _M_table(__table ? __table : classic_table())
1421 + {
1422 + memset(_M_widen, 0, sizeof(_M_widen));
1423 + _M_widen_ok = 0;
1424 + memset(_M_narrow, 0, sizeof(_M_narrow));
1425 + _M_narrow_ok = 0;
1428 + ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
1429 + : facet(__refs), _M_del(__table != 0 && __del),
1430 + _M_toupper(NULL), _M_tolower(NULL),
1431 + _M_table(__table ? __table : classic_table())
1432 + {
1433 + memset(_M_widen, 0, sizeof(_M_widen));
1434 + _M_widen_ok = 0;
1435 + memset(_M_narrow, 0, sizeof(_M_narrow));
1436 + _M_narrow_ok = 0;
1439 + char
1440 + ctype<char>::do_toupper(char __c) const
1441 + { return ::toupper((int) __c); }
1443 + const char*
1444 + ctype<char>::do_toupper(char* __low, const char* __high) const
1446 + while (__low < __high)
1448 + *__low = ::toupper((int) *__low);
1449 + ++__low;
1451 + return __high;
1454 + char
1455 + ctype<char>::do_tolower(char __c) const
1456 + { return ::tolower((int) __c); }
1458 + const char*
1459 + ctype<char>::do_tolower(char* __low, const char* __high) const
1461 + while (__low < __high)
1463 + *__low = ::tolower((int) *__low);
1464 + ++__low;
1466 + return __high;
1468 diff -urN gcc-4.6.4/libstdc++-v3/config/os/aros/os_defines.h gcc-4.6.4.new/libstdc++-v3/config/os/aros/os_defines.h
1469 --- gcc-4.6.4/libstdc++-v3/config/os/aros/os_defines.h 1969-12-31 19:00:00.000000000 -0500
1470 +++ gcc-4.6.4.new/libstdc++-v3/config/os/aros/os_defines.h 2013-12-02 20:22:15.944776326 -0500
1471 @@ -0,0 +1,6 @@
1472 +#ifndef _GLIBCXX_OS_DEFINES
1473 +#define _GLIBCXX_OS_DEFINES
1475 +#define __off64_t off_t
1477 +#endif
1478 diff -urN gcc-4.6.4/libstdc++-v3/configure gcc-4.6.4.new/libstdc++-v3/configure
1479 --- gcc-4.6.4/libstdc++-v3/configure 2012-07-22 12:46:02.000000000 -0400
1480 +++ gcc-4.6.4.new/libstdc++-v3/configure 2013-12-02 20:22:15.956776384 -0500
1481 @@ -5267,12 +5267,9 @@
1485 -if test "x${with_newlib}" != "xyes"; then
1486 - enable_dlopen=yes
1491 +#if test "x${with_newlib}" != "xyes"; then
1492 +# AC_LIBTOOL_DLOPEN
1493 +#fi
1494 case `pwd` in
1495 *\ * | *\ *)
1496 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
1497 @@ -7990,6 +7987,8 @@
1501 + enable_dlopen=no
1504 enable_win32_dll=no
1506 @@ -18131,6 +18130,7 @@
1508 struct iovec iov[2];
1509 writev(0, iov, 0);
1510 +#error be sure to fail
1512 return 0;
1514 @@ -18153,6 +18153,7 @@
1516 struct iovec iov[2];
1517 writev(0, iov, 0);
1518 +#error be sure to fail
1520 return 0;
1522 @@ -26562,6 +26563,58 @@
1524 # Base decisions on target environment.
1525 case "${host}" in
1526 + *-aros*)
1527 + for ac_header in nan.h ieeefp.h endian.h sys/isa_defs.h machine/endian.h \
1528 + machine/param.h sys/machine.h sys/types.h fp.h locale.h float.h inttypes.h
1529 +do :
1530 + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
1531 +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
1532 +eval as_val=\$$as_ac_Header
1533 + if test "x$as_val" = x""yes; then :
1534 + cat >>confdefs.h <<_ACEOF
1535 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
1536 +_ACEOF
1540 +done
1543 + GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
1544 + GLIBCXX_CHECK_WCHAR_T_SUPPORT
1546 + $as_echo "#define HAVE_FINITE 1" >>confdefs.h
1548 + $as_echo "#define HAVE_FINITEF 1" >>confdefs.h
1550 + $as_echo "#define HAVE_FREXPF 1" >>confdefs.h
1552 + $as_echo "#define HAVE_HYPOTF 1" >>confdefs.h
1554 + $as_echo "#define HAVE_ISINF 1" >>confdefs.h
1556 + $as_echo "#define HAVE_ISINFF 1" >>confdefs.h
1558 + $as_echo "#define HAVE_ISNAN 1" >>confdefs.h
1560 + $as_echo "#define HAVE_ISNANF 1" >>confdefs.h
1562 + $as_echo "#define HAVE_SINCOS 1" >>confdefs.h
1564 + $as_echo "#define HAVE_SINCOSF 1" >>confdefs.h
1566 + if test x"long_double_math_on_this_cpu" = x"yes"; then
1567 + $as_echo "#define HAVE_FINITEL 1" >>confdefs.h
1569 + $as_echo "#define HAVE_HYPOTL 1" >>confdefs.h
1571 + $as_echo "#define HAVE_ISINFL 1" >>confdefs.h
1573 + $as_echo "#define HAVE_ISNANL 1" >>confdefs.h
1575 + fi
1576 + ;;
1578 arm*-*-symbianelf*)
1579 # This is a freestanding configuration; there is nothing to do here.
1581 diff -urN gcc-4.6.4/libstdc++-v3/configure.ac gcc-4.6.4.new/libstdc++-v3/configure.ac
1582 --- gcc-4.6.4/libstdc++-v3/configure.ac 2012-07-22 12:46:02.000000000 -0400
1583 +++ gcc-4.6.4.new/libstdc++-v3/configure.ac 2013-12-02 20:22:15.956776384 -0500
1584 @@ -88,9 +88,9 @@
1585 # up critical shell variables.
1586 GLIBCXX_CONFIGURE
1588 -if test "x${with_newlib}" != "xyes"; then
1589 - AC_LIBTOOL_DLOPEN
1591 +#if test "x${with_newlib}" != "xyes"; then
1592 +# AC_LIBTOOL_DLOPEN
1593 +#fi
1594 AM_PROG_LIBTOOL
1595 ACX_LT_HOST_FLAGS
1596 AC_SUBST(enable_shared)
1597 diff -urN gcc-4.6.4/libstdc++-v3/configure.host gcc-4.6.4.new/libstdc++-v3/configure.host
1598 --- gcc-4.6.4/libstdc++-v3/configure.host 2010-12-05 19:50:04.000000000 -0500
1599 +++ gcc-4.6.4.new/libstdc++-v3/configure.host 2013-12-02 20:22:15.956776384 -0500
1600 @@ -203,6 +203,9 @@
1601 os_include_dir="os/generic"
1602 atomicity_dir="cpu/generic"
1604 + aros*)
1605 + os_include_dir="os/aros"
1606 + ;;
1607 bsd*)
1608 # Plain BSD attempts to share FreeBSD files.
1609 os_include_dir="os/bsd/freebsd"
1610 diff -urN gcc-4.6.4/libstdc++-v3/crossconfig.m4 gcc-4.6.4.new/libstdc++-v3/crossconfig.m4
1611 --- gcc-4.6.4/libstdc++-v3/crossconfig.m4 2011-02-04 02:26:57.000000000 -0500
1612 +++ gcc-4.6.4.new/libstdc++-v3/crossconfig.m4 2013-12-02 20:22:15.956776384 -0500
1613 @@ -5,6 +5,31 @@
1614 AC_DEFUN([GLIBCXX_CROSSCONFIG],[
1615 # Base decisions on target environment.
1616 case "${host}" in
1617 + *-aros*)
1618 + AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h machine/endian.h \
1619 + machine/param.h sys/machine.h sys/types.h fp.h locale.h float.h inttypes.h])
1621 + GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
1622 + GLIBCXX_CHECK_WCHAR_T_SUPPORT
1624 + AC_DEFINE(HAVE_FINITE)
1625 + AC_DEFINE(HAVE_FINITEF)
1626 + AC_DEFINE(HAVE_FREXPF)
1627 + AC_DEFINE(HAVE_HYPOTF)
1628 + AC_DEFINE(HAVE_ISINF)
1629 + AC_DEFINE(HAVE_ISINFF)
1630 + AC_DEFINE(HAVE_ISNAN)
1631 + AC_DEFINE(HAVE_ISNANF)
1632 + AC_DEFINE(HAVE_SINCOS)
1633 + AC_DEFINE(HAVE_SINCOSF)
1634 + if test x"long_double_math_on_this_cpu" = x"yes"; then
1635 + AC_DEFINE(HAVE_FINITEL)
1636 + AC_DEFINE(HAVE_HYPOTL)
1637 + AC_DEFINE(HAVE_ISINFL)
1638 + AC_DEFINE(HAVE_ISNANL)
1639 + fi
1640 + ;;
1642 arm*-*-symbianelf*)
1643 # This is a freestanding configuration; there is nothing to do here.