From 8134c4eb9998aed469a492ac1ce9408d167b9444 Mon Sep 17 00:00:00 2001 From: NicJA Date: Sun, 25 Jan 2015 04:05:03 +0000 Subject: [PATCH] wip commit of patch for gcc 5 git-svn-id: https://svn.aros.org/svn/aros/trunk/AROS@49937 fb15a70f-31f2-0310-bbcc-cdcc74a49acc --- tools/crosstools/gcc-5-20150111-aros.diff | 1769 +++++++++++++++++++++++++++++ 1 file changed, 1769 insertions(+) create mode 100644 tools/crosstools/gcc-5-20150111-aros.diff diff --git a/tools/crosstools/gcc-5-20150111-aros.diff b/tools/crosstools/gcc-5-20150111-aros.diff new file mode 100644 index 0000000000..6de4a93af2 --- /dev/null +++ b/tools/crosstools/gcc-5-20150111-aros.diff @@ -0,0 +1,1769 @@ +diff -ruN gcc-5-20150111/configure gcc-5-20150111.aros/configure +--- gcc-5-20150111/configure 2013-09-03 13:13:42.000000000 +0100 ++++ gcc-5-20150111.aros/configure 2015-01-15 19:51:28.109870237 +0000 +@@ -3730,6 +3730,9 @@ + powerpcle-*-solaris*) + noconfigdirs="$noconfigdirs gdb sim tcl tk itcl" + ;; ++ *-*-aros*) ++ noconfigdirs="$noconfigdirs patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl tix gnuserv gdb" ++ ;; + powerpc-*-beos*) + noconfigdirs="$noconfigdirs gdb" + ;; +@@ -3852,6 +3855,8 @@ + rs6000-*-aix*) + host_makefile_frag="config/mh-ppc-aix" + ;; ++ *-*-aros*) ++ ;; + esac + fi + +diff -ruN gcc-5-20150111/configure.ac gcc-5-20150111.aros/configure.ac +--- gcc-5-20150111/configure.ac 2013-09-03 13:13:42.000000000 +0100 ++++ gcc-5-20150111.aros/configure.ac 2015-01-15 19:51:28.109870237 +0000 +@@ -1069,6 +1069,9 @@ + powerpcle-*-solaris*) + noconfigdirs="$noconfigdirs gdb sim tcl tk itcl" + ;; ++ *-*-aros*) ++ noconfigdirs="$noconfigdirs patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl tix gnuserv gdb" ++ ;; + powerpc-*-beos*) + noconfigdirs="$noconfigdirs gdb" + ;; +@@ -1172,6 +1175,8 @@ + rs6000-*-aix*) + host_makefile_frag="config/mh-ppc-aix" + ;; ++ *-*-aros*) ++ ;; + esac + fi + +diff -ruN gcc-5-20150111/fixincludes/configure gcc-5-20150111.aros/fixincludes/configure +--- gcc-5-20150111/fixincludes/configure 2012-05-29 20:28:57.000000000 +0100 ++++ gcc-5-20150111.aros/fixincludes/configure 2015-01-15 19:51:28.109870237 +0000 +@@ -4712,6 +4712,7 @@ + fi + else + case $host in ++ *-*-aros* | \ + i?86-*-msdosdjgpp* | \ + i?86-*-mingw32* | \ + x86_64-*-mingw32* | \ +diff -ruN gcc-5-20150111/fixincludes/configure.ac gcc-5-20150111.aros/fixincludes/configure.ac +--- gcc-5-20150111/fixincludes/configure.ac 2012-05-29 20:28:57.000000000 +0100 ++++ gcc-5-20150111.aros/fixincludes/configure.ac 2015-01-15 19:51:28.109870237 +0000 +@@ -50,6 +50,7 @@ + TARGET=oneprocess + fi], + [case $host in ++ *-*-aros* | \ + i?86-*-msdosdjgpp* | \ + i?86-*-mingw32* | \ + x86_64-*-mingw32* | \ +diff -ruN gcc-5-20150111/gcc/config/arm/aros.h gcc-5-20150111.aros/gcc/config/arm/aros.h +--- gcc-5-20150111/gcc/config/arm/aros.h 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-5-20150111.aros/gcc/config/arm/aros.h 2015-01-15 19:51:28.109870237 +0000 +@@ -0,0 +1,82 @@ ++/* Configuration file for ARM AROS EABI targets. ++ Copyright (C) 2004, 2005, 2006, 2007, 2010 ++ Free Software Foundation, Inc. ++ Contributed by Pavel Fedin ++ Based on linux-eabi.h and other AROS targets ++ ++ This file is part of GCC. ++ ++ GCC is free software; you can redistribute it and/or modify it ++ under the terms of the GNU General Public License as published ++ by the Free Software Foundation; either version 3, or (at your ++ option) any later version. ++ ++ GCC is distributed in the hope that it will be useful, but WITHOUT ++ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public ++ License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with GCC; see the file COPYING3. If not see ++ . */ ++ ++/* On EABI GNU/Linux, we want both the BPABI builtins and the ++ GNU/Linux builtins. */ ++#undef TARGET_OS_CPP_BUILTINS ++#define TARGET_OS_CPP_BUILTINS() \ ++ do \ ++ { \ ++ TARGET_BPABI_CPP_BUILTINS(); \ ++ builtin_define_std ("AROS"); \ ++ builtin_define ("AMIGA"); \ ++ builtin_define ("_AMIGA"); \ ++ builtin_assert ("system=posix"); \ ++ if (flag_pic) \ ++ { \ ++ builtin_define ("__PIC__"); \ ++ builtin_define ("__pic__"); \ ++ } \ ++ } \ ++ while (false) ++ ++/* We default to a softfp ABI so that we are compatible ++ with the Linux EABI (as used by the linker). */ ++#undef TARGET_DEFAULT_FLOAT_ABI ++#define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_SOFTFP ++ ++/* We default to the "aapcs-linux" ABI so that enums are int-sized by ++ default. */ ++#undef ARM_DEFAULT_ABI ++#define ARM_DEFAULT_ABI ARM_ABI_AAPCS_LINUX ++ ++/* Default to armv5t so that thumb shared libraries work. ++ The ARM10TDMI core is the default for armv5t, so set ++ SUBTARGET_CPU_DEFAULT to achieve this. */ ++#undef SUBTARGET_CPU_DEFAULT ++#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi ++ ++/* TARGET_BIG_ENDIAN_DEFAULT is set in ++ config.gcc for big endian configurations. */ ++#undef TARGET_LINKER_EMULATION ++#if TARGET_BIG_ENDIAN_DEFAULT ++#define TARGET_LINKER_EMULATION "armelfb_aros" ++#else ++#define TARGET_LINKER_EMULATION "armelf_aros" ++#endif ++ ++#undef SUBTARGET_CPP_SPEC ++#define SUBTARGET_CPP_SPEC "-D__ELF__ %{!nostdinc:-isystem %R/include%{!nostdc:%{!noposixc: -isystem %R/include/aros/posixc} -isystem %R/include/aros/stdc}}" ++ ++#undef SUBTARGET_EXTRA_LINK_SPEC ++#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION ++ ++/* Provide a LINK_SPEC appropriate for AROS. */ ++#undef LINK_SPEC ++#define LINK_SPEC "-m armelf_aros -L %R/lib" ++ ++/* Use own supplement to libgcc. */ ++#undef LIBGCC_SPEC ++#define LIBGCC_SPEC "-laeabi -lgcc" ++ ++/* FIXME: AROS doesn't support dw2 unwinding yet. */ ++#undef MD_FALLBACK_FRAME_STATE_FOR +diff -ruN gcc-5-20150111/gcc/config/arm/t-aros gcc-5-20150111.aros/gcc/config/arm/t-aros +--- gcc-5-20150111/gcc/config/arm/t-aros 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-5-20150111.aros/gcc/config/arm/t-aros 2015-01-15 19:51:28.109870237 +0000 +@@ -0,0 +1,21 @@ ++# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, ++# 2008, 2010 Free Software Foundation, Inc. ++# ++# This file is part of GCC. ++# ++# GCC is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 3, or (at your option) ++# any later version. ++# ++# GCC is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with GCC; see the file COPYING3. If not see ++# . ++ ++MULTILIB_OPTIONS = marm mfloat-abi=hard ++MULTILIB_DIRNAMES = arm fpu +diff -ruN gcc-5-20150111/gcc/config/aros.h gcc-5-20150111.aros/gcc/config/aros.h +--- gcc-5-20150111/gcc/config/aros.h 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-5-20150111.aros/gcc/config/aros.h 2015-01-15 19:51:28.109870237 +0000 +@@ -0,0 +1,109 @@ ++/* Definitions for AROS ++ Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. ++ Contributed by Fabio Alemagna ++ Based upon linux.h, contributed by Eric Youngdale. ++ ++This file is part of GNU CC. ++ ++GNU CC is free software; you can redistribute it and/or modify ++it under the terms of the GNU General Public License as published by ++the Free Software Foundation; either version 2, or (at your option) ++any later version. ++ ++GNU CC is distributed in the hope that it will be useful, ++but WITHOUT ANY WARRANTY; without even the implied warranty of ++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++GNU General Public License for more details. ++ ++You should have received a copy of the GNU General Public License ++along with GNU CC; see the file COPYING. If not, write to ++the Free Software Foundation, 59 Temple Place - Suite 330, ++Boston, MA 02111-1307, USA. */ ++ ++/* Don't assume anything about the header files. */ ++#define NO_IMPLICIT_EXTERN_C ++ ++#undef SIZE_TYPE ++#define SIZE_TYPE "long unsigned int" ++ ++#undef WCHAR_TYPE ++#define WCHAR_TYPE "char" ++ ++#undef WCHAR_TYPE_SIZE ++#define WCHAR_TYPE_SIZE 8 ++ ++#undef PTRDIFF_TYPE ++#define PTRDIFF_TYPE "long int" ++ ++#undef TARGET_OS_CPP_BUILTINS ++#define TARGET_OS_CPP_BUILTINS() \ ++ do \ ++ { \ ++ builtin_define_std ("AROS"); \ ++ builtin_define ("AMIGA"); \ ++ builtin_define ("_AMIGA"); \ ++ builtin_define ("__ELF__"); \ ++ builtin_assert ("system=posix"); \ ++ } \ ++ while (0) ++ ++#undef ASM_APP_ON ++#define ASM_APP_ON "#APP\n" ++ ++#undef ASM_APP_OFF ++#define ASM_APP_OFF "#NO_APP\n" ++ ++#undef MD_EXEC_PREFIX ++#undef MD_STARTFILE_PREFIX ++ ++/* Provide a STARTFILE_SPEC appropriate for AROS. AROS has its own ++ set of startup files which also take care of handling C++ ++ constructors/destructors. */ ++ ++#undef STARTFILE_SPEC ++#define STARTFILE_SPEC \ ++ "startup.o%s %{detach:detach.o%s} %{nix:nixmain.o%s}" ++ ++/* Provide a ENDFILE_SPEC appropriate for AROS. */ ++ ++#undef ENDFILE_SPEC ++#define ENDFILE_SPEC \ ++ "-lautoinit" ++ ++#undef INCLUDE_DEFAULTS ++#define INCLUDE_DEFAULTS \ ++{ \ ++ { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, 0, 0 }, \ ++ { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, 0, 1 }, \ ++ { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, 0, 0 }, \ ++ { "/local/include", 0, 0, 1, 1, 0 }, \ ++ { GCC_INCLUDE_DIR, "GCC", 0, 0, 0, 0 }, \ ++ { NATIVE_SYSTEM_HEADER_DIR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 0, 0 }, \ ++ { 0, 0, 0, 0, 0, 0 } \ ++}; \ ++ ++#undef CPP_SPEC ++#define CPP_SPEC "%(cpp_cpu) %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT} %{nix:-D__NIX__} %{!nostdinc:%{!nostdc:%{!noposixc:-isystem %R/include/aros/posixc} -isystem %R/include/aros/stdc} -isystem %R/include}" ++ ++/* This is for -profile to use -lc_p instead of -lc. */ ++#ifndef CC1_SPEC ++#define CC1_SPEC "%{profile:-p}" ++#endif ++ ++/* The GNU C++ standard library requires that these macros be defined. */ ++#undef CPLUSPLUS_CPP_SPEC ++#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)" ++ ++#undef LIB_SPEC ++#define LIB_SPEC \ ++ "-lmui -lpthread -larossupport -lamiga %{!nostdc:%{!noposixc:-lposixc} -lstdcio -lstdc} -lcodesets -lkeymap -lexpansion -lcommodities -ldiskfont -lasl -lmuimaster -ldatatypes -lcybergraphics -lworkbench -licon -lintuition -lgadtools -llayers -laros -lpartition -liffparse -lgraphics -llocale -ldos -lutility -loop %{!nosysbase:-lexec} -lautoinit -llibinit -lautoinit %{nostdc:-lstdc.static}" ++ ++#if !defined(USE_GNULIBC_1) && defined(HAVE_LD_EH_FRAME_HDR) ++#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} " ++#endif ++ ++/* AROS uses its own collect-like program for the moment. */ ++#undef LINKER_NAME ++#define LINKER_NAME "collect-aros" ++ ++#define TARGET_HAS_F_SETLKW +diff -ruN gcc-5-20150111/gcc/config/i386/aros64.h gcc-5-20150111.aros/gcc/config/i386/aros64.h +--- gcc-5-20150111/gcc/config/i386/aros64.h 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-5-20150111.aros/gcc/config/i386/aros64.h 2015-01-15 19:51:28.109870237 +0000 +@@ -0,0 +1,34 @@ ++/* Definitions for AMD x86_64 running AROS systems with ELF64 format. ++ Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 ++ Free Software Foundation, Inc. ++ Contributed by Stanislaw Szymczyk . Based on aros.h. ++ ++This file is part of GNU CC. ++ ++GNU CC is free software; you can redistribute it and/or modify ++it under the terms of the GNU General Public License as published by ++the Free Software Foundation; either version 2, or (at your option) ++any later version. ++ ++GNU CC is distributed in the hope that it will be useful, ++but WITHOUT ANY WARRANTY; without even the implied warranty of ++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++GNU General Public License for more details. ++ ++You should have received a copy of the GNU General Public License ++along with GNU CC; see the file COPYING. If not, write to ++the Free Software Foundation, 59 Temple Place - Suite 330, ++Boston, MA 02111-1307, USA. */ ++ ++/* The svr4 ABI for the i386 says that records and unions are returned ++ in memory. In the 64bit compilation we will turn this flag off in ++ override_options, as we never do pcc_struct_return scheme on this target. */ ++#undef DEFAULT_PCC_STRUCT_RETURN ++#define DEFAULT_PCC_STRUCT_RETURN 1 ++ ++/* Provide a LINK_SPEC appropriate for AROS. */ ++ ++#undef LINK_SPEC ++#define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} -L %R/lib" ++ ++/* FIXME: AROS doesn't support dw2 unwinding yet. */ +diff -ruN gcc-5-20150111/gcc/config/i386/aros.h gcc-5-20150111.aros/gcc/config/i386/aros.h +--- gcc-5-20150111/gcc/config/i386/aros.h 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-5-20150111.aros/gcc/config/i386/aros.h 2015-01-15 19:51:28.109870237 +0000 +@@ -0,0 +1,25 @@ ++/* Definitions for Intel 386 running AROS systems with ELF format. ++ Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 ++ Free Software Foundation, Inc. ++ Contributed by Fabio Alemagna. ++ Based upon i386/linux.h by Eric Youngdale. ++ ++This file is part of GNU CC. ++ ++GNU CC is free software; you can redistribute it and/or modify ++it under the terms of the GNU General Public License as published by ++the Free Software Foundation; either version 2, or (at your option) ++any later version. ++ ++GNU CC is distributed in the hope that it will be useful, ++but WITHOUT ANY WARRANTY; without even the implied warranty of ++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++GNU General Public License for more details. ++ ++You should have received a copy of the GNU General Public License ++along with GNU CC; see the file COPYING. If not, write to ++the Free Software Foundation, 59 Temple Place - Suite 330, ++Boston, MA 02111-1307, USA. */ ++ ++#undef LINK_SPEC ++#define LINK_SPEC "-m elf_i386 -L%R/lib" +diff -ruN gcc-5-20150111/gcc/config/m68k/m68k.c gcc-5-20150111.aros/gcc/config/m68k/m68k.c +--- gcc-5-20150111/gcc/config/m68k/m68k.c 2014-01-03 14:06:22.000000000 +0000 ++++ gcc-5-20150111.aros/gcc/config/m68k/m68k.c 2015-01-15 19:51:28.109870237 +0000 +@@ -4437,7 +4437,7 @@ + else if (letter == '/') + asm_fprintf (file, "%R"); + else if (letter == '?') +- asm_fprintf (file, m68k_library_id_string); ++ asm_fprintf (file, "%s", m68k_library_id_string); + else if (letter == 'p') + { + output_addr_const (file, op); +diff -ruN gcc-5-20150111/gcc/config/m68k/m68k.h gcc-5-20150111.aros/gcc/config/m68k/m68k.h +--- gcc-5-20150111/gcc/config/m68k/m68k.h 2013-01-10 20:38:27.000000000 +0000 ++++ gcc-5-20150111.aros/gcc/config/m68k/m68k.h 2015-01-15 19:51:28.109870237 +0000 +@@ -337,7 +337,9 @@ + register elimination. */ + #define FIRST_PSEUDO_REGISTER 25 + +-/* All m68k targets (except AmigaOS) use %a5 as the PIC register */ ++/* All m68k targets (except AmigaOS) use %a5 as the PIC register. ++ * On AmigaOS, we use %a4 ++ */ + #define PIC_OFFSET_TABLE_REGNUM \ + (!flag_pic ? INVALID_REGNUM \ + : reload_completed ? REGNO (pic_offset_table_rtx) \ +@@ -427,7 +429,8 @@ + /* Most m68k targets use %a6 as a frame pointer. The AmigaOS + ABI uses %a6 for shared library calls, therefore the frame + pointer is shifted to %a5 on this target. */ +-#define FRAME_POINTER_REGNUM A6_REG ++#define FRAME_POINTER_REGNUM A5_REG ++#define PIC_REG A4_REG + + /* Base register for access to arguments of the function. + * This isn't a hardware register. It will be eliminated to the +diff -ruN gcc-5-20150111/gcc/config/m68k/m68k.md gcc-5-20150111.aros/gcc/config/m68k/m68k.md +--- gcc-5-20150111/gcc/config/m68k/m68k.md 2013-01-10 20:38:27.000000000 +0000 ++++ gcc-5-20150111.aros/gcc/config/m68k/m68k.md 2015-01-15 19:51:28.109870237 +0000 +@@ -133,7 +133,8 @@ + [(D0_REG 0) + (A0_REG 8) + (A1_REG 9) +- (PIC_REG 13) ++ (A4_REG 12) ++ (A5_REG 13) + (A6_REG 14) + (SP_REG 15) + (FP0_REG 16) +@@ -7078,7 +7079,7 @@ + { + if (TARGET_ID_SHARED_LIBRARY) + { +- operands[1] = gen_rtx_REG (Pmode, PIC_REG); ++ operands[1] = gen_rtx_REG (Pmode, A4_REG); + return MOTOROLA ? "move.l %?(%1),%0" : "movel %1@(%?), %0"; + } + else if (MOTOROLA) +diff -ruN gcc-5-20150111/gcc/config/m68k/t-aros gcc-5-20150111.aros/gcc/config/m68k/t-aros +--- gcc-5-20150111/gcc/config/m68k/t-aros 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-5-20150111.aros/gcc/config/m68k/t-aros 2015-01-15 19:51:28.109870237 +0000 +@@ -0,0 +1,2 @@ ++# Custom multilibs for AROS ++M68K_MLIB_CPU += && match(MLIB, "^68") +diff -ruN gcc-5-20150111/gcc/config/rs6000/aros.h gcc-5-20150111.aros/gcc/config/rs6000/aros.h +--- gcc-5-20150111/gcc/config/rs6000/aros.h 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-5-20150111.aros/gcc/config/rs6000/aros.h 2015-01-15 19:51:28.109870237 +0000 +@@ -0,0 +1,151 @@ ++/* Definitions for Powerpc running AROS systems with ELF format. ++ Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 ++ Free Software Foundation, Inc. ++ Contributed by Markus Weiss. ++ Based upon i386/aros.h by Fabio Alemagna. ++ ++This file is part of GNU CC. ++ ++GNU CC is free software; you can redistribute it and/or modify ++it under the terms of the GNU General Public License as published by ++the Free Software Foundation; either version 2, or (at your option) ++any later version. ++ ++GNU CC is distributed in the hope that it will be useful, ++but WITHOUT ANY WARRANTY; without even the implied warranty of ++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++GNU General Public License for more details. ++ ++You should have received a copy of the GNU General Public License ++along with GNU CC; see the file COPYING. If not, write to ++the Free Software Foundation, 59 Temple Place - Suite 330, ++Boston, MA 02111-1307, USA. */ ++ ++/* Symbols missing in comparison to i386/aros.h are either ++ defined in elfos.h, rs6000/rs6000.h rs6000/sysv4.h ++ or not needed for PowerPC. ++*/ ++ ++/* We need to define __powerpc__. */ ++ ++#undef TARGET_OS_CPP_BUILTINS ++#define TARGET_OS_CPP_BUILTINS() \ ++ do \ ++ { \ ++ builtin_define_std ("AROS"); \ ++ builtin_define ("AMIGA"); \ ++ builtin_define ("_AMIGA"); \ ++ builtin_define ("__powerpc__"); \ ++ builtin_define ("__ELF__"); \ ++ builtin_assert ("system=posix"); \ ++ if (flag_pic) \ ++ { \ ++ builtin_define ("__PIC__"); \ ++ builtin_define ("__pic__"); \ ++ } \ ++ } \ ++ while (0) ++ ++/* This one taken from linux.h. */ ++/* We are 32-bit all the time, so optimize a little. */ ++#undef TARGET_64BIT ++#define TARGET_64BIT 0 ++ ++/* The svr4 ABI for the i386 says that records and unions are returned ++ in memory. */ ++/*#undef DEFAULT_PCC_STRUCT_RETURN ++#define DEFAULT_PCC_STRUCT_RETURN 1 ++see rs6000/rs6000.h ++*/ ++ ++/* ++#undef ASM_COMMENT_START ++#define ASM_COMMENT_START "#" ++see rs6000/rs6000.h ++*/ ++ ++/* ++#undef DBX_REGISTER_NUMBER ++#define DBX_REGISTER_NUMBER(n) \ ++ (TARGET_64BIT ? dbx64_register_map[n] : svr4_dbx_register_map[n]) ++see rs6000/sysv4.h ++*/ ++ ++/* Output assembler code to FILE to call the profiler. ++ To the best of my knowledge, no Linux libc has required the label ++ argument to mcount. */ ++ ++/* ++#define NO_PROFILE_COUNTERS 1 ++not used by other similar ppc compilers ++only in darwin.h rs6000/linux64.h rs6000/rs6000.c ++*/ ++ ++/* ++#undef MCOUNT_NAME ++#define MCOUNT_NAME "mcount" ++see rs6000/sysv4.h RS6000_MCOUNT ++*/ ++ ++/* The GLIBC version of mcount for the x86 assumes that there is a ++ frame, so we cannot allow profiling without a frame pointer. */ ++/* ++#undef SUBTARGET_FRAME_POINTER_REQUIRED ++#define SUBTARGET_FRAME_POINTER_REQUIRED crtl->profile ++seems to be handled by rs6000/rs6000.h ++*/ ++ ++#undef CC1_SPEC ++#define CC1_SPEC "%(cc1_cpu) %{profile:-p}" ++ ++/* Provide a LINK_SPEC appropriate for AROS. */ ++ ++#undef LINK_SPEC ++#define LINK_SPEC "-m elf32ppc -L %R/lib" ++ ++/* A C statement (sans semicolon) to output to the stdio stream ++ FILE the assembler definition of uninitialized global DECL named ++ NAME whose size is SIZE bytes and alignment is ALIGN bytes. ++ Try to use asm_output_aligned_bss to implement this macro. */ ++/* ++#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \ ++ asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN) ++see rs6000/sysv4.h ++*/ ++ ++/* A C statement to output to the stdio stream FILE an assembler ++ command to advance the location counter to a multiple of 1<call_cookie |= CALL_LONG; + ++ cum->stackparm = fntype && lookup_attribute("stackparm", ++ TYPE_ATTRIBUTES(fntype)); ++ + if (TARGET_DEBUG_ARG) + { + fprintf (stderr, "\ninit_cumulative_args:"); +@@ -10104,6 +10109,9 @@ + + rs6000_discover_homogeneous_aggregate (mode, type, &elt_mode, &n_elts); + ++ if (cum->stackparm) ++ return NULL_RTX; ++ + if (TARGET_MACHO && rs6000_darwin64_struct_check_p (mode, type)) + { + rtx rslt = rs6000_darwin64_record_arg (cum, type, named, /*retval= */false); +@@ -10619,6 +10627,9 @@ + int first_reg_offset; + alias_set_type set; + ++ if (cum->stackparm) ++ return; ++ + /* Skip the last named argument. */ + next_cum = *get_cumulative_args (cum); + rs6000_function_arg_advance_1 (&next_cum, mode, type, true, 0); +diff -ruN gcc-5-20150111/gcc/config/rs6000/rs6000.h gcc-5-20150111.aros/gcc/config/rs6000/rs6000.h +--- gcc-5-20150111/gcc/config/rs6000/rs6000.h 2014-05-05 03:18:35.000000000 +0100 ++++ gcc-5-20150111.aros/gcc/config/rs6000/rs6000.h 2015-01-15 19:51:28.109870237 +0000 +@@ -1717,6 +1717,7 @@ + int nargs_prototype; /* # args left in the current prototype */ + int prototype; /* Whether a prototype was defined */ + int stdarg; /* Whether function is a stdarg function. */ ++ int stackparm; /* Whether function has all args on the stack */ + int call_cookie; /* Do special things for this call */ + int sysv_gregno; /* next available GP register */ + int intoffset; /* running offset in struct (darwin64) */ +diff -ruN gcc-5-20150111/gcc/config/t-aros gcc-5-20150111.aros/gcc/config/t-aros +--- gcc-5-20150111/gcc/config/t-aros 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-5-20150111.aros/gcc/config/t-aros 2015-01-15 19:51:28.109870237 +0000 +@@ -0,0 +1,29 @@ ++# In AROS, "/usr" is a four-letter word. ++# Must match NATIVE_SYSTEM_HEADER_COMPONENT in aros.h ! ++NATIVE_SYSTEM_HEADER_DIR = /include ++ ++# Don't add AROS target include path when compiling host compiler ++CPPFLAGS = ++ ++# Copy AROS specific include replacement files ++LIBGCC_DEPS += stmp-aros-hrds ++ ++EXTRA_AROS_HEADERS = aros/types/size_t.h aros/types/ptrdiff_t.h \ ++ aros/types/wchar_t.h aros/types/wint_t.h aros/types/null.h ++ ++stmp-int-hdrs : | include/aros/types ++ ++include/aros/types : $(addprefix $(srcdir)/ginclude/,$(EXTRA_AROS_HEADERS)) ++ -if [ -d include ] ; then true; else mkdir include; chmod a+rx include; fi ++ -if [ -d include/aros/types ] ; \ ++ then true; \ ++ else \ ++ mkdir include/aros; chmod a+rx include/aros; \ ++ mkdir include/aros/types; chmod a+rx include/aros/types; \ ++ fi ++ for file in $(EXTRA_AROS_HEADERS); do \ ++ $(STAMP) include/$$file; \ ++ rm -fr include/$$file; \ ++ cp $(srcdir)/ginclude/$$file include/$$file; \ ++ chmod a+r include/$$file; \ ++ done +diff -ruN gcc-5-20150111/gcc/config.build gcc-5-20150111.aros/gcc/config.build +--- gcc-5-20150111/gcc/config.build 2013-01-10 20:38:27.000000000 +0000 ++++ gcc-5-20150111.aros/gcc/config.build 2015-01-15 19:51:28.109870237 +0000 +@@ -102,6 +102,9 @@ + # HP 9000 series 300 + build_install_headers_dir=install-headers-cpio + ;; ++ *-*-aros*) ++ build_xm_file=xm-aros.h ++ ;; + *-*-sysv*) + # All other System V variants. + build_install_headers_dir=install-headers-cpio +diff -ruN gcc-5-20150111/gcc/config.gcc gcc-5-20150111.aros/gcc/config.gcc +--- gcc-5-20150111/gcc/config.gcc 2014-05-06 16:29:04.000000000 +0100 ++++ gcc-5-20150111.aros/gcc/config.gcc 2015-01-15 19:51:28.109870237 +0000 +@@ -774,6 +774,14 @@ + ;; + esac + ;; ++*-*-aros*) ++ gas=yes ++ gnu_ld=yes ++ thread_file=posix ++ use_collect2=no ++ xm_defines='STDC_HEADERS=1' ++ ;; ++ + *-*-openbsd*) + tmake_file="t-openbsd" + case ${enable_threads} in +@@ -964,6 +972,16 @@ + tm_file="${tm_file} vms/vms.h alpha/vms.h" + tmake_file="${tmake_file} alpha/t-vms" + ;; ++arm*-*-aros*) ++ tm_file="dbxelf.h elfos.h arm/elf.h arm/bpabi.h aros.h arm/aros.h arm/aout.h arm/arm.h" ++ tm_file="$tm_file ../../libgcc/config/arm/bpabi-lib.h" ++ tmake_file="${tmake_file} arm/t-arm arm/t-arm-elf arm/t-arm-softfp arm/t-bpabi arm/t-aros t-aros" ++ xm_file="xm-aros.h" ++ # The BPABI long long divmod functions return a 128-bit value in ++ # registers r0-r3. Correctly modeling that requires the use of ++ # TImode. ++ need_64bit_hwint=yes ++ ;; + arc*-*-elf*) + extra_headers="arc-simd.h" + tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}" +@@ -1548,6 +1566,16 @@ + done + TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'` + ;; ++i[34567]86-*-aros*) ++ tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/i386elf.h aros.h i386/aros.h" ++ xm_file=xm-aros.h ++ tmake_file="${tmake_file} i386/t-i386elf t-aros" ++ ;; ++x86_64-*-aros*) ++ 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" ++ tmake_file="${tmake_file} i386/t-i386elf t-aros" ++ xm_file=xm-aros.h ++ ;; + i[34567]86-pc-msdosdjgpp*) + xm_file=i386/xm-djgpp.h + tm_file="dbxcoff.h ${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/djgpp.h i386/djgpp-stdint.h" +@@ -1855,6 +1883,16 @@ + thread_file='posix' + fi + ;; ++m68k-*-aros*) ++ default_m68k_cpu=68000 ++ default_cf_cpu=5206 ++ 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" ++ tm_file="${tm_file} aros.h" ++ tm_defines="${tm_defines} MOTOROLA=1" ++ tmake_file="m68k/t-floatlib m68k/t-m68kbare m68k/t-m68kelf" ++ tmake_file="$tmake_file m68k/t-aros m68k/t-mlibs t-aros" ++ extra_parts="crtbegin.o crtend.o" ++ ;; + m68k-*-elf* | fido-*-elf*) + case ${target} in + fido-*-elf*) +@@ -2075,6 +2113,13 @@ + extra_options="${extra_options} rs6000/sysv4.opt" + tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-rtems rs6000/t-ppccomm" + ;; ++powerpc-*-aros*) ++ tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h aros.h" ++ extra_options="${extra_options} rs6000/sysv4.opt" ++ tm_file="${tm_file} rs6000/aros.h" ++ xm_file=xm-aros.h ++ tmake_file="$tmake_file t-aros" ++ ;; + powerpc*-*-linux*) + tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h rs6000/sysv4.h" + extra_options="${extra_options} rs6000/sysv4.opt" +diff -ruN gcc-5-20150111/gcc/config.host gcc-5-20150111.aros/gcc/config.host +--- gcc-5-20150111/gcc/config.host 2013-01-10 20:38:27.000000000 +0000 ++++ gcc-5-20150111.aros/gcc/config.host 2015-01-15 19:51:28.109870237 +0000 +@@ -276,6 +276,10 @@ + out_host_hook_obj=host-hpux.o + host_xmake_file="${host_xmake_file} x-hpux" + ;; ++ *-*-aros*) ++ host_can_use_collect2=no ++ host_xm_file=xm-aros.h ++ ;; + *-*-*vms*) + host_xm_file="vms/xm-vms.h" + host_xmake_file=vms/x-vms +diff -ruN gcc-5-20150111/gcc/ginclude/aros/types/null.h gcc-5-20150111.aros/gcc/ginclude/aros/types/null.h +--- gcc-5-20150111/gcc/ginclude/aros/types/null.h 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-5-20150111.aros/gcc/ginclude/aros/types/null.h 2015-01-15 19:51:28.109870237 +0000 +@@ -0,0 +1,3 @@ ++/* Replace AROS' NULL definition with gcc's one */ ++#define __need_NULL ++#include +diff -ruN gcc-5-20150111/gcc/ginclude/aros/types/ptrdiff_t.h gcc-5-20150111.aros/gcc/ginclude/aros/types/ptrdiff_t.h +--- gcc-5-20150111/gcc/ginclude/aros/types/ptrdiff_t.h 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-5-20150111.aros/gcc/ginclude/aros/types/ptrdiff_t.h 2015-01-15 19:51:28.109870237 +0000 +@@ -0,0 +1,3 @@ ++/* Replace AROS' ptrdiff_t definition with gcc's one */ ++#define __need_ptrdiff_t ++#include +diff -ruN gcc-5-20150111/gcc/ginclude/aros/types/size_t.h gcc-5-20150111.aros/gcc/ginclude/aros/types/size_t.h +--- gcc-5-20150111/gcc/ginclude/aros/types/size_t.h 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-5-20150111.aros/gcc/ginclude/aros/types/size_t.h 2015-01-15 19:51:28.109870237 +0000 +@@ -0,0 +1,3 @@ ++/* Replace AROS' size_t definition with gcc's one */ ++#define __need_size_t ++#include +diff -ruN gcc-5-20150111/gcc/ginclude/aros/types/wchar_t.h gcc-5-20150111.aros/gcc/ginclude/aros/types/wchar_t.h +--- gcc-5-20150111/gcc/ginclude/aros/types/wchar_t.h 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-5-20150111.aros/gcc/ginclude/aros/types/wchar_t.h 2015-01-15 19:51:28.109870237 +0000 +@@ -0,0 +1,3 @@ ++/* Replace AROS' wchar_t definition with gcc's one */ ++#define __need_wchar_t ++#include +diff -ruN gcc-5-20150111/gcc/ginclude/aros/types/wint_t.h gcc-5-20150111.aros/gcc/ginclude/aros/types/wint_t.h +--- gcc-5-20150111/gcc/ginclude/aros/types/wint_t.h 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-5-20150111.aros/gcc/ginclude/aros/types/wint_t.h 2015-01-15 19:51:28.109870237 +0000 +@@ -0,0 +1,3 @@ ++/* Replace AROS' wint_t definition with gcc's one */ ++#define __need_wint_t ++#include +diff -ruN gcc-5-20150111/gcc/ginclude/stddef.h gcc-5-20150111.aros/gcc/ginclude/stddef.h +--- gcc-5-20150111/gcc/ginclude/stddef.h 2013-01-10 20:38:27.000000000 +0000 ++++ gcc-5-20150111.aros/gcc/ginclude/stddef.h 2015-01-15 19:51:28.109870237 +0000 +@@ -131,6 +131,7 @@ + #ifndef __PTRDIFF_T + #ifndef _PTRDIFF_T_ + #ifndef _BSD_PTRDIFF_T_ ++#ifndef _AROS_TYPES_PTRDIFF_T_H + #ifndef ___int_ptrdiff_t_h + #ifndef _GCC_PTRDIFF_T + #define _PTRDIFF_T +@@ -139,6 +140,7 @@ + #define __PTRDIFF_T + #define _PTRDIFF_T_ + #define _BSD_PTRDIFF_T_ ++#define _AROS_TYPES_PTRDIFF_T_H + #define ___int_ptrdiff_t_h + #define _GCC_PTRDIFF_T + #ifndef __PTRDIFF_TYPE__ +@@ -147,6 +149,7 @@ + typedef __PTRDIFF_TYPE__ ptrdiff_t; + #endif /* _GCC_PTRDIFF_T */ + #endif /* ___int_ptrdiff_t_h */ ++#endif /* _AROS_TYPES_PTRDIFF_T_H */ + #endif /* _BSD_PTRDIFF_T_ */ + #endif /* _PTRDIFF_T_ */ + #endif /* __PTRDIFF_T */ +@@ -173,6 +176,7 @@ + #ifndef __SIZE_T + #ifndef _SIZE_T_ + #ifndef _BSD_SIZE_T_ ++#ifndef _AROS_TYPES_SIZE_T_H + #ifndef _SIZE_T_DEFINED_ + #ifndef _SIZE_T_DEFINED + #ifndef _BSD_SIZE_T_DEFINED_ /* Darwin */ +@@ -190,6 +194,7 @@ + #define __SIZE_T + #define _SIZE_T_ + #define _BSD_SIZE_T_ ++#define _AROS_TYPES_SIZE_T_H + #define _SIZE_T_DEFINED_ + #define _SIZE_T_DEFINED + #define _BSD_SIZE_T_DEFINED_ /* Darwin */ +@@ -222,6 +227,7 @@ + #endif /* _BSD_SIZE_T_DEFINED_ */ + #endif /* _SIZE_T_DEFINED */ + #endif /* _SIZE_T_DEFINED_ */ ++#endif /* _AROS_TYPES_SIZE_T_H */ + #endif /* _BSD_SIZE_T_ */ + #endif /* _SIZE_T_ */ + #endif /* __SIZE_T */ +diff -ruN gcc-5-20150111/include/filenames.h gcc-5-20150111.aros/include/filenames.h +--- gcc-5-20150111/include/filenames.h 2012-07-13 23:12:28.000000000 +0100 ++++ gcc-5-20150111.aros/include/filenames.h 2015-01-15 19:51:28.109870237 +0000 +@@ -42,6 +42,10 @@ + # define HAS_DRIVE_SPEC(f) HAS_DOS_DRIVE_SPEC (f) + # define IS_DIR_SEPARATOR(c) IS_DOS_DIR_SEPARATOR (c) + # define IS_ABSOLUTE_PATH(f) IS_DOS_ABSOLUTE_PATH (f) ++#elif defined __AROS__ ++# define IS_DIR_SEPARATOR(c) ((c) == '/' || (c) == ':') ++# define IS_ABSOLUTE_PATH(f) (IS_DIR_SEPARATOR((f)[0]) || (strchr((f), ':'))) ++# define HAVE_CASE_INSENSITIVE_FILE_SYSTEM + #else /* not DOSish */ + # if defined(__APPLE__) + # ifndef HAVE_CASE_INSENSITIVE_FILE_SYSTEM +diff -ruN gcc-5-20150111/libgcc/config.host gcc-5-20150111.aros/libgcc/config.host +--- gcc-5-20150111/libgcc/config.host 2014-03-20 16:12:30.000000000 +0000 ++++ gcc-5-20150111.aros/libgcc/config.host 2015-01-15 19:51:28.109870237 +0000 +@@ -681,7 +681,7 @@ + m32rle-*-linux*) + tmake_file="$tmake_file m32r/t-linux t-fdpbit" + ;; +-m68k-*-elf* | fido-*-elf) ++m68k-*-elf* | fido-*-elf | m68k-*-aros*) + tmake_file="$tmake_file m68k/t-floatlib" + ;; + m68k*-*-netbsdelf*) +@@ -1117,6 +1117,9 @@ + tmake_file="mep/t-mep t-fdpbit" + extra_parts="crtbegin.o crtend.o" + ;; ++*-*-aros*) ++ tmake_file= ++ ;; + *) + echo "*** Configuration ${host} not supported" 1>&2 + exit 1 +diff -ruN gcc-5-20150111/libgcc/gthr.h gcc-5-20150111.aros/libgcc/gthr.h +--- gcc-5-20150111/libgcc/gthr.h 2013-02-04 19:06:20.000000000 +0000 ++++ gcc-5-20150111.aros/libgcc/gthr.h 2015-01-15 19:51:28.109870237 +0000 +@@ -141,6 +141,11 @@ + #define GTHREAD_USE_WEAK 0 + #endif + ++#ifdef __AROS__ ++#undef GTHREAD_USE_WEAK ++#define GTHREAD_USE_WEAK 0 ++#endif ++ + #ifndef GTHREAD_USE_WEAK + #define GTHREAD_USE_WEAK 1 + #endif +diff -ruN gcc-5-20150111/libgcc/unwind-dw2-fde.c gcc-5-20150111.aros/libgcc/unwind-dw2-fde.c +--- gcc-5-20150111/libgcc/unwind-dw2-fde.c 2013-02-04 19:06:20.000000000 +0000 ++++ gcc-5-20150111.aros/libgcc/unwind-dw2-fde.c 2015-01-15 19:51:28.109870237 +0000 +@@ -92,12 +92,16 @@ + #endif + + init_object_mutex_once (); ++#ifndef __AROS__ /* This is called when SysBase is not yet set up */ + __gthread_mutex_lock (&object_mutex); ++#endif + + ob->next = unseen_objects; + unseen_objects = ob; + ++#ifndef __AROS__ + __gthread_mutex_unlock (&object_mutex); ++#endif + } + + void +diff -ruN gcc-5-20150111/libiberty/filename_cmp.c gcc-5-20150111.aros/libiberty/filename_cmp.c +--- gcc-5-20150111/libiberty/filename_cmp.c 2012-07-13 23:12:28.000000000 +0100 ++++ gcc-5-20150111.aros/libiberty/filename_cmp.c 2015-01-15 19:51:28.109870237 +0000 +@@ -50,9 +50,12 @@ + int + filename_cmp (const char *s1, const char *s2) + { +-#if !defined(HAVE_DOS_BASED_FILE_SYSTEM) \ +- && !defined(HAVE_CASE_INSENSITIVE_FILE_SYSTEM) ++#if !defined(HAVE_DOS_BASED_FILE_SYSTEM) ++#if defined(HAVE_CASE_INSENSITIVE_FILE_SYSTEM) ++ return strcasecmp(s1, s2); ++#else + return strcmp(s1, s2); ++#endif + #else + for (;;) + { +diff -ruN gcc-5-20150111/libobjc/configure gcc-5-20150111.aros/libobjc/configure +--- gcc-5-20150111/libobjc/configure 2014-04-04 14:53:39.000000000 +0100 ++++ gcc-5-20150111.aros/libobjc/configure 2015-01-15 19:51:28.109870237 +0000 +@@ -11256,214 +11256,7 @@ + # ----------- + + # Check if we have thread-local storage +- +- +- # Check whether --enable-tls was given. +-if test "${enable_tls+set}" = set; then : +- enableval=$enable_tls; +- case "$enableval" in +- yes|no) ;; +- *) as_fn_error "Argument to enable/disable tls must be yes or no" "$LINENO" 5 ;; +- esac +- +-else +- enable_tls=yes +-fi +- +- +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the target supports thread-local storage" >&5 +-$as_echo_n "checking whether the target supports thread-local storage... " >&6; } +-if test "${gcc_cv_have_tls+set}" = set; then : +- $as_echo_n "(cached) " >&6 +-else +- +- if test "$cross_compiling" = yes; then : +- if test x$gcc_no_link = xyes; then +- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5 +-fi +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-__thread int a; int b; int main() { return a = b; } +-_ACEOF +-if ac_fn_c_try_link "$LINENO"; then : +- chktls_save_LDFLAGS="$LDFLAGS" +- case $host in +- *-*-linux*) +- LDFLAGS="-shared -Wl,--no-undefined $LDFLAGS" +- ;; +- esac +- chktls_save_CFLAGS="$CFLAGS" +- CFLAGS="-fPIC $CFLAGS" +- if test x$gcc_no_link = xyes; then +- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5 +-fi +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-int f() { return 0; } +-_ACEOF +-if ac_fn_c_try_link "$LINENO"; then : +- if test x$gcc_no_link = xyes; then +- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5 +-fi +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-__thread int a; int b; int f() { return a = b; } +-_ACEOF +-if ac_fn_c_try_link "$LINENO"; then : +- gcc_cv_have_tls=yes +-else +- gcc_cv_have_tls=no +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +-else +- gcc_cv_have_tls=yes +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +- CFLAGS="$chktls_save_CFLAGS" +- LDFLAGS="$chktls_save_LDFLAGS" +-else +- gcc_cv_have_tls=no +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +- +- +-else +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-__thread int a; int b; int main() { return a = b; } +-_ACEOF +-if ac_fn_c_try_run "$LINENO"; then : +- chktls_save_LDFLAGS="$LDFLAGS" +- LDFLAGS="-static $LDFLAGS" +- if test x$gcc_no_link = xyes; then +- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5 +-fi +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-int main() { return 0; } +-_ACEOF +-if ac_fn_c_try_link "$LINENO"; then : +- if test "$cross_compiling" = yes; then : +- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +-as_fn_error "cannot run test program while cross compiling +-See \`config.log' for more details." "$LINENO" 5; } +-else +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-__thread int a; int b; int main() { return a = b; } +-_ACEOF +-if ac_fn_c_try_run "$LINENO"; then : +- gcc_cv_have_tls=yes +-else +- gcc_cv_have_tls=no +-fi +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ +- conftest.$ac_objext conftest.beam conftest.$ac_ext +-fi +- +-else +- gcc_cv_have_tls=yes +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +- LDFLAGS="$chktls_save_LDFLAGS" +- if test $gcc_cv_have_tls = yes; then +- chktls_save_CFLAGS="$CFLAGS" +- thread_CFLAGS=failed +- for flag in '' '-pthread' '-lpthread'; do +- CFLAGS="$flag $chktls_save_CFLAGS" +- if test x$gcc_no_link = xyes; then +- as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5 +-fi +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-#include +- void *g(void *d) { return NULL; } +-int +-main () +-{ +-pthread_t t; pthread_create(&t,NULL,g,NULL); +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_link "$LINENO"; then : +- thread_CFLAGS="$flag" +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +- if test "X$thread_CFLAGS" != Xfailed; then +- break +- fi +- done +- CFLAGS="$chktls_save_CFLAGS" +- if test "X$thread_CFLAGS" != Xfailed; then +- CFLAGS="$thread_CFLAGS $chktls_save_CFLAGS" +- if test "$cross_compiling" = yes; then : +- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +-as_fn_error "cannot run test program while cross compiling +-See \`config.log' for more details." "$LINENO" 5; } +-else +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-#include +- __thread int a; +- static int *volatile a_in_other_thread; +- static void * +- thread_func (void *arg) +- { +- a_in_other_thread = &a; +- return (void *)0; +- } +-int +-main () +-{ +-pthread_t thread; +- void *thread_retval; +- int *volatile a_in_main_thread; +- a_in_main_thread = &a; +- if (pthread_create (&thread, (pthread_attr_t *)0, +- thread_func, (void *)0)) +- return 0; +- if (pthread_join (thread, &thread_retval)) +- return 0; +- return (a_in_other_thread == a_in_main_thread); +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_run "$LINENO"; then : +- gcc_cv_have_tls=yes +-else +- gcc_cv_have_tls=no +-fi +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ +- conftest.$ac_objext conftest.beam conftest.$ac_ext +-fi +- +- CFLAGS="$chktls_save_CFLAGS" +- fi +- fi +-else +- gcc_cv_have_tls=no +-fi +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ +- conftest.$ac_objext conftest.beam conftest.$ac_ext +-fi +- +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_have_tls" >&5 +-$as_echo "$gcc_cv_have_tls" >&6; } +- if test "$enable_tls $gcc_cv_have_tls" = "yes yes"; then +- +-$as_echo "#define HAVE_TLS 1" >>confdefs.h +- +- fi ++#dnl GCC_ENABLE_TLS + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for exception model to use" >&5 + $as_echo_n "checking for exception model to use... " >&6; } +diff -ruN gcc-5-20150111/libobjc/configure.ac gcc-5-20150111.aros/libobjc/configure.ac +--- gcc-5-20150111/libobjc/configure.ac 2013-02-03 11:16:21.000000000 +0000 ++++ gcc-5-20150111.aros/libobjc/configure.ac 2015-01-15 19:51:28.109870237 +0000 +@@ -210,7 +210,7 @@ + # ----------- + + # Check if we have thread-local storage +-GCC_CHECK_TLS ++dnl GCC_CHECK_TLS + + AC_MSG_CHECKING([for exception model to use]) + AC_LANG_PUSH(C) +diff -ruN gcc-5-20150111/libobjc/thr.c gcc-5-20150111.aros/libobjc/thr.c +--- gcc-5-20150111/libobjc/thr.c 2013-02-03 11:16:21.000000000 +0000 ++++ gcc-5-20150111.aros/libobjc/thr.c 2015-01-15 19:51:28.109870237 +0000 +@@ -39,6 +39,7 @@ + #include "objc/runtime.h" + #include "objc-private/module-abi-8.h" + #include "objc-private/runtime.h" ++#define __typedef_BOOL /* Remove definition of BOOL */ + #include + + #include +diff -ruN gcc-5-20150111/libstdc++-v3/config/os/aros/ctype_base.h gcc-5-20150111.aros/libstdc++-v3/config/os/aros/ctype_base.h +--- gcc-5-20150111/libstdc++-v3/config/os/aros/ctype_base.h 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-5-20150111.aros/libstdc++-v3/config/os/aros/ctype_base.h 2015-01-15 19:51:28.109870237 +0000 +@@ -0,0 +1,27 @@ ++namespace std _GLIBCXX_VISIBILITY(default) ++{ ++_GLIBCXX_BEGIN_NAMESPACE_VERSION ++ ++struct ctype_base { ++ /* Non-standard typedefs */ ++ typedef int * __to_type; ++ ++ /* NB: Offsets into ctype::_M_table force a particular size ++ on the mask type. Because of this, we don't use an enum. */ ++ typedef unsigned short int mask; ++ ++ static const mask upper = _ISupper; ++ static const mask lower = _ISlower; ++ static const mask alpha = _ISalpha; ++ static const mask digit = _ISdigit; ++ static const mask xdigit = _ISxdigit; ++ static const mask space = _ISspace; ++ static const mask print = _ISprint; ++ static const mask graph = _ISgraph; ++ static const mask cntrl = _IScntrl; ++ static const mask punct = _ISpunct; ++ static const mask alnum = _ISalnum; ++}; ++ ++_GLIBCXX_END_NAMESPACE_VERSION ++} // namespace +diff -ruN gcc-5-20150111/libstdc++-v3/config/os/aros/ctype_configure_char.cc gcc-5-20150111.aros/libstdc++-v3/config/os/aros/ctype_configure_char.cc +--- gcc-5-20150111/libstdc++-v3/config/os/aros/ctype_configure_char.cc 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-5-20150111.aros/libstdc++-v3/config/os/aros/ctype_configure_char.cc 2015-01-15 19:51:28.109870237 +0000 +@@ -0,0 +1,99 @@ ++// Locale support -*- C++ -*- ++ ++// Copyright (C) 2011-2013 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library is free ++// software; you can redistribute it and/or modify it under the ++// terms of the GNU General Public License as published by the ++// Free Software Foundation; either version 3, or (at your option) ++// any later version. ++ ++// This library is distributed in the hope that it will be useful, ++// but WITHOUT ANY WARRANTY; without even the implied warranty of ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++// GNU General Public License for more details. ++ ++// Under Section 7 of GPL version 3, you are granted additional ++// permissions described in the GCC Runtime Library Exception, version ++// 3.1, as published by the Free Software Foundation. ++ ++// You should have received a copy of the GNU General Public License and ++// a copy of the GCC Runtime Library Exception along with this program; ++// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see ++// . ++ ++/** @file ctype_configure_char.cc */ ++ ++// ++// ISO C++ 14882: 22.1 Locales ++// ++ ++#include ++#include ++#include ++ ++namespace std _GLIBCXX_VISIBILITY(default) ++{ ++_GLIBCXX_BEGIN_NAMESPACE_VERSION ++ ++// Information as gleaned from /usr/include/ctype.h ++ ++ const ctype_base::mask* ++ ctype::classic_table() throw() ++ { return 0; } ++ ++ ctype::ctype(__c_locale, const mask* __table, bool __del, ++ size_t __refs) ++ : facet(__refs), _M_del(__table != 0 && __del), ++ _M_toupper(NULL), _M_tolower(NULL), ++ _M_table(__table ? __table : classic_table()) ++ { ++ memset(_M_widen, 0, sizeof(_M_widen)); ++ _M_widen_ok = 0; ++ memset(_M_narrow, 0, sizeof(_M_narrow)); ++ _M_narrow_ok = 0; ++ } ++ ++ ctype::ctype(const mask* __table, bool __del, size_t __refs) ++ : facet(__refs), _M_del(__table != 0 && __del), ++ _M_toupper(NULL), _M_tolower(NULL), ++ _M_table(__table ? __table : classic_table()) ++ { ++ memset(_M_widen, 0, sizeof(_M_widen)); ++ _M_widen_ok = 0; ++ memset(_M_narrow, 0, sizeof(_M_narrow)); ++ _M_narrow_ok = 0; ++ } ++ ++ char ++ ctype::do_toupper(char __c) const ++ { return ::toupper((int) __c); } ++ ++ const char* ++ ctype::do_toupper(char* __low, const char* __high) const ++ { ++ while (__low < __high) ++ { ++ *__low = ::toupper((int) *__low); ++ ++__low; ++ } ++ return __high; ++ } ++ ++ char ++ ctype::do_tolower(char __c) const ++ { return ::tolower((int) __c); } ++ ++ const char* ++ ctype::do_tolower(char* __low, const char* __high) const ++ { ++ while (__low < __high) ++ { ++ *__low = ::tolower((int) *__low); ++ ++__low; ++ } ++ return __high; ++ } ++ ++_GLIBCXX_END_NAMESPACE_VERSION ++} // namespace +diff -ruN gcc-5-20150111/libstdc++-v3/config/os/aros/ctype_inline.h gcc-5-20150111.aros/libstdc++-v3/config/os/aros/ctype_inline.h +--- gcc-5-20150111/libstdc++-v3/config/os/aros/ctype_inline.h 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-5-20150111.aros/libstdc++-v3/config/os/aros/ctype_inline.h 2015-01-15 19:51:28.109870237 +0000 +@@ -0,0 +1,173 @@ ++// Locale support -*- C++ -*- ++ ++// Copyright (C) 2000, 2003 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library is free ++// software; you can redistribute it and/or modify it under the ++// terms of the GNU General Public License as published by the ++// Free Software Foundation; either version 2, or (at your option) ++// any later version. ++ ++// This library is distributed in the hope that it will be useful, ++// but WITHOUT ANY WARRANTY; without even the implied warranty of ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++// GNU General Public License for more details. ++ ++// You should have received a copy of the GNU General Public License along ++// with this library; see the file COPYING. If not, write to the Free ++// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++/** @file ctype_inline.h ++ * This is an internal header file, included by other library headers. ++ * You should not attempt to use it directly. ++ */ ++ ++// ++// ISO C++ 14882: 22.1 Locales ++// ++ ++// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*) ++// functions go in ctype.cc ++ ++// The following definitions are portable, but insanely slow. If one ++// cares at all about performance, then specialized ctype ++// functionality should be added for the native os in question: see ++// the config/os/bits/ctype_*.h files. ++ ++// Constructing a synthetic "C" table should be seriously considered... ++ ++namespace std _GLIBCXX_VISIBILITY(default) ++{ ++_GLIBCXX_BEGIN_NAMESPACE_VERSION ++ ++ bool ++ ctype:: ++ is(mask __m, char __c) const ++ { ++ if (_M_table) ++ return _M_table[static_cast(__c)] & __m; ++ else ++ { ++ bool __ret = false; ++ const size_t __bitmasksize = 15; ++ size_t __bitcur = 0; // Lowest bitmask in ctype_base == 0 ++ for (; __bitcur <= __bitmasksize; ++__bitcur) ++ { ++ const mask __bit = static_cast(1 << __bitcur); ++ if (__m & __bit) ++ { ++ bool __testis; ++ switch (__bit) ++ { ++ case space: ++ __testis = isspace(__c); ++ break; ++ case print: ++ __testis = isprint(__c); ++ break; ++ case cntrl: ++ __testis = iscntrl(__c); ++ break; ++ case upper: ++ __testis = isupper(__c); ++ break; ++ case lower: ++ __testis = islower(__c); ++ break; ++ case alpha: ++ __testis = isalpha(__c); ++ break; ++ case digit: ++ __testis = isdigit(__c); ++ break; ++ case punct: ++ __testis = ispunct(__c); ++ break; ++ case xdigit: ++ __testis = isxdigit(__c); ++ break; ++ case alnum: ++ __testis = isalnum(__c); ++ break; ++ case graph: ++ __testis = isgraph(__c); ++ break; ++ default: ++ __testis = false; ++ break; ++ } ++ __ret |= __testis; ++ } ++ } ++ return __ret; ++ } ++ } ++ ++ const char* ++ ctype:: ++ is(const char* __low, const char* __high, mask* __vec) const ++ { ++ if (_M_table) ++ while (__low < __high) ++ *__vec++ = _M_table[static_cast(*__low++)]; ++ else ++ { ++ // Highest bitmask in ctype_base == 10. ++ const size_t __bitmasksize = 15; ++ for (;__low < __high; ++__vec, ++__low) ++ { ++ mask __m = 0; ++ // Lowest bitmask in ctype_base == 0 ++ size_t __i = 0; ++ for (;__i <= __bitmasksize; ++__i) ++ { ++ const mask __bit = static_cast(1 << __i); ++ if (this->is(__bit, *__low)) ++ __m |= __bit; ++ } ++ *__vec = __m; ++ } ++ } ++ return __high; ++ } ++ ++ const char* ++ ctype:: ++ scan_is(mask __m, const char* __low, const char* __high) const ++ { ++ if (_M_table) ++ while (__low < __high ++ && !(_M_table[static_cast(*__low)] & __m)) ++ ++__low; ++ else ++ while (__low < __high && !this->is(__m, *__low)) ++ ++__low; ++ return __low; ++ } ++ ++ const char* ++ ctype:: ++ scan_not(mask __m, const char* __low, const char* __high) const ++ { ++ if (_M_table) ++ while (__low < __high ++ && (_M_table[static_cast(*__low)] & __m) != 0) ++ ++__low; ++ else ++ while (__low < __high && this->is(__m, *__low) != 0) ++ ++__low; ++ return __low; ++ } ++ ++_GLIBCXX_END_NAMESPACE_VERSION ++} // namespace +diff -ruN gcc-5-20150111/libstdc++-v3/config/os/aros/ctype_noninline.h gcc-5-20150111.aros/libstdc++-v3/config/os/aros/ctype_noninline.h +--- gcc-5-20150111/libstdc++-v3/config/os/aros/ctype_noninline.h 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-5-20150111.aros/libstdc++-v3/config/os/aros/ctype_noninline.h 2015-01-15 19:51:28.109870237 +0000 +@@ -0,0 +1,56 @@ ++ const ctype_base::mask* ++ ctype::classic_table() throw() ++ { return *__ctype_b_ptr; } ++ ++ ctype::ctype(__c_locale, const mask* __table, bool __del, ++ size_t __refs) ++ : facet(__refs), _M_del(__table != 0 && __del), ++ _M_toupper(NULL), _M_tolower(NULL), ++ _M_table(__table ? __table : classic_table()) ++ { ++ memset(_M_widen, 0, sizeof(_M_widen)); ++ _M_widen_ok = 0; ++ memset(_M_narrow, 0, sizeof(_M_narrow)); ++ _M_narrow_ok = 0; ++ } ++ ++ ctype::ctype(const mask* __table, bool __del, size_t __refs) ++ : facet(__refs), _M_del(__table != 0 && __del), ++ _M_toupper(NULL), _M_tolower(NULL), ++ _M_table(__table ? __table : classic_table()) ++ { ++ memset(_M_widen, 0, sizeof(_M_widen)); ++ _M_widen_ok = 0; ++ memset(_M_narrow, 0, sizeof(_M_narrow)); ++ _M_narrow_ok = 0; ++ } ++ ++ char ++ ctype::do_toupper(char __c) const ++ { return ::toupper((int) __c); } ++ ++ const char* ++ ctype::do_toupper(char* __low, const char* __high) const ++ { ++ while (__low < __high) ++ { ++ *__low = ::toupper((int) *__low); ++ ++__low; ++ } ++ return __high; ++ } ++ ++ char ++ ctype::do_tolower(char __c) const ++ { return ::tolower((int) __c); } ++ ++ const char* ++ ctype::do_tolower(char* __low, const char* __high) const ++ { ++ while (__low < __high) ++ { ++ *__low = ::tolower((int) *__low); ++ ++__low; ++ } ++ return __high; ++ } +diff -ruN gcc-5-20150111/libstdc++-v3/config/os/aros/os_defines.h gcc-5-20150111.aros/libstdc++-v3/config/os/aros/os_defines.h +--- gcc-5-20150111/libstdc++-v3/config/os/aros/os_defines.h 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-5-20150111.aros/libstdc++-v3/config/os/aros/os_defines.h 2015-01-15 19:51:28.109870237 +0000 +@@ -0,0 +1,6 @@ ++#ifndef _GLIBCXX_OS_DEFINES ++#define _GLIBCXX_OS_DEFINES ++ ++#define __off64_t off_t ++ ++#endif +diff -ruN gcc-5-20150111/libstdc++-v3/configure gcc-5-20150111.aros/libstdc++-v3/configure +--- gcc-5-20150111/libstdc++-v3/configure 2014-04-04 14:53:39.000000000 +0100 ++++ gcc-5-20150111.aros/libstdc++-v3/configure 2015-01-15 19:51:28.109870237 +0000 +@@ -5288,12 +5288,12 @@ + + + # Libtool setup. +-if test "x${with_newlib}" != "xyes"; then +- enable_dlopen=yes +- +- +- +-fi ++#if test "x${with_newlib}" != "xyes"; then ++# AC_LIBTOOL_DLOPEN ++# ++# ++# ++#fi + case `pwd` in + *\ * | *\ *) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 +@@ -8024,6 +8024,8 @@ + + + ++ enable_dlopen=no ++ + + enable_win32_dll=no + +@@ -18572,6 +18574,7 @@ + { + struct iovec iov[2]; + writev(0, iov, 0); ++#error be sure to fail + ; + return 0; + } +@@ -18594,6 +18597,7 @@ + { + struct iovec iov[2]; + writev(0, iov, 0); ++#error be sure to fail + ; + return 0; + } +@@ -27615,6 +27619,58 @@ + + # Base decisions on target environment. + case "${host}" in ++ *-aros*) ++ for ac_header in nan.h ieeefp.h endian.h sys/isa_defs.h machine/endian.h \ ++ machine/param.h sys/machine.h sys/types.h fp.h locale.h float.h inttypes.h ++do : ++ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" ++eval as_val=\$$as_ac_Header ++ if test "x$as_val" = x""yes; then : ++ cat >>confdefs.h <<_ACEOF ++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 ++_ACEOF ++ ++fi ++ ++done ++ ++ ++ GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT ++ GLIBCXX_CHECK_WCHAR_T_SUPPORT ++ ++ $as_echo "#define HAVE_FINITE 1" >>confdefs.h ++ ++ $as_echo "#define HAVE_FINITEF 1" >>confdefs.h ++ ++ $as_echo "#define HAVE_FREXPF 1" >>confdefs.h ++ ++ $as_echo "#define HAVE_HYPOTF 1" >>confdefs.h ++ ++ $as_echo "#define HAVE_ISINF 1" >>confdefs.h ++ ++ $as_echo "#define HAVE_ISINFF 1" >>confdefs.h ++ ++ $as_echo "#define HAVE_ISNAN 1" >>confdefs.h ++ ++ $as_echo "#define HAVE_ISNANF 1" >>confdefs.h ++ ++ $as_echo "#define HAVE_SINCOS 1" >>confdefs.h ++ ++ $as_echo "#define HAVE_SINCOSF 1" >>confdefs.h ++ ++ if test x"long_double_math_on_this_cpu" = x"yes"; then ++ $as_echo "#define HAVE_FINITEL 1" >>confdefs.h ++ ++ $as_echo "#define HAVE_HYPOTL 1" >>confdefs.h ++ ++ $as_echo "#define HAVE_ISINFL 1" >>confdefs.h ++ ++ $as_echo "#define HAVE_ISNANL 1" >>confdefs.h ++ ++ fi ++ ;; ++ + arm*-*-symbianelf*) + # This is a freestanding configuration; there is nothing to do here. + ;; +diff -ruN gcc-5-20150111/libstdc++-v3/configure.ac gcc-5-20150111.aros/libstdc++-v3/configure.ac +--- gcc-5-20150111/libstdc++-v3/configure.ac 2013-04-09 21:47:55.000000000 +0100 ++++ gcc-5-20150111.aros/libstdc++-v3/configure.ac 2015-01-15 19:51:28.109870237 +0000 +@@ -89,9 +89,9 @@ + GLIBCXX_CONFIGURE + + # Libtool setup. +-if test "x${with_newlib}" != "xyes"; then +- AC_LIBTOOL_DLOPEN +-fi ++#if test "x${with_newlib}" != "xyes"; then ++# AC_LIBTOOL_DLOPEN ++#fi + AM_PROG_LIBTOOL + ACX_LT_HOST_FLAGS + AC_SUBST(enable_shared) +diff -ruN gcc-5-20150111/libstdc++-v3/configure.host gcc-5-20150111.aros/libstdc++-v3/configure.host +--- gcc-5-20150111/libstdc++-v3/configure.host 2013-06-19 02:18:38.000000000 +0100 ++++ gcc-5-20150111.aros/libstdc++-v3/configure.host 2015-01-15 19:51:28.109870237 +0000 +@@ -230,6 +230,9 @@ + os_include_dir="os/generic" + atomicity_dir="cpu/generic" + ;; ++ aros*) ++ os_include_dir="os/aros" ++ ;; + bsd*) + # Plain BSD attempts to share FreeBSD files. + os_include_dir="os/bsd/freebsd" +diff -ruN gcc-5-20150111/libstdc++-v3/crossconfig.m4 gcc-5-20150111.aros/libstdc++-v3/crossconfig.m4 +--- gcc-5-20150111/libstdc++-v3/crossconfig.m4 2012-05-02 20:34:31.000000000 +0100 ++++ gcc-5-20150111.aros/libstdc++-v3/crossconfig.m4 2015-01-15 19:51:28.109870237 +0000 +@@ -5,6 +5,31 @@ + AC_DEFUN([GLIBCXX_CROSSCONFIG],[ + # Base decisions on target environment. + case "${host}" in ++ *-aros*) ++ AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h machine/endian.h \ ++ machine/param.h sys/machine.h sys/types.h fp.h locale.h float.h inttypes.h]) ++ ++ GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT ++ GLIBCXX_CHECK_WCHAR_T_SUPPORT ++ ++ AC_DEFINE(HAVE_FINITE) ++ AC_DEFINE(HAVE_FINITEF) ++ AC_DEFINE(HAVE_FREXPF) ++ AC_DEFINE(HAVE_HYPOTF) ++ AC_DEFINE(HAVE_ISINF) ++ AC_DEFINE(HAVE_ISINFF) ++ AC_DEFINE(HAVE_ISNAN) ++ AC_DEFINE(HAVE_ISNANF) ++ AC_DEFINE(HAVE_SINCOS) ++ AC_DEFINE(HAVE_SINCOSF) ++ if test x"long_double_math_on_this_cpu" = x"yes"; then ++ AC_DEFINE(HAVE_FINITEL) ++ AC_DEFINE(HAVE_HYPOTL) ++ AC_DEFINE(HAVE_ISINFL) ++ AC_DEFINE(HAVE_ISNANL) ++ fi ++ ;; ++ + arm*-*-symbianelf*) + # This is a freestanding configuration; there is nothing to do here. + ;; +diff -ruN gcc-5-20150111/libstdc++-v3/include/Makefile.in gcc-5-20150111.aros/libstdc++-v3/include/Makefile.in +--- gcc-5-20150111/libstdc++-v3/include/Makefile.in 2013-07-31 20:29:13.000000000 +0100 ++++ gcc-5-20150111.aros/libstdc++-v3/include/Makefile.in 2015-01-15 19:51:28.109870237 +0000 +@@ -1536,6 +1536,7 @@ + -e '/^#/s/\(${uppercase}${uppercase}*\)/_GLIBCXX_\1/g' \ + -e 's/_GLIBCXX_SUPPORTS_WEAK/__GXX_WEAK__/g' \ + -e 's/_GLIBCXX___MINGW32_GLIBCXX___/__MINGW32__/g' \ ++ -e 's/_GLIBCXX___AROS__/__AROS__/g' \ + -e 's,^#include "\(.*\)",#include ,g' \ + < $< > $@ + +diff -ruN gcc-5-20150111/libstdc++-v3/include/std/ratio gcc-5-20150111.aros/libstdc++-v3/include/std/ratio +--- gcc-5-20150111/libstdc++-v3/include/std/ratio 2013-02-03 17:54:05.000000000 +0000 ++++ gcc-5-20150111.aros/libstdc++-v3/include/std/ratio 2015-01-15 19:51:28.109870237 +0000 +@@ -211,10 +211,10 @@ + { + private: + static_assert(__d != 0, "Internal library error"); +- static_assert(sizeof (uintmax_t) == sizeof (unsigned long long), +- "This library calls __builtin_clzll on uintmax_t, which " +- "is unsafe on your platform. Please complain to " +- "http://gcc.gnu.org/bugzilla/"); ++// static_assert(sizeof (uintmax_t) == sizeof (unsigned long long), ++// "This library calls __builtin_clzll on uintmax_t, which " ++// "is unsafe on your platform. Please complain to " ++// "http://gcc.gnu.org/bugzilla/"); + static constexpr int __shift = __builtin_clzll(__d); + static constexpr int __coshift_ = sizeof(uintmax_t) * 8 - __shift; + static constexpr int __coshift = (__shift != 0) ? __coshift_ : 0; -- 2.11.4.GIT