summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2018-01-08 21:29:15 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2018-01-08 21:29:15 +0000
commit2962566a50820212c62380c29ce082ad4a461984 (patch)
tree956c28bceb4adf2124ff179cd58db4a203b101f1
parentf8aad68778cdb783c3e3afb9732ae611e0a3d22f (diff)
downloadtoolchains-2962566a50820212c62380c29ce082ad4a461984.tar.gz
toolchains-2962566a50820212c62380c29ce082ad4a461984.tar.bz2
Update to gcc 6.1.0 using patches from github.com/sba1/adtools
-rw-r--r--ppc-amigaos/Makefile2
-rw-r--r--ppc-amigaos/recipes/patches/gcc/0001-Changes-for-AmigaOS-version-of-gcc.p456
-rw-r--r--ppc-amigaos/recipes/patches/gcc/0002-Added-new-function-attribute-lineartags-and-pragma-a.p68
-rw-r--r--ppc-amigaos/recipes/patches/gcc/0003-Disable-.machine-directive-generation.p24
-rw-r--r--ppc-amigaos/recipes/patches/gcc/0004-The-default-link-mode-is-static-for-AmigaOS.p16
-rw-r--r--ppc-amigaos/recipes/patches/gcc/0005-Disable-the-usage-of-dev-urandom-when-compiling-for-.p22
-rw-r--r--ppc-amigaos/recipes/patches/gcc/0006-Expand-arg-zero-on-AmigaOS-using-the-PROGDIR-assign.p14
-rw-r--r--ppc-amigaos/recipes/patches/gcc/0007-Some-AmigaOS-4.x-compability-changes-for-posix-threa.p85
-rw-r--r--ppc-amigaos/recipes/patches/gcc/0008-Added-libstc-support-for-AmigaOS.p624
-rw-r--r--ppc-amigaos/recipes/patches/gcc/0009-Added-e500-support-for-AmigaOS.p31
10 files changed, 1050 insertions, 292 deletions
diff --git a/ppc-amigaos/Makefile b/ppc-amigaos/Makefile
index b0eecaf..1ba034e 100644
--- a/ppc-amigaos/Makefile
+++ b/ppc-amigaos/Makefile
@@ -1,4 +1,4 @@
-UPSTREAM_GCC_VERSION := 5.3.0
+UPSTREAM_GCC_VERSION := 6.1.0
UPSTREAM_GCC_TARBALL := gcc-$(UPSTREAM_GCC_VERSION).tar.bz2
UPSTREAM_GCC_URI := http://ftp.gnu.org/gnu/gcc/gcc-$(UPSTREAM_GCC_VERSION)/$(UPSTREAM_GCC_TARBALL)
diff --git a/ppc-amigaos/recipes/patches/gcc/0001-Changes-for-AmigaOS-version-of-gcc.p b/ppc-amigaos/recipes/patches/gcc/0001-Changes-for-AmigaOS-version-of-gcc.p
index 98441d3..3c45168 100644
--- a/ppc-amigaos/recipes/patches/gcc/0001-Changes-for-AmigaOS-version-of-gcc.p
+++ b/ppc-amigaos/recipes/patches/gcc/0001-Changes-for-AmigaOS-version-of-gcc.p
@@ -1,7 +1,7 @@
-From eecb39df390b5b8cd36a8a417f61d4afba24c187 Mon Sep 17 00:00:00 2001
+From 9b5e45b7156520dca8a4b652a7e628899cd8e4ca Mon Sep 17 00:00:00 2001
From: Sebastian Bauer <mail@sebastianbauer.info>
Date: Tue, 17 Feb 2015 20:25:55 +0100
-Subject: [PATCH 1/6] Changes for AmigaOS version of gcc.
+Subject: [PATCH 1/9] Changes for AmigaOS version of gcc.
---
fixincludes/configure | 1 +
@@ -12,8 +12,8 @@ Subject: [PATCH 1/6] Changes for AmigaOS version of gcc.
gcc/config.gcc | 8 +
gcc/config.host | 6 +
gcc/config/rs6000/amigaos-protos.h | 41 +
- gcc/config/rs6000/amigaos.c | 466 +++++++++
- gcc/config/rs6000/amigaos.h | 431 ++++++++
+ gcc/config/rs6000/amigaos.c | 463 +++++++++
+ gcc/config/rs6000/amigaos.h | 426 ++++++++
gcc/config/rs6000/amigaos.opt | 37 +
gcc/config/rs6000/rs6000-builtin.def | 7 +
gcc/config/rs6000/rs6000.c | 176 +++-
@@ -21,8 +21,8 @@ Subject: [PATCH 1/6] Changes for AmigaOS version of gcc.
gcc/config/rs6000/rs6000.md | 27 +-
gcc/config/rs6000/t-amigaos | 20 +
gcc/cp/typeck.c | 16 +
- gcc/doc/extend.texi | 167 +++
- gcc/doc/invoke.texi | 136 +++
+ gcc/doc/extend.texi | 168 +++
+ gcc/doc/invoke.texi | 161 +++
gcc/expr.c | 1 -
gcc/gcc.c | 12 +-
gcc/prefix.c | 2 +-
@@ -43,7 +43,7 @@ Subject: [PATCH 1/6] Changes for AmigaOS version of gcc.
libstdc++-v3/crossconfig.m4 | 8 +
libstdc++-v3/include/c_global/cstddef | 3 +
libstdc++-v3/include/c_std/cstddef | 3 +
- 39 files changed, 3879 insertions(+), 77 deletions(-)
+ 39 files changed, 3897 insertions(+), 77 deletions(-)
create mode 100644 gcc/config/rs6000/amigaos-protos.h
create mode 100644 gcc/config/rs6000/amigaos.c
create mode 100644 gcc/config/rs6000/amigaos.h
@@ -54,8 +54,8 @@ Subject: [PATCH 1/6] Changes for AmigaOS version of gcc.
diff --git a/fixincludes/configure b/fixincludes/configure
index 4836cd886537e9cdf73ef2bb064bfa581fc1068a..6bee1a37ee30a1c12a8f41f05c21d956d1be1a09 100755
---- fixincludes/configure
-+++ fixincludes/configure
+--- a/fixincludes/configure
++++ b/fixincludes/configure
@@ -4712,12 +4712,13 @@ else
fi
else
@@ -72,8 +72,8 @@ index 4836cd886537e9cdf73ef2bb064bfa581fc1068a..6bee1a37ee30a1c12a8f41f05c21d956
* )
diff --git a/fixincludes/configure.ac b/fixincludes/configure.ac
index f8f352fb7153445782727eb3311d4305f33fa260..66a501d80528fdd50b4cd2f9f3282e3c562bf2e2 100644
---- fixincludes/configure.ac
-+++ fixincludes/configure.ac
+--- a/fixincludes/configure.ac
++++ b/fixincludes/configure.ac
@@ -50,12 +50,13 @@ else
TARGET=oneprocess
fi],
@@ -89,10 +89,10 @@ index f8f352fb7153445782727eb3311d4305f33fa260..66a501d80528fdd50b4cd2f9f3282e3c
* )
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
-index 07c6f0af71749b653c16ef7843a191e0bd9aa95d..c464690a51e62c8ba92fa3543dccb70488bd12f9 100644
---- gcc/Makefile.in
-+++ gcc/Makefile.in
-@@ -1972,12 +1972,13 @@ default-c.o: config/default-c.c
+index 6c5adc0bb58cfce74f1fe26b1eec436bdbfb4fe0..f4844f4ce706174cfb8c49c6475e2cf39da9027a 100644
+--- a/gcc/Makefile.in
++++ b/gcc/Makefile.in
+@@ -2018,12 +2018,13 @@ default-c.o: config/default-c.c
CFLAGS-prefix.o += -DPREFIX=\"$(prefix)\" -DBASEVER=$(BASEVER_s)
prefix.o: $(BASEVER)
@@ -107,10 +107,10 @@ index 07c6f0af71749b653c16ef7843a191e0bd9aa95d..c464690a51e62c8ba92fa3543dccb704
-DDEFAULT_REAL_TARGET_MACHINE=\"$(real_target_noncanonical)\" \
-DDEFAULT_TARGET_MACHINE=\"$(target_noncanonical)\" \
diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c
-index 117f89c023842aa8ea10a6a94088f4095246d9e3..4e1bbf417e6b774bdaa6c01dccef933fc73505ea 100644
---- gcc/c-family/c-common.c
-+++ gcc/c-family/c-common.c
-@@ -381,12 +381,13 @@ static tree handle_vector_size_attribute (tree *, tree, tree, int,
+index f2846bb26e7ce77d6a80e25ca7ae670c7e6eddaa..e28b252787d03fe90b6dd1595987356def147ae2 100644
+--- a/gcc/c-family/c-common.c
++++ b/gcc/c-family/c-common.c
+@@ -368,12 +368,13 @@ static tree handle_vector_size_attribute (tree *, tree, tree, int,
bool *);
static tree handle_nonnull_attribute (tree *, tree, tree, int, bool *);
static tree handle_nothrow_attribute (tree *, tree, tree, int, bool *);
@@ -124,7 +124,7 @@ index 117f89c023842aa8ea10a6a94088f4095246d9e3..4e1bbf417e6b774bdaa6c01dccef933f
static tree handle_alloc_align_attribute (tree *, tree, tree, int, bool *);
static tree handle_assume_aligned_attribute (tree *, tree, tree, int, bool *);
static tree handle_target_attribute (tree *, tree, tree, int, bool *);
-@@ -755,12 +756,17 @@ const struct attribute_spec c_common_attribute_table[] =
+@@ -760,12 +761,17 @@ const struct attribute_spec c_common_attribute_table[] =
handle_nothrow_attribute, false },
{ "may_alias", 0, 0, false, true, false, NULL, false },
{ "cleanup", 1, 1, true, false, false,
@@ -142,7 +142,7 @@ index 117f89c023842aa8ea10a6a94088f4095246d9e3..4e1bbf417e6b774bdaa6c01dccef933f
to prevent its usage in source code. */
{ "type generic", 0, 0, false, true, true,
handle_type_generic_attribute, false },
-@@ -9218,12 +9224,32 @@ handle_warn_unused_result_attribute (tree *node, tree name,
+@@ -9343,12 +9349,32 @@ handle_warn_unused_result_attribute (tree *node, tree name,
*no_add_attrs = true;
}
@@ -176,10 +176,10 @@ index 117f89c023842aa8ea10a6a94088f4095246d9e3..4e1bbf417e6b774bdaa6c01dccef933f
int ARG_UNUSED (flags), bool *no_add_attrs)
{
diff --git a/gcc/c/c-typeck.c b/gcc/c/c-typeck.c
-index ffba66bb6c4cf935bc86fc3896fadcc5e40023a7..a98622b16f546b88eb7fdce9ca7631c3ca37470a 100644
---- gcc/c/c-typeck.c
-+++ gcc/c/c-typeck.c
-@@ -2888,12 +2888,14 @@ build_function_call_vec (location_t loc, vec<location_t> arg_loc,
+index 59a3c6153b7f3a4fe1a488d8c92a92dcca4171f3..b1c5cd6d3db3bd6d21185bcb49af14d9bfc83d12 100644
+--- a/gcc/c/c-typeck.c
++++ b/gcc/c/c-typeck.c
+@@ -2947,12 +2947,14 @@ build_function_call_vec (location_t loc, vec<location_t> arg_loc,
tree fntype, fundecl = 0;
tree name = NULL_TREE, result;
tree tem;
@@ -194,7 +194,7 @@ index ffba66bb6c4cf935bc86fc3896fadcc5e40023a7..a98622b16f546b88eb7fdce9ca7631c3
/* Convert anything with function type to a pointer-to-function. */
if (TREE_CODE (function) == FUNCTION_DECL)
-@@ -2950,12 +2952,35 @@ build_function_call_vec (location_t loc, vec<location_t> arg_loc,
+@@ -3009,12 +3011,35 @@ build_function_call_vec (location_t loc, vec<location_t> arg_loc,
if (fundecl && TREE_THIS_VOLATILE (fundecl))
current_function_returns_abnormally = 1;
@@ -231,10 +231,10 @@ index ffba66bb6c4cf935bc86fc3896fadcc5e40023a7..a98622b16f546b88eb7fdce9ca7631c3
origtypes, function, fundecl);
if (nargs < 0)
diff --git a/gcc/config.gcc b/gcc/config.gcc
-index c835734128b0aef5a0b558ccd7ad24fd17bb9bee..6fcd952f5235f04160e5de45aff781993bf120a1 100644
---- gcc/config.gcc
-+++ gcc/config.gcc
-@@ -2245,12 +2245,20 @@ nvptx-*)
+index f66e48cd1caacb9d1d4258146a2afe3dc2d1b424..d262672083d57bd77846ba9277aeb3ef5279d11e 100644
+--- a/gcc/config.gcc
++++ b/gcc/config.gcc
+@@ -2294,12 +2294,20 @@ nvptx-*)
fi
;;
pdp11-*-*)
@@ -256,11 +256,11 @@ index c835734128b0aef5a0b558ccd7ad24fd17bb9bee..6fcd952f5235f04160e5de45aff78199
# ;;
powerpc-*-darwin*)
diff --git a/gcc/config.host b/gcc/config.host
-index b0f5940c26379ebc75e0ca462cbb2cb01dabd2fa..51675e166b9833d327ec43fcca67d6a2b3560068 100644
---- gcc/config.host
-+++ gcc/config.host
-@@ -242,12 +242,18 @@ case ${host} in
- exit 1
+index 44f2f56ff7502a513b89002b0e2c96518a67ea96..4ad954ae257e56ed06a1bc7d544413bc6869a296 100644
+--- a/gcc/config.host
++++ b/gcc/config.host
+@@ -250,12 +250,18 @@ case ${host} in
+ host_lto_plugin_soname=liblto_plugin-0.dll
;;
i[34567]86-*-darwin* | x86_64-*-darwin*)
out_host_hook_obj="${out_host_hook_obj} host-i386-darwin.o"
@@ -272,17 +272,17 @@ index b0f5940c26379ebc75e0ca462cbb2cb01dabd2fa..51675e166b9833d327ec43fcca67d6a2
+ host_can_use_collect2=no
+ host_xm_defines=HOST_LACKS_INODE_NUMBERS
+ ;;
- powerpc-*-beos*)
- host_can_use_collect2=no
- ;;
powerpc-*-darwin*)
out_host_hook_obj="${out_host_hook_obj} host-ppc-darwin.o"
host_xmake_file="${host_xmake_file} rs6000/x-darwin"
+ ;;
+ powerpc64-*-darwin*)
+ out_host_hook_obj="${out_host_hook_obj} host-ppc64-darwin.o"
diff --git a/gcc/config/rs6000/amigaos-protos.h b/gcc/config/rs6000/amigaos-protos.h
new file mode 100644
index 0000000000000000000000000000000000000000..eb5f8fc5f3d546b8d8e1cdd8118a3085079df50e
--- /dev/null
-+++ gcc/config/rs6000/amigaos-protos.h
++++ b/gcc/config/rs6000/amigaos-protos.h
@@ -0,0 +1,41 @@
+/* Prototypes.
+ Copyright (C) 2003 Free Software Foundation, Inc.
@@ -327,10 +327,10 @@ index 0000000000000000000000000000000000000000..eb5f8fc5f3d546b8d8e1cdd8118a3085
+//#endif /* RTX_CODE */
diff --git a/gcc/config/rs6000/amigaos.c b/gcc/config/rs6000/amigaos.c
new file mode 100644
-index 0000000000000000000000000000000000000000..0f575a38e4dc4aac0b454c56bf62f625c0f7eb9c
+index 0000000000000000000000000000000000000000..a6da7d543241e2fc8cf51a952633c62e19d7d875
--- /dev/null
-+++ gcc/config/rs6000/amigaos.c
-@@ -0,0 +1,466 @@
++++ b/gcc/config/rs6000/amigaos.c
+@@ -0,0 +1,463 @@
+/* Subroutines used for code generation on Amiga OS 4
+ Copyright (C) 2003 Free Software Foundation, Inc.
+ Contributed by Thomas Frieden (ThomasF@hyperion-entertainment.com)
@@ -382,6 +382,7 @@ index 0000000000000000000000000000000000000000..0f575a38e4dc4aac0b454c56bf62f625
+#include "fold-const.h"
+#include "langhooks.h"
+#include "explow.h"
++#include "emit-rtl.h"
+
+#undef DEBUG
+#ifdef DEBUG
@@ -400,10 +401,6 @@ index 0000000000000000000000000000000000000000..0f575a38e4dc4aac0b454c56bf62f625
+static const char * __attribute__((used)) amigaos_stack_cookie = "$STACK:768000";
+#endif /* __amigaos4__ */
+
-+#if 0
-+const char *amigaos_crt_string;
-+#endif
-+
+/* Initialize a variable CUM of type CUMULATIVE_ARGS
+ for a call to a function whose data type is FNTYPE.
+ For a library call, FNTYPE is 0.
@@ -799,10 +796,10 @@ index 0000000000000000000000000000000000000000..0f575a38e4dc4aac0b454c56bf62f625
+}
diff --git a/gcc/config/rs6000/amigaos.h b/gcc/config/rs6000/amigaos.h
new file mode 100644
-index 0000000000000000000000000000000000000000..4556163c22a8fadc51c9ed7401c7e6c414e58c0e
+index 0000000000000000000000000000000000000000..94fa93c0be047c08987d7acbc7c71413e164014c
--- /dev/null
-+++ gcc/config/rs6000/amigaos.h
-@@ -0,0 +1,431 @@
++++ b/gcc/config/rs6000/amigaos.h
+@@ -0,0 +1,426 @@
+/* Definitions of target machine for GNU compiler, for AmigaOS.
+ Copyright (C) 1997, 2003, 2005 Free Software Foundation, Inc.
+
@@ -1172,11 +1169,6 @@ index 0000000000000000000000000000000000000000..4556163c22a8fadc51c9ed7401c7e6c4
+/* Used as cookie for linear vararg passing */
+#define CALL_LINEARVARARGS 0x10000000
+
-+/* AmigaOS specific options */
-+
-+/* Strings provided for own options management in rs6000.c */
-+/*extern const char *amigaos_crt_string;*/
-+
+#define SUB3TARGET_OVERRIDE_OPTIONS \
+do \
+{ \
@@ -1238,7 +1230,7 @@ diff --git a/gcc/config/rs6000/amigaos.opt b/gcc/config/rs6000/amigaos.opt
new file mode 100644
index 0000000000000000000000000000000000000000..93d74f10bea8c1b23c82a9650bb0c3c153464ba7
--- /dev/null
-+++ gcc/config/rs6000/amigaos.opt
++++ b/gcc/config/rs6000/amigaos.opt
@@ -0,0 +1,37 @@
+; Options for the PowerPC AmigaOS port
+;
@@ -1278,12 +1270,12 @@ index 0000000000000000000000000000000000000000..93d74f10bea8c1b23c82a9650bb0c3c1
+Target Driver
+Generated binary employs the dynamic linker for shared objects.
diff --git a/gcc/config/rs6000/rs6000-builtin.def b/gcc/config/rs6000/rs6000-builtin.def
-index 7b79efcedb31000524ac8ac485a054bef70ff9c3..07ecb46ca445f2503529b61f1acecfd722b673ce 100644
---- gcc/config/rs6000/rs6000-builtin.def
-+++ gcc/config/rs6000/rs6000-builtin.def
-@@ -1985,6 +1985,13 @@ RS6000_BUILTIN_X (RS6000_BUILTIN_MTFSF, "__builtin_mtfsf",
- RS6000_BTC_MISC | RS6000_BTC_UNARY | RS6000_BTC_VOID,
- CODE_FOR_rs6000_mtfsf)
+index 5b82b00449e3a0740e78aad67430a7c373127795..1a31571335d00d1bae578af1eb371ec53b5586c0 100644
+--- a/gcc/config/rs6000/rs6000-builtin.def
++++ b/gcc/config/rs6000/rs6000-builtin.def
+@@ -2022,6 +2022,13 @@ BU_SPECIAL_X (RS6000_BUILTIN_CPU_IS, "__builtin_cpu_is",
+ BU_SPECIAL_X (RS6000_BUILTIN_CPU_SUPPORTS, "__builtin_cpu_supports",
+ RS6000_BTM_ALWAYS, RS6000_BTC_MISC)
/* Darwin CfString builtin. */
BU_SPECIAL_X (RS6000_BUILTIN_CFSTRING, "__builtin_cfstring", RS6000_BTM_ALWAYS,
@@ -1296,11 +1288,11 @@ index 7b79efcedb31000524ac8ac485a054bef70ff9c3..07ecb46ca445f2503529b61f1acecfd7
+ RS6000_BTC_MISC, /* ATTR */ \
+ CODE_FOR_nothing) /* ICODE */
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
-index f5c2d422a8076e6fa5da3b864ade636c54cd9af8..ee0ea2ffabb6b9c6fdcba687d88be1e1164374ee 100644
---- gcc/config/rs6000/rs6000.c
-+++ gcc/config/rs6000/rs6000.c
-@@ -161,12 +161,18 @@ typedef struct rs6000_stack {
- not in save_size */
+index 1d0076c41f0f1f08ef10f306efd1ec3aca4ea6a6..cd79b2034b59168b07c84dd6bf32faaf4a648cd0 100644
+--- a/gcc/config/rs6000/rs6000.c
++++ b/gcc/config/rs6000/rs6000.c
+@@ -120,12 +120,18 @@ typedef struct rs6000_stack {
+ int altivec_padding_size; /* size of altivec alignment padding */
int spe_gp_size; /* size of 64-bit GPR save size for SPE */
int spe_padding_size;
HOST_WIDE_INT total_size; /* total bytes allocated for stack */
@@ -1318,7 +1310,7 @@ index f5c2d422a8076e6fa5da3b864ade636c54cd9af8..ee0ea2ffabb6b9c6fdcba687d88be1e1
This is added to the cfun structure. */
typedef struct GTY(()) machine_function
{
-@@ -1426,12 +1432,18 @@ static const struct attribute_spec rs6000_attribute_table[] =
+@@ -1515,12 +1521,18 @@ static const struct attribute_spec rs6000_attribute_table[] =
#undef TARGET_ASM_FUNCTION_PROLOGUE
#define TARGET_ASM_FUNCTION_PROLOGUE rs6000_output_function_prologue
@@ -1337,7 +1329,7 @@ index f5c2d422a8076e6fa5da3b864ade636c54cd9af8..ee0ea2ffabb6b9c6fdcba687d88be1e1
#undef TARGET_LEGITIMIZE_ADDRESS
#define TARGET_LEGITIMIZE_ADDRESS rs6000_legitimize_address
-@@ -6957,12 +6969,20 @@ rs6000_legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED,
+@@ -7478,12 +7490,20 @@ rs6000_legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED,
{
enum tls_model model = SYMBOL_REF_TLS_MODEL (x);
if (model != 0)
@@ -1358,7 +1350,7 @@ index f5c2d422a8076e6fa5da3b864ade636c54cd9af8..ee0ea2ffabb6b9c6fdcba687d88be1e1
case TFmode:
case TDmode:
case TImode:
-@@ -8549,12 +8569,21 @@ rs6000_emit_move (rtx dest, rtx source, machine_mode mode)
+@@ -9105,12 +9125,21 @@ rs6000_emit_move (rtx dest, rtx source, machine_mode mode)
tmp = gen_rtx_PLUS (mode, tmp, addend);
tmp = force_operand (tmp, operands[0]);
}
@@ -1380,7 +1372,7 @@ index f5c2d422a8076e6fa5da3b864ade636c54cd9af8..ee0ea2ffabb6b9c6fdcba687d88be1e1
|| ! nonimmediate_operand (operands[0], mode)))
goto emit_set;
-@@ -8852,12 +8881,20 @@ rs6000_emit_move (rtx dest, rtx source, machine_mode mode)
+@@ -9409,12 +9438,20 @@ rs6000_emit_move (rtx dest, rtx source, machine_mode mode)
#endif
emit_insn (gen_macho_high (target, operands[1]));
emit_insn (gen_macho_low (operands[0], target, operands[1]));
@@ -1401,7 +1393,7 @@ index f5c2d422a8076e6fa5da3b864ade636c54cd9af8..ee0ea2ffabb6b9c6fdcba687d88be1e1
}
/* If this is a SYMBOL_REF that refers to a constant pool entry,
-@@ -9372,12 +9409,18 @@ init_cumulative_args (CUMULATIVE_ARGS *cum, tree fntype,
+@@ -9931,12 +9968,18 @@ init_cumulative_args (CUMULATIVE_ARGS *cum, tree fntype,
if ((!fntype && rs6000_default_long_calls)
|| (fntype
&& lookup_attribute ("longcall", TYPE_ATTRIBUTES (fntype))
@@ -1420,7 +1412,7 @@ index f5c2d422a8076e6fa5da3b864ade636c54cd9af8..ee0ea2ffabb6b9c6fdcba687d88be1e1
if (fntype)
{
tree ret_type = TREE_TYPE (fntype);
-@@ -10023,12 +10066,21 @@ rs6000_function_arg_advance_1 (CUMULATIVE_ARGS *cum, machine_mode mode,
+@@ -10593,12 +10636,21 @@ rs6000_function_arg_advance_1 (CUMULATIVE_ARGS *cum, machine_mode mode,
fprintf (stderr, "nargs = %4d, proto = %d, mode = %4s, ",
cum->nargs_prototype, cum->prototype, GET_MODE_NAME (mode));
fprintf (stderr, "named = %d, align = %d, depth = %d\n",
@@ -1442,8 +1434,8 @@ index f5c2d422a8076e6fa5da3b864ade636c54cd9af8..ee0ea2ffabb6b9c6fdcba687d88be1e1
rs6000_function_arg_advance (cumulative_args_t cum, machine_mode mode,
const_tree type, bool named)
{
-@@ -11189,12 +11241,18 @@ setup_incoming_varargs (cumulative_args_t cum, machine_mode mode,
- save_area = virtual_incoming_args_rtx;
+@@ -11765,12 +11817,18 @@ setup_incoming_varargs (cumulative_args_t cum, machine_mode mode,
+ save_area = crtl->args.internal_arg_pointer;
if (targetm.calls.must_pass_in_stack (mode, type))
first_reg_offset += rs6000_arg_size (TYPE_MODE (type), type);
@@ -1461,7 +1453,7 @@ index f5c2d422a8076e6fa5da3b864ade636c54cd9af8..ee0ea2ffabb6b9c6fdcba687d88be1e1
{
int n_gpr, nregs = GP_ARG_NUM_REG - first_reg_offset;
-@@ -11316,13 +11374,13 @@ rs6000_build_builtin_va_list (void)
+@@ -11891,13 +11949,13 @@ rs6000_build_builtin_va_list (void)
return build_array_type (record, build_index_type (size_zero_node));
}
@@ -1476,7 +1468,7 @@ index f5c2d422a8076e6fa5da3b864ade636c54cd9af8..ee0ea2ffabb6b9c6fdcba687d88be1e1
tree gpr, fpr, ovf, sav, t;
/* Only SVR4 needs something special. */
-@@ -11351,12 +11409,21 @@ rs6000_va_start (tree valist, rtx nextarg)
+@@ -11926,12 +11984,21 @@ rs6000_va_start (tree valist, rtx nextarg)
words = crtl->args.info.words;
n_gpr = MIN (crtl->args.info.sysv_gregno - GP_ARG_MIN_REG,
GP_ARG_NUM_REG);
@@ -1493,12 +1485,12 @@ index f5c2d422a8076e6fa5da3b864ade636c54cd9af8..ee0ea2ffabb6b9c6fdcba687d88be1e1
+ }
+
if (TARGET_DEBUG_ARG)
- fprintf (stderr, "va_start: words = "HOST_WIDE_INT_PRINT_DEC", n_gpr = "
- HOST_WIDE_INT_PRINT_DEC", n_fpr = "HOST_WIDE_INT_PRINT_DEC"\n",
+ fprintf (stderr, "va_start: words = " HOST_WIDE_INT_PRINT_DEC", n_gpr = "
+ HOST_WIDE_INT_PRINT_DEC", n_fpr = " HOST_WIDE_INT_PRINT_DEC"\n",
words, n_gpr, n_fpr);
if (cfun->va_list_gpr_size)
-@@ -11402,12 +11469,18 @@ rs6000_va_start (tree valist, rtx nextarg)
+@@ -11977,12 +12044,18 @@ rs6000_va_start (tree valist, rtx nextarg)
t = fold_build_pointer_plus_hwi (t, cfun->machine->varargs_save_offset);
t = build2 (MODIFY_EXPR, TREE_TYPE (sav), sav, t);
TREE_SIDE_EFFECTS (t) = 1;
@@ -1517,7 +1509,7 @@ index f5c2d422a8076e6fa5da3b864ade636c54cd9af8..ee0ea2ffabb6b9c6fdcba687d88be1e1
rs6000_gimplify_va_arg (tree valist, tree type, gimple_seq *pre_p,
gimple_seq *post_p)
{
-@@ -14155,12 +14228,20 @@ rs6000_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED,
+@@ -14822,12 +14895,20 @@ rs6000_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED,
size_t i;
rtx ret;
bool success;
@@ -1538,7 +1530,7 @@ index f5c2d422a8076e6fa5da3b864ade636c54cd9af8..ee0ea2ffabb6b9c6fdcba687d88be1e1
const char *name1 = rs6000_builtin_info[uns_fcode].name;
const char *name2 = ((icode != CODE_FOR_nothing)
? get_insn_name ((int)icode)
-@@ -19214,13 +19295,22 @@ print_operand_address (FILE *file, rtx x)
+@@ -20333,13 +20414,22 @@ print_operand_address (FILE *file, rtx x)
#endif
#if TARGET_ELF
else if (GET_CODE (x) == LO_SUM && REG_P (XEXP (x, 0))
@@ -1561,7 +1553,7 @@ index f5c2d422a8076e6fa5da3b864ade636c54cd9af8..ee0ea2ffabb6b9c6fdcba687d88be1e1
{
/* This hack along with a corresponding hack in
rs6000_output_addr_const_extra arranges to output addends
-@@ -21827,12 +21917,25 @@ rs6000_stack_info (void)
+@@ -23422,12 +23512,25 @@ rs6000_stack_info (void)
- info_ptr->first_altivec_reg_save);
/* Does this function call anything? */
@@ -1587,7 +1579,7 @@ index f5c2d422a8076e6fa5da3b864ade636c54cd9af8..ee0ea2ffabb6b9c6fdcba687d88be1e1
|| df_regs_ever_live_p (CR4_REGNO))
{
info_ptr->cr_save_p = 1;
-@@ -21944,13 +22047,19 @@ rs6000_stack_info (void)
+@@ -23539,13 +23642,19 @@ rs6000_stack_info (void)
info_ptr->lr_save_offset = 2*reg_size;
break;
@@ -1607,7 +1599,7 @@ index f5c2d422a8076e6fa5da3b864ade636c54cd9af8..ee0ea2ffabb6b9c6fdcba687d88be1e1
/* Align stack so SPE GPR save area is aligned on a
double-word boundary. */
if (info_ptr->spe_gp_size != 0 && info_ptr->cr_save_offset != 0)
-@@ -22004,12 +22113,16 @@ rs6000_stack_info (void)
+@@ -23599,12 +23708,16 @@ rs6000_stack_info (void)
+ ehrd_size
+ ehcr_size
+ info_ptr->cr_size
@@ -1624,7 +1616,7 @@ index f5c2d422a8076e6fa5da3b864ade636c54cd9af8..ee0ea2ffabb6b9c6fdcba687d88be1e1
info_ptr->total_size = RS6000_ALIGN (non_fixed_size + info_ptr->fixed_size,
ABI_STACK_BOUNDARY / BITS_PER_UNIT);
-@@ -22188,12 +22301,17 @@ debug_stack_info (rs6000_stack_t *info)
+@@ -23759,12 +23872,17 @@ debug_stack_info (rs6000_stack_t *info)
if (info->lr_save_p)
fprintf (stderr, "\tlr_save_p = %5d\n", info->lr_save_p);
@@ -1642,8 +1634,8 @@ index f5c2d422a8076e6fa5da3b864ade636c54cd9af8..ee0ea2ffabb6b9c6fdcba687d88be1e1
if (info->push_p)
fprintf (stderr, "\tpush_p = %5d\n", info->push_p);
-@@ -22224,12 +22342,17 @@ debug_stack_info (rs6000_stack_t *info)
- if (info->cr_save_offset)
+@@ -23795,12 +23913,17 @@ debug_stack_info (rs6000_stack_t *info)
+ if (info->cr_save_p)
fprintf (stderr, "\tcr_save_offset = %5d\n", info->cr_save_offset);
if (info->varargs_save_offset)
@@ -1655,12 +1647,12 @@ index f5c2d422a8076e6fa5da3b864ade636c54cd9af8..ee0ea2ffabb6b9c6fdcba687d88be1e1
+#endif
+
if (info->total_size)
- fprintf (stderr, "\ttotal_size = "HOST_WIDE_INT_PRINT_DEC"\n",
+ fprintf (stderr, "\ttotal_size = " HOST_WIDE_INT_PRINT_DEC"\n",
info->total_size);
if (info->vars_size)
- fprintf (stderr, "\tvars_size = "HOST_WIDE_INT_PRINT_DEC"\n",
-@@ -22253,12 +22376,17 @@ debug_stack_info (rs6000_stack_t *info)
+ fprintf (stderr, "\tvars_size = " HOST_WIDE_INT_PRINT_DEC"\n",
+@@ -23824,12 +23947,17 @@ debug_stack_info (rs6000_stack_t *info)
if (info->altivec_size)
fprintf (stderr, "\taltivec_size = %5d\n", info->altivec_size);
@@ -1678,7 +1670,7 @@ index f5c2d422a8076e6fa5da3b864ade636c54cd9af8..ee0ea2ffabb6b9c6fdcba687d88be1e1
if (info->spe_padding_size)
fprintf (stderr, "\tspe_padding_size = %5d\n",
-@@ -23989,12 +24117,28 @@ rs6000_emit_prologue (void)
+@@ -25616,12 +25744,28 @@ rs6000_emit_prologue (void)
emit_frame_save (frame_reg_rtx, reg_mode,
info->first_gp_reg_save + i,
info->gp_save_offset + frame_off + reg_size * i,
@@ -1707,7 +1699,7 @@ index f5c2d422a8076e6fa5da3b864ade636c54cd9af8..ee0ea2ffabb6b9c6fdcba687d88be1e1
rtvec p;
for (i = 0; ; ++i)
-@@ -24446,12 +24590,19 @@ rs6000_emit_prologue (void)
+@@ -26075,12 +26219,19 @@ rs6000_emit_prologue (void)
if (!info->lr_save_p)
emit_move_insn (lr, gen_rtx_REG (Pmode, 0));
@@ -1727,7 +1719,7 @@ index f5c2d422a8076e6fa5da3b864ade636c54cd9af8..ee0ea2ffabb6b9c6fdcba687d88be1e1
register values in the caller of this function. This R2 may have
already been changed from the value in the caller.
We don't attempt to write accurate DWARF EH frame info for R2
-@@ -24502,12 +24653,17 @@ rs6000_output_savres_externs (FILE *file)
+@@ -26172,12 +26323,17 @@ rs6000_output_savres_externs (FILE *file)
& REST_NOINLINE_FPRS_DOESNT_RESTORE_LR) == 0;
int sel = SAVRES_FPR | (lr ? SAVRES_LR : 0);
name = rs6000_savres_routine_name (info, regno, sel);
@@ -1745,7 +1737,7 @@ index f5c2d422a8076e6fa5da3b864ade636c54cd9af8..ee0ea2ffabb6b9c6fdcba687d88be1e1
static void
rs6000_output_function_prologue (FILE *file,
-@@ -25319,12 +25475,30 @@ rs6000_emit_epilogue (int sibcall)
+@@ -27032,12 +27188,30 @@ rs6000_emit_epilogue (int sibcall)
+ reg_size * (int) i);
emit_move_insn (gen_rtx_REG (reg_mode, regno), mem);
@@ -1777,11 +1769,11 @@ index f5c2d422a8076e6fa5da3b864ade636c54cd9af8..ee0ea2ffabb6b9c6fdcba687d88be1e1
&& info->first_gp_reg_save != 32)
{
diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h
-index 653c2c94e11a6f22d20fe3e33532e4d354c2be5e..99ad439bc53ba7194804bb9bcb47e5756e7175e2 100644
---- gcc/config/rs6000/rs6000.h
-+++ gcc/config/rs6000/rs6000.h
-@@ -2771,6 +2771,9 @@ enum rs6000_builtin_type_index
- #define void_type_internal_node (rs6000_builtin_types[RS6000_BTI_void])
+index 8c6bd07dd5e58cbe887533f9057288d65a96a57a..aaabef41e436a18cc62394cb040db89f2d563cfc 100644
+--- a/gcc/config/rs6000/rs6000.h
++++ b/gcc/config/rs6000/rs6000.h
+@@ -2846,6 +2846,9 @@ enum rs6000_builtin_type_index
+ #define ibm128_float_type_node (rs6000_builtin_types[RS6000_BTI_ibm128_float])
extern GTY(()) tree rs6000_builtin_types[RS6000_BTI_MAX];
extern GTY(()) tree rs6000_builtin_decls[RS6000_BUILTIN_COUNT];
@@ -1791,10 +1783,10 @@ index 653c2c94e11a6f22d20fe3e33532e4d354c2be5e..99ad439bc53ba7194804bb9bcb47e575
+/* Used by amigaos port */
+void rs6000_va_start (tree valist, rtx nextarg);
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
-index 0e5883c7fc895a454d3677f0818c4f13b625c9ce..c8304a75b801c6c5fbe7617e0b42eb46ad15d050 100644
---- gcc/config/rs6000/rs6000.md
-+++ gcc/config/rs6000/rs6000.md
-@@ -10950,12 +10950,37 @@
+index 849b19a7b0b0c834d9cc571fa7d101b654ca8c77..7d25ce7a6ab03d8af07ebc3df12fe14391cc7941 100644
+--- a/gcc/config/rs6000/rs6000.md
++++ b/gcc/config/rs6000/rs6000.md
+@@ -9694,12 +9694,37 @@
"TARGET_TOC"
"la %0,%a1"
"&& TARGET_CMODEL != CMODEL_SMALL && reload_completed"
@@ -1832,7 +1824,7 @@ index 0e5883c7fc895a454d3677f0818c4f13b625c9ce..c8304a75b801c6c5fbe7617e0b42eb46
;; be needed there.
(define_insn "elf_high"
[(set (match_operand:SI 0 "gpc_reg_operand" "=b*r")
-@@ -10964,13 +10989,13 @@
+@@ -9708,13 +9733,13 @@
"lis %0,%1@ha")
(define_insn "elf_low"
@@ -1851,7 +1843,7 @@ diff --git a/gcc/config/rs6000/t-amigaos b/gcc/config/rs6000/t-amigaos
new file mode 100644
index 0000000000000000000000000000000000000000..15d9d3fd5a5f0c8109cd158242745fa52b19257e
--- /dev/null
-+++ gcc/config/rs6000/t-amigaos
++++ b/gcc/config/rs6000/t-amigaos
@@ -0,0 +1,20 @@
+# Makefile fragment for AmigaOS/PPC target.
+
@@ -1874,10 +1866,10 @@ index 0000000000000000000000000000000000000000..15d9d3fd5a5f0c8109cd158242745fa5
+MULTILIB_DIRNAMES = newlib clib2
+#MULTILIB_REUSE = =mcrt=newlib
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
-index 22792556c2431d1875e36cee2304c91d709102ea..cd6a6f14e32a9ee078dd048f5d20965960ac4f44 100644
---- gcc/cp/typeck.c
-+++ gcc/cp/typeck.c
-@@ -3525,12 +3525,28 @@ cp_build_function_call_vec (tree function, vec<tree, va_gc> **params,
+index cef5604bd0b478255f02e3a5eb15c63effd3e68f..36267c9a5d7085e4cf0c314317cf8632a20c5218 100644
+--- a/gcc/cp/typeck.c
++++ b/gcc/cp/typeck.c
+@@ -3596,12 +3596,28 @@ cp_build_function_call_vec (tree function, vec<tree, va_gc> **params,
return error_mark_node;
}
@@ -1907,16 +1899,17 @@ index 22792556c2431d1875e36cee2304c91d709102ea..cd6a6f14e32a9ee078dd048f5d209659
allocated = make_tree_vector ();
params = &allocated;
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
-index 70a09032d433c2834f6d1458dcaee92763616570..f63512c1029aa2168a89824ce284844387121082 100644
---- gcc/doc/extend.texi
-+++ gcc/doc/extend.texi
-@@ -4508,12 +4508,163 @@ The @code{weak} attribute causes the declaration to be emitted as a weak
- symbol rather than a global. This is primarily useful in defining
- library functions that can be overridden in user code, though it can
- also be used with non-function declarations. Weak symbols are supported
- for ELF targets, and also for a.out targets when using the GNU assembler
- and linker.
+index a5a8b23df275b70f047a3af9f79fa18a8542dcc0..217473723a6c8ae5d407dd0a70ba0004d647fd0a 100644
+--- a/gcc/doc/extend.texi
++++ b/gcc/doc/extend.texi
+@@ -3347,12 +3347,164 @@ int foo ()
+ @}
+ @end smallexample
+ @noindent
+ results in warning on line 5.
+
++
+@item libcall
+@cindex AmigaOS specific function attributes
+On AmigaOS, the @code{libcall} attribute is used to declare function
@@ -2068,18 +2061,18 @@ index 70a09032d433c2834f6d1458dcaee92763616570..f63512c1029aa2168a89824ce2848443
+@}
+@end smallexample
+
- @item weakref
- @itemx weakref ("@var{target}")
- @cindex @code{weakref} function attribute
- The @code{weakref} attribute marks a declaration as a weak reference.
- Without arguments, it should be accompanied by an @code{alias} attribute
- naming the target symbol. Optionally, the @var{target} may be given as
-@@ -5698,12 +5849,28 @@ struct
+ @item weak
+ @cindex @code{weak} function attribute
+ The @code{weak} attribute causes the declaration to be emitted as a weak
+ symbol rather than a global. This is primarily useful in defining
+ library functions that can be overridden in user code, though it can
+ also be used with non-function declarations. Weak symbols are supported
+@@ -6109,12 +6261,28 @@ For full documentation of the struct attributes please see the
+ documentation in @ref{x86 Variable Attributes}.
- @noindent
- Here, @code{t5} takes up 2 bytes.
- @end enumerate
- @end table
+ @cindex @code{altivec} variable attribute, PowerPC
+ For documentation of @code{altivec} attribute please see the
+ documentation in @ref{PowerPC Type Attributes}.
+@subsection AmigaOS PPC Variable Attributes
+
@@ -2097,34 +2090,59 @@ index 70a09032d433c2834f6d1458dcaee92763616570..f63512c1029aa2168a89824ce2848443
+
+@end table
+
- @subsection Xstormy16 Variable Attributes
-
- One attribute is currently defined for xstormy16 configurations:
- @code{below100}.
+ @node RL78 Variable Attributes
+ @subsection RL78 Variable Attributes
- @table @code
+ @cindex @code{saddr} variable attribute, RL78
+ The RL78 back end supports the @code{saddr} variable attribute. This
+ specifies placement of the corresponding variable in the SADDR area,
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
-index d3be5899c57fa2147893f27c7c7bddac98bd4ff4..68ecbffa0f2f92f5ecc7331e8e855240134dbcdf 100644
---- gcc/doc/invoke.texi
-+++ gcc/doc/invoke.texi
-@@ -1109,12 +1109,16 @@ See RS/6000 and PowerPC Options.
+index 821f8fd8594b815a3a7f5fd45bdcb1a02b20c5b3..29dfa9ed3691129229ba1550315982ed3848e001 100644
+--- a/gcc/doc/invoke.texi
++++ b/gcc/doc/invoke.texi
+@@ -1187,12 +1187,41 @@ See RS/6000 and PowerPC Options.
+ -mauto-litpools -mno-auto-litpools @gol
-mtarget-align -mno-target-align @gol
-mlongcalls -mno-longcalls}
@emph{zSeries Options}
See S/390 and zSeries Options.
-
++
+@emph{AmigaOS PPC options}
+@gccoptlist{-mcrt=@var{crt} -mbaserel -mno-baserel @gol
+-mcheck68kfuncptr}
+
- @item Code Generation Options
- @xref{Code Gen Options,,Options for Code Generation Conventions}.
- @gccoptlist{-fcall-saved-@var{reg} -fcall-used-@var{reg} @gol
- -ffixed-@var{reg} -fexceptions @gol
- -fnon-call-exceptions -fdelete-dead-exceptions -funwind-tables @gol
- -fasynchronous-unwind-tables @gol
-@@ -12227,12 +12231,13 @@ platform.
++@item Code Generation Options
++@xref{Code Gen Options,,Options for Code Generation Conventions}.
++@gccoptlist{-fcall-saved-@var{reg} -fcall-used-@var{reg} @gol
++-ffixed-@var{reg} -fexceptions @gol
++-fnon-call-exceptions -fdelete-dead-exceptions -funwind-tables @gol
++-fasynchronous-unwind-tables @gol
++-fno-gnu-unique @gol
++-finhibit-size-directive -finstrument-functions @gol
++-finstrument-functions-exclude-function-list=@var{sym},@var{sym},@dots{} @gol
++-finstrument-functions-exclude-file-list=@var{file},@var{file},@dots{} @gol
++-fno-common -fno-ident @gol
++-fpcc-struct-return -fpic -fPIC -fpie -fPIE @gol
++-fno-jump-tables @gol
++-frecord-gcc-switches @gol
++-freg-struct-return -fshort-enums @gol
++-fshort-double -fshort-wchar @gol
++-fverbose-asm -fpack-struct[=@var{n}] -fstack-check @gol
++-fstack-limit-register=@var{reg} -fstack-limit-symbol=@var{sym} @gol
++-fno-stack-limit -fsplit-stack @gol
++-fleading-underscore -ftls-model=@var{model} @gol
++-fstack-reuse=@var{reuse_level} @gol
++-ftrapv -fwrapv -fbounds-check @gol
++-fvisibility=@r{[}default@r{|}internal@r{|}hidden@r{|}protected@r{]} @gol
++-fstrict-volatile-bitfields -fsync-libcalls}
+ @end table
+
+
+ @node Overall Options
+ @section Options Controlling the Kind of Output
+
+@@ -12810,12 +12839,13 @@ platform.
* VMS Options::
* VxWorks Options::
* x86 Options::
@@ -2138,7 +2156,7 @@ index d3be5899c57fa2147893f27c7c7bddac98bd4ff4..68ecbffa0f2f92f5ecc7331e8e855240
@node AArch64 Options
@subsection AArch64 Options
@cindex AArch64 Options
-@@ -23178,12 +23183,143 @@ These options are defined for Xstormy16:
+@@ -24369,12 +24399,143 @@ These options are defined for Xstormy16:
@table @gcctabopt
@item -msim
@opindex msim
@@ -2283,10 +2301,10 @@ index d3be5899c57fa2147893f27c7c7bddac98bd4ff4..68ecbffa0f2f92f5ecc7331e8e855240
These options are supported for Xtensa targets:
diff --git a/gcc/expr.c b/gcc/expr.c
-index 5c095507f4a303b1c4ab3519d165735be5a37d07..fb57de6652c4bd9dd39300eaaf6c3b2b8aad5fb8 100644
---- gcc/expr.c
-+++ gcc/expr.c
-@@ -8134,13 +8134,12 @@ expand_expr_real_2 (sepops ops, rtx target, machine_mode tmode,
+index 29d22b07256ce0adcb8c8eae5249847e144caf4b..8c63a7362c87d8558c3713fb56c0b5a453eb9214 100644
+--- a/gcc/expr.c
++++ b/gcc/expr.c
+@@ -8077,13 +8077,12 @@ expand_expr_real_2 (sepops ops, rtx target, machine_mode tmode,
tree treeop0, treeop1, treeop2;
#define REDUCE_BIT_FIELD(expr) (reduce_bit_field \
? reduce_to_bit_field_precision ((expr), \
@@ -2301,10 +2319,10 @@ index 5c095507f4a303b1c4ab3519d165735be5a37d07..fb57de6652c4bd9dd39300eaaf6c3b2b
treeop0 = ops->op0;
treeop1 = ops->op1;
diff --git a/gcc/gcc.c b/gcc/gcc.c
-index d956c36b151eea45681aa650c39c522f85be359f..d4d061080ba1166fb14069094556246b32265da4 100644
---- gcc/gcc.c
-+++ gcc/gcc.c
-@@ -2730,13 +2730,13 @@ execute (void)
+index 1af59209b312ea52408690393ed80e55d093ecf3..e88e6d3497c13a4e9a5d92d71de6128678ec546f 100644
+--- a/gcc/gcc.c
++++ b/gcc/gcc.c
+@@ -2930,13 +2930,13 @@ execute (void)
commands[0].argv[0] = (string) ? string : commands[0].argv[0];
}
@@ -2319,7 +2337,7 @@ index d956c36b151eea45681aa650c39c522f85be359f..d4d061080ba1166fb14069094556246b
command args. */
commands[n_commands].prog = argbuf[i + 1];
commands[n_commands].argv
-@@ -4261,13 +4261,12 @@ process_command (unsigned int decoded_options_count,
+@@ -4480,13 +4480,12 @@ process_command (unsigned int decoded_options_count,
add_prefix (&exec_prefixes, standard_exec_prefix, "BINUTILS",
PREFIX_PRIORITY_LAST, 2, 0);
#endif
@@ -2328,12 +2346,12 @@ index d956c36b151eea45681aa650c39c522f85be359f..d4d061080ba1166fb14069094556246b
}
-
gcc_assert (!IS_ABSOLUTE_PATH (tooldir_base_prefix));
- tooldir_prefix2 = concat (tooldir_base_prefix, spec_host_machine,
+ tooldir_prefix2 = concat (tooldir_base_prefix, spec_machine,
dir_separator_str, NULL);
/* Look for tools relative to the location from which the driver is
running, or, if that is not available, the configured prefix. */
-@@ -6312,12 +6311,17 @@ give_switch (int switchnum, int omit_first_word)
+@@ -6558,12 +6557,17 @@ give_switch (int switchnum, int omit_first_word)
if (dot)
(CONST_CAST (char *, arg))[length] = '.';
do_spec_1 (suffix_subst, 1, NULL);
@@ -2351,7 +2369,7 @@ index d956c36b151eea45681aa650c39c522f85be359f..d4d061080ba1166fb14069094556246b
do_spec_1 (" ", 0, NULL);
switches[switchnum].validated = true;
}
-@@ -6702,13 +6706,15 @@ is_directory (const char *path1, bool linker)
+@@ -6948,13 +6952,15 @@ is_directory (const char *path1, bool linker)
len1 = strlen (path1);
path = (char *) alloca (3 + len1);
memcpy (path, path1, len1);
@@ -2367,7 +2385,7 @@ index d956c36b151eea45681aa650c39c522f85be359f..d4d061080ba1166fb14069094556246b
if (linker
&& IS_DIR_SEPARATOR (path[0])
&& ((cp - path == 6
-@@ -7223,22 +7229,24 @@ driver::set_up_specs () const
+@@ -7492,22 +7498,24 @@ driver::set_up_specs () const
? gcc_exec_prefix : standard_exec_prefix,
machine_suffix,
standard_startfile_prefix, NULL),
@@ -2393,9 +2411,9 @@ index d956c36b151eea45681aa650c39c522f85be359f..d4d061080ba1166fb14069094556246b
for (struct user_specs *uptr = user_specs_head; uptr; uptr = uptr->next)
{
diff --git a/gcc/prefix.c b/gcc/prefix.c
-index 3d7532380d5ea5b6a56fd89688cbd76a5d01df57..4ce2ce2e576ca3ad7e9ffee2a2ddc0d25620b3b9 100644
---- gcc/prefix.c
-+++ gcc/prefix.c
+index 366eecec7dfbc8893f0a9f62a1df42cb5ed5fa69..2ba2c197f1481a48738a77b2722d616eef6b1818 100644
+--- a/gcc/prefix.c
++++ b/gcc/prefix.c
@@ -326,13 +326,13 @@ update_path (const char *path, const char *key)
#ifdef UPDATE_PATH_HOST_CANONICALIZE
@@ -2413,8 +2431,8 @@ index 3d7532380d5ea5b6a56fd89688cbd76a5d01df57..4ce2ce2e576ca3ad7e9ffee2a2ddc0d2
#if defined (DIR_SEPARATOR) && !defined (DIR_SEPARATOR_2)
diff --git a/intl/dcigettext.c b/intl/dcigettext.c
index a8d4a14d273b153b117b507ec76356635ccd876e..a9cc1066050e10b539149027a5c159f21accfaca 100644
---- intl/dcigettext.c
-+++ intl/dcigettext.c
+--- a/intl/dcigettext.c
++++ b/intl/dcigettext.c
@@ -145,13 +145,15 @@ extern int errno;
# define tfind __tfind
#else
@@ -2432,10 +2450,10 @@ index a8d4a14d273b153b117b507ec76356635ccd876e..a9cc1066050e10b539149027a5c159f2
# ifndef HAVE_MEMPCPY
static void *mempcpy PARAMS ((void *dest, const void *src, size_t n));
diff --git a/libcpp/line-map.c b/libcpp/line-map.c
-index f9260d00008988a5b5f6b23e03f8f9abd61edd16..b48616406c55ca77e0ebfaa795f83bc661445f3e 100644
---- libcpp/line-map.c
-+++ libcpp/line-map.c
-@@ -717,12 +717,15 @@ linemap_ordinary_map_lookup (struct line_maps *set, source_location line)
+index 2e61895bb35bf6814b8040fdb0859772e28adf19..a6e84edce4b17f95763ac4a6c333ff39cb2855f5 100644
+--- a/libcpp/line-map.c
++++ b/libcpp/line-map.c
+@@ -938,12 +938,15 @@ linemap_ordinary_map_lookup (struct line_maps *set, source_location line)
mn = LINEMAPS_ORDINARY_CACHE (set);
mx = LINEMAPS_ORDINARY_USED (set);
@@ -2452,10 +2470,10 @@ index f9260d00008988a5b5f6b23e03f8f9abd61edd16..b48616406c55ca77e0ebfaa795f83bc6
}
else
diff --git a/libgcc/config.host b/libgcc/config.host
-index 4329891fb986fee1c1e01ee367df18c927a7a4b8..9b5c8e2c189ad14dbadbd8e982b6e25113a41fa5 100644
---- libgcc/config.host
-+++ libgcc/config.host
-@@ -956,12 +956,15 @@ nios2-*-*)
+index b61a579bea0a7e7783596b99d6bdf119cb6213ab..0e514866482cef396d34a1dd39de840bc0daa941 100644
+--- a/libgcc/config.host
++++ b/libgcc/config.host
+@@ -975,12 +975,15 @@ nios2-*-*)
tmake_file="$tmake_file nios2/t-nios2 t-softfp-sfdf t-softfp-excl t-softfp"
extra_parts="$extra_parts crti.o crtn.o"
;;
@@ -2475,7 +2493,7 @@ diff --git a/libgcc/config/rs6000/t-amigaos b/libgcc/config/rs6000/t-amigaos
new file mode 100644
index 0000000000000000000000000000000000000000..da1e303eed7e60df883971a610e8904db0df3e23
--- /dev/null
-+++ libgcc/config/rs6000/t-amigaos
++++ b/libgcc/config/rs6000/t-amigaos
@@ -0,0 +1,45 @@
+# We need to enable the altivec in the assembler as
+# crtsavevr.S needs it. Not sure how this is handled
@@ -2523,10 +2541,10 @@ index 0000000000000000000000000000000000000000..da1e303eed7e60df883971a610e8904d
+ $(INSTALL_DATA) $(SHLIB_DIR)/$(SHLIB_SONAME) \
+ $(DESTDIR)$(inst_libdir)/libgcc$(SHLIB_EXT);
diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in
-index f06cc69a973bcf39235febce84a2d7fad7130eed..a3d556b812465e04f339b04bfee766aaaa8eb65b 100644
---- libiberty/Makefile.in
-+++ libiberty/Makefile.in
-@@ -140,12 +140,13 @@ CFILES = alloca.c argv.c asprintf.c atexit.c \
+index c7a45680917a53367c2e1f459cdc921c4d7148ab..7151e59e38eb126f3962cd2370aef45c6be042ea 100644
+--- a/libiberty/Makefile.in
++++ b/libiberty/Makefile.in
+@@ -141,12 +141,13 @@ CFILES = alloca.c argv.c asprintf.c atexit.c \
make-temp-file.c md5.c memchr.c memcmp.c memcpy.c memmem.c \
memmove.c mempcpy.c memset.c mkstemps.c \
objalloc.c obstack.c \
@@ -2540,7 +2558,7 @@ index f06cc69a973bcf39235febce84a2d7fad7130eed..a3d556b812465e04f339b04bfee766aa
simple-object.c simple-object-coff.c simple-object-elf.c \
simple-object-mach-o.c simple-object-xcoff.c \
snprintf.c sort.c \
-@@ -207,12 +208,13 @@ CONFIGURED_OFILES = ./asprintf.$(objext) ./atexit.$(objext) \
+@@ -208,12 +209,13 @@ CONFIGURED_OFILES = ./asprintf.$(objext) ./atexit.$(objext) \
./getcwd.$(objext) ./getpagesize.$(objext) \
./gettimeofday.$(objext) \
./index.$(objext) ./insque.$(objext) \
@@ -2554,7 +2572,7 @@ index f06cc69a973bcf39235febce84a2d7fad7130eed..a3d556b812465e04f339b04bfee766aa
./random.$(objext) ./rename.$(objext) ./rindex.$(objext) \
./setenv.$(objext) \
./setproctitle.$(objext) \
-@@ -1120,12 +1122,19 @@ $(CONFIGURED_OFILES): stamp-picdir stamp-noasandir
+@@ -1119,12 +1121,19 @@ $(CONFIGURED_OFILES): stamp-picdir stamp-noasandir
else true; fi
if [ x"$(NOASANFLAG)" != x ]; then \
$(COMPILE.c) $(PICFLAG) $(NOASANFLAG) $(srcdir)/pex-win32.c -o noasan/$@; \
@@ -2576,8 +2594,8 @@ index f06cc69a973bcf39235febce84a2d7fad7130eed..a3d556b812465e04f339b04bfee766aa
if [ x"$(NOASANFLAG)" != x ]; then \
diff --git a/libiberty/basename.c b/libiberty/basename.c
index 0f2c069f0ccf5a7d91e4913548e068c247e12efb..6ba5c4aa4f814fbc28f03127d22e91253c980c1b 100644
---- libiberty/basename.c
-+++ libiberty/basename.c
+--- a/libiberty/basename.c
++++ b/libiberty/basename.c
@@ -15,32 +15,13 @@ Behavior is undefined if the pathname ends in a directory separator.
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -2613,10 +2631,10 @@ index 0f2c069f0ccf5a7d91e4913548e068c247e12efb..6ba5c4aa4f814fbc28f03127d22e9125
const char *base;
diff --git a/libiberty/configure b/libiberty/configure
-index b06cab24efa57a9bc6aff387d47833188b796e53..645595a1fdbe34c8387fd19ad78dc1132b4760e3 100755
---- libiberty/configure
-+++ libiberty/configure
-@@ -6809,12 +6809,13 @@ fi
+index bde78ffd25db650445a3a0bbe0b03e79efb786cb..31b6bb40db646f3c5a6cc4e02b766f069e66e7cf 100755
+--- a/libiberty/configure
++++ b/libiberty/configure
+@@ -7055,12 +7055,13 @@ fi
# Figure out which version of pexecute to use.
case "${host}" in
@@ -2631,10 +2649,10 @@ index b06cab24efa57a9bc6aff387d47833188b796e53..645595a1fdbe34c8387fd19ad78dc113
if test x$gcc_no_link = xyes; then
if test "x${ac_cv_func_mmap_fixed_mapped+set}" != xset; then
diff --git a/libiberty/configure.ac b/libiberty/configure.ac
-index 922aa86e9b03719135b2b12ee5aad1c0cbd74342..1c5704ff8cf09fc7446aea2d17e163c9589af542 100644
---- libiberty/configure.ac
-+++ libiberty/configure.ac
-@@ -685,12 +685,13 @@ fi
+index 9d3f2988d5d240d95a2bdc3829e8837efcc6b898..4b921054786e0260add9796888b7ffb79f2f5bab 100644
+--- a/libiberty/configure.ac
++++ b/libiberty/configure.ac
+@@ -693,12 +693,13 @@ fi
# Figure out which version of pexecute to use.
case "${host}" in
@@ -2650,8 +2668,8 @@ index 922aa86e9b03719135b2b12ee5aad1c0cbd74342..1c5704ff8cf09fc7446aea2d17e163c9
diff --git a/libiberty/lrealpath.c b/libiberty/lrealpath.c
index b27c8de990e974c7294dfc4024ef44fbd3844a52..1491511553f865caaf8effc67a3ea42319edd3cf 100644
---- libiberty/lrealpath.c
-+++ libiberty/lrealpath.c
+--- a/libiberty/lrealpath.c
++++ b/libiberty/lrealpath.c
@@ -46,12 +46,13 @@ components will be simplified. The returned value will be allocated using
#ifdef HAVE_UNISTD_H
#include <unistd.h>
@@ -2683,8 +2701,8 @@ index b27c8de990e974c7294dfc4024ef44fbd3844a52..1491511553f865caaf8effc67a3ea423
/* PATH_MAX is bounded. */
diff --git a/libiberty/make-relative-prefix.c b/libiberty/make-relative-prefix.c
index fe639d18bd2815a5ec33aef28720386725ab1bd5..0b5691adc3f6ed9013472568d9d001495205673b 100644
---- libiberty/make-relative-prefix.c
-+++ libiberty/make-relative-prefix.c
+--- a/libiberty/make-relative-prefix.c
++++ b/libiberty/make-relative-prefix.c
@@ -63,44 +63,43 @@ relative prefix can be found, return @code{NULL}.
#endif
@@ -2750,8 +2768,8 @@ index fe639d18bd2815a5ec33aef28720386725ab1bd5..0b5691adc3f6ed9013472568d9d00149
static char *
diff --git a/libiberty/make-temp-file.c b/libiberty/make-temp-file.c
index 244cc23c5090e1c0d227820dc703adbc8022f8d5..5edcd153410bcd459a0546fd9d3cef6ee91a29af 100644
---- libiberty/make-temp-file.c
-+++ libiberty/make-temp-file.c
+--- a/libiberty/make-temp-file.c
++++ b/libiberty/make-temp-file.c
@@ -38,25 +38,26 @@ Boston, MA 02110-1301, USA. */
#include <sys/file.h> /* May get R_OK, etc. on some systems. */
#endif
@@ -2848,7 +2866,7 @@ diff --git a/libiberty/pex-amigaos.c b/libiberty/pex-amigaos.c
new file mode 100644
index 0000000000000000000000000000000000000000..0c61a108764c8501f8a2e9552c7c07499f402b1a
--- /dev/null
-+++ libiberty/pex-amigaos.c
++++ b/libiberty/pex-amigaos.c
@@ -0,0 +1,325 @@
+/* Utilities to execute a program in a subprocess (possibly linked by pipes
+ with other subprocesses), and wait for it. Generic AMIGAOS specialization.
@@ -3176,10 +3194,10 @@ index 0000000000000000000000000000000000000000..0c61a108764c8501f8a2e9552c7c0749
+ return 0;
+}
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
-index 8cd4c76e70d82a9913c45f26b99e386ad659a3a0..b14ada402280cf8afa221731680d82b794a83352 100755
---- libstdc++-v3/configure
-+++ libstdc++-v3/configure
-@@ -77229,12 +77229,171 @@ done
+index 41797a971b536fa06dc4b6d4733f75e6aef2d6a3..921cca221ee01662ac8e1be2c20077b55586db9f 100755
+--- a/libstdc++-v3/configure
++++ b/libstdc++-v3/configure
+@@ -78187,12 +78187,171 @@ done
$as_echo "#define HAVE_TANF 1" >>confdefs.h
@@ -3351,7 +3369,7 @@ index 8cd4c76e70d82a9913c45f26b99e386ad659a3a0..b14ada402280cf8afa221731680d82b7
esac
fi
-@@ -80295,43 +80454,1687 @@ $as_echo "$gxx_include_dir" >&6; }
+@@ -81355,43 +81514,1687 @@ $as_echo "$gxx_include_dir" >&6; }
WARN_FLAGS='-Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi'
@@ -5063,7 +5081,7 @@ index 8cd4c76e70d82a9913c45f26b99e386ad659a3a0..b14ada402280cf8afa221731680d82b7
# loading this file, other *unset* `ac_cv_foo' will be assigned the
# following values.
-@@ -81494,12 +83297,13 @@ fi
+@@ -82558,12 +84361,13 @@ fi
TIMESTAMP='$TIMESTAMP'
RM='$RM'
ofile='$ofile'
@@ -5078,10 +5096,10 @@ index 8cd4c76e70d82a9913c45f26b99e386ad659a3a0..b14ada402280cf8afa221731680d82b7
CC="$CC"
acx_cv_header_stdint="$acx_cv_header_stdint"
diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac
-index 580fb8b2eb8ab25bed4872f1d071ba925cf3dcff..76ddbdae13f46336f68672e217e5dfa2fdffee97 100644
---- libstdc++-v3/configure.ac
-+++ libstdc++-v3/configure.ac
-@@ -492,12 +492,15 @@ fi
+index 9e19e9927fd1b56e24199189cc8e4df505855b73..50512c8a2d66cff6fadc54d22a9223f1840e0de0 100644
+--- a/libstdc++-v3/configure.ac
++++ b/libstdc++-v3/configure.ac
+@@ -495,12 +495,15 @@ fi
GLIBCXX_EXPORT_INSTALL_INFO
# Export all the include and flag information to Makefiles.
@@ -5098,10 +5116,10 @@ index 580fb8b2eb8ab25bed4872f1d071ba925cf3dcff..76ddbdae13f46336f68672e217e5dfa2
AC_CONFIG_FILES([scripts/testsuite_flags],[chmod +x scripts/testsuite_flags])
AC_CONFIG_FILES([scripts/extract_symvers],[chmod +x scripts/extract_symvers])
diff --git a/libstdc++-v3/crossconfig.m4 b/libstdc++-v3/crossconfig.m4
-index 10247f940b55ee77df940044c3889b08b51cfb4c..c7d1034f4870e92dfd502d25bc7cc858f6a19370 100644
---- libstdc++-v3/crossconfig.m4
-+++ libstdc++-v3/crossconfig.m4
-@@ -266,11 +266,19 @@ case "${host}" in
+index ece12567794b7e61418bfb654318bf994dd99fc9..bcb83c81017bfb5496431f8b7f60018cfee93df9 100644
+--- a/libstdc++-v3/crossconfig.m4
++++ b/libstdc++-v3/crossconfig.m4
+@@ -267,11 +267,19 @@ case "${host}" in
AC_DEFINE(HAVE_SINF)
AC_DEFINE(HAVE_SINHF)
AC_DEFINE(HAVE_SQRTF)
@@ -5122,10 +5140,10 @@ index 10247f940b55ee77df940044c3889b08b51cfb4c..c7d1034f4870e92dfd502d25bc7cc858
esac
])
diff --git a/libstdc++-v3/include/c_global/cstddef b/libstdc++-v3/include/c_global/cstddef
-index 33f4f8f76bd497d345ec7440b9397427e26671eb..7c39a30d2bc41b4eb82b13c3d390cfce52854457 100644
---- libstdc++-v3/include/c_global/cstddef
-+++ libstdc++-v3/include/c_global/cstddef
-@@ -44,12 +44,15 @@
+index 1739121001e71914d148b804190e0c5ae0767e91..69a511c116b90e706e30ec00c5644bc7ce5f54ab 100644
+--- a/libstdc++-v3/include/c_global/cstddef
++++ b/libstdc++-v3/include/c_global/cstddef
+@@ -49,12 +49,15 @@
#include <bits/c++config.h>
#include <stddef.h>
@@ -5142,9 +5160,9 @@ index 33f4f8f76bd497d345ec7440b9397427e26671eb..7c39a30d2bc41b4eb82b13c3d390cfce
#endif // _GLIBCXX_CSTDDEF
diff --git a/libstdc++-v3/include/c_std/cstddef b/libstdc++-v3/include/c_std/cstddef
-index d46a4ea16388d674917a74620c3f50d43de84bb6..9189ed063448a45439a265bf4a51cc36e0c731ed 100644
---- libstdc++-v3/include/c_std/cstddef
-+++ libstdc++-v3/include/c_std/cstddef
+index 58d4f4bb060de34ea2284d1b3ce908e360268a8a..21a77fcc3af4e3f05f2a79274dfa89c7e586dad1 100644
+--- a/libstdc++-v3/include/c_std/cstddef
++++ b/libstdc++-v3/include/c_std/cstddef
@@ -44,12 +44,15 @@
#include <bits/c++config.h>
#include <stddef.h>
@@ -5162,5 +5180,5 @@ index d46a4ea16388d674917a74620c3f50d43de84bb6..9189ed063448a45439a265bf4a51cc36
#endif // _GLIBCXX_CSTDDEF
--
-2.1.4
+1.9.1
diff --git a/ppc-amigaos/recipes/patches/gcc/0002-Added-new-function-attribute-lineartags-and-pragma-a.p b/ppc-amigaos/recipes/patches/gcc/0002-Added-new-function-attribute-lineartags-and-pragma-a.p
index 1eec43a..9250254 100644
--- a/ppc-amigaos/recipes/patches/gcc/0002-Added-new-function-attribute-lineartags-and-pragma-a.p
+++ b/ppc-amigaos/recipes/patches/gcc/0002-Added-new-function-attribute-lineartags-and-pragma-a.p
@@ -1,7 +1,7 @@
-From c8d51b6ed56c643f9744d7a18fee3b13a76b98d3 Mon Sep 17 00:00:00 2001
+From cf7a9bcb04858a3a694cc64ccd440dd560bfc7a9 Mon Sep 17 00:00:00 2001
From: Sebastian Bauer <mail@sebastianbauer.info>
Date: Fri, 14 Nov 2014 20:03:56 +0100
-Subject: [PATCH 2/6] Added new function attribute "lineartags" and pragma
+Subject: [PATCH 2/9] Added new function attribute "lineartags" and pragma
"amigaos tagtype".
Functions that have the lineartags attribute are assumed to be functions
@@ -38,10 +38,10 @@ functions.
5 files changed, 171 insertions(+)
diff --git a/gcc/c-family/c-pragma.c b/gcc/c-family/c-pragma.c
-index 6894f0e7c3d1ea932ff05f370680be3d18dfcf94..24278250901bfa75c9aae9be63a62351f33e390e 100644
---- gcc/c-family/c-pragma.c
-+++ gcc/c-family/c-pragma.c
-@@ -1066,12 +1066,21 @@ handle_pragma_message (cpp_reader *ARG_UNUSED(dummy))
+index c73aa8221049b85949b0b62e88f58120e43aa39d..6cda91994f9140398841610063c297735b797863 100644
+--- a/gcc/c-family/c-pragma.c
++++ b/gcc/c-family/c-pragma.c
+@@ -1124,12 +1124,21 @@ handle_pragma_message (cpp_reader *ARG_UNUSED(dummy))
warning (OPT_Wpragmas, "junk at end of %<#pragma message%>");
if (TREE_STRING_LENGTH (message) > 1)
@@ -63,7 +63,7 @@ index 6894f0e7c3d1ea932ff05f370680be3d18dfcf94..24278250901bfa75c9aae9be63a62351
void
mark_valid_location_for_stdc_pragma (bool flag)
-@@ -1483,12 +1492,13 @@ init_pragma (void)
+@@ -1555,12 +1564,13 @@ init_pragma (void)
c_register_pragma_with_expansion (0, "redefine_extname",
handle_pragma_redefine_extname);
@@ -75,18 +75,18 @@ index 6894f0e7c3d1ea932ff05f370680be3d18dfcf94..24278250901bfa75c9aae9be63a62351
REGISTER_TARGET_PRAGMAS ();
#endif
- /* Allow plugins to register their own pragmas. */
- invoke_plugin_callbacks (PLUGIN_PRAGMAS, NULL);
+ global_sso = default_sso;
+ c_register_pragma (0, "scalar_storage_order",
diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c
-index 86cbc404a4c10edac0ce2341ae0099f624ee36ea..cc77530b090576db35610468052d84763c3965fd 100644
---- gcc/c/c-parser.c
-+++ gcc/c/c-parser.c
-@@ -80,12 +80,74 @@ along with GCC; see the file COPYING3. If not see
- #include "cgraph.h"
- #include "plugin.h"
- #include "omp-low.h"
- #include "builtins.h"
- #include "gomp-constants.h"
+index 1b6bacd7498fb8ec37dc4b76bcfa26eacc1c8e1b..60eecd4854780322205cee5d47727d3376a6c9eb 100644
+--- a/gcc/c/c-parser.c
++++ b/gcc/c/c-parser.c
+@@ -84,12 +84,74 @@ set_c_expr_source_range (c_expr *expr,
+ {
+ expr->src_range = src_range;
+ if (expr->value)
+ set_source_range (expr->value, src_range);
+ }
+static htab_t amigaos_tagdecl_to_type;
+
@@ -156,7 +156,7 @@ index 86cbc404a4c10edac0ce2341ae0099f624ee36ea..cc77530b090576db35610468052d8476
void
c_parse_init (void)
{
-@@ -2390,12 +2452,15 @@ c_parser_declspecs (c_parser *parser, struct c_declspecs *specs,
+@@ -2514,12 +2576,15 @@ c_parser_declspecs (c_parser *parser, struct c_declspecs *specs,
goto out;
attrs_ok = true;
seen_type = true;
@@ -172,7 +172,7 @@ index 86cbc404a4c10edac0ce2341ae0099f624ee36ea..cc77530b090576db35610468052d8476
if (!typespec_ok)
goto out;
attrs_ok = true;
-@@ -9590,12 +9655,32 @@ c_parser_objc_at_dynamic_declaration (c_parser *parser)
+@@ -10011,12 +10076,32 @@ c_parser_objc_at_dynamic_declaration (c_parser *parser)
}
c_parser_skip_until_found (parser, CPP_SEMICOLON, "expected %<;%>");
objc_add_dynamic_declaration (loc, list);
@@ -205,7 +205,7 @@ index 86cbc404a4c10edac0ce2341ae0099f624ee36ea..cc77530b090576db35610468052d8476
true if we actually parsed such a pragma. */
static bool
-@@ -9777,12 +9862,56 @@ c_parser_pragma (c_parser *parser, enum pragma_context context)
+@@ -10210,12 +10295,56 @@ c_parser_pragma (c_parser *parser, enum pragma_context context, bool *if_p)
break;
}
@@ -263,10 +263,10 @@ index 86cbc404a4c10edac0ce2341ae0099f624ee36ea..cc77530b090576db35610468052d8476
c_parser_skip_to_pragma_eol (parser);
diff --git a/gcc/c/c-typeck.c b/gcc/c/c-typeck.c
-index a98622b16f546b88eb7fdce9ca7631c3ca37470a..2c03a10f1127c2bec5d9280ecc2f786fd5d13153 100644
---- gcc/c/c-typeck.c
-+++ gcc/c/c-typeck.c
-@@ -3100,12 +3100,14 @@ convert_arguments (location_t loc, vec<location_t> arg_loc, tree typelist,
+index b1c5cd6d3db3bd6d21185bcb49af14d9bfc83d12..ebb7f5741007c6769e4af94c3c6b856af305132c 100644
+--- a/gcc/c/c-typeck.c
++++ b/gcc/c/c-typeck.c
+@@ -3169,12 +3169,14 @@ convert_arguments (location_t loc, vec<location_t> arg_loc, tree typelist,
unsigned int parmnum;
bool error_args = false;
const bool type_generic = fundecl
@@ -281,7 +281,7 @@ index a98622b16f546b88eb7fdce9ca7631c3ca37470a..2c03a10f1127c2bec5d9280ecc2f786f
if (TREE_CODE (function) == ADDR_EXPR
&& TREE_CODE (TREE_OPERAND (function, 0)) == FUNCTION_DECL)
function = TREE_OPERAND (function, 0);
-@@ -3139,12 +3141,14 @@ convert_arguments (location_t loc, vec<location_t> arg_loc, tree typelist,
+@@ -3208,12 +3210,14 @@ convert_arguments (location_t loc, vec<location_t> arg_loc, tree typelist,
if (flag_cilkplus && fundecl && is_cilkplus_reduce_builtin (fundecl))
return vec_safe_length (values);
@@ -296,7 +296,7 @@ index a98622b16f546b88eb7fdce9ca7631c3ca37470a..2c03a10f1127c2bec5d9280ecc2f786f
{
tree type = typetail ? TREE_VALUE (typetail) : 0;
tree valtype = TREE_TYPE (val);
-@@ -3193,12 +3197,32 @@ convert_arguments (location_t loc, vec<location_t> arg_loc, tree typelist,
+@@ -3262,12 +3266,32 @@ convert_arguments (location_t loc, vec<location_t> arg_loc, tree typelist,
}
val = c_fully_fold (val, false, NULL);
STRIP_TYPE_NOPS (val);
@@ -331,8 +331,8 @@ index a98622b16f546b88eb7fdce9ca7631c3ca37470a..2c03a10f1127c2bec5d9280ecc2f786f
{
diff --git a/gcc/config/rs6000/amigaos-protos.h b/gcc/config/rs6000/amigaos-protos.h
index eb5f8fc5f3d546b8d8e1cdd8118a3085079df50e..3b8c994cdbd192eaf7112c780f0106a4d96cbb90 100644
---- gcc/config/rs6000/amigaos-protos.h
-+++ gcc/config/rs6000/amigaos-protos.h
+--- a/gcc/config/rs6000/amigaos-protos.h
++++ b/gcc/config/rs6000/amigaos-protos.h
@@ -27,12 +27,13 @@ extern void amigaos_function_arg_advance (CUMULATIVE_ARGS *, enum machine_mode,
extern struct rtx_def *amigaos_function_arg (CUMULATIVE_ARGS *, enum machine_mode, tree, int);
extern void amigaos_expand_builtin_va_start (tree valist, rtx nextarg);
@@ -348,10 +348,10 @@ index eb5f8fc5f3d546b8d8e1cdd8118a3085079df50e..3b8c994cdbd192eaf7112c780f0106a4
extern int amigaos_baserel_operand(rtx x);
extern int amigaos_not_baserel_tree_p(tree decl);
diff --git a/gcc/config/rs6000/amigaos.c b/gcc/config/rs6000/amigaos.c
-index 0f575a38e4dc4aac0b454c56bf62f625c0f7eb9c..ccf4f912cb66cd424a2398c6535e05fa493f39f1 100644
---- gcc/config/rs6000/amigaos.c
-+++ gcc/config/rs6000/amigaos.c
-@@ -345,12 +345,19 @@ amigaos_handle_linearvarargs_attribute (tree *node, tree name,
+index a6da7d543241e2fc8cf51a952633c62e19d7d875..797261177e46a34ac0aba97f2b9c2b8af8df2e72 100644
+--- a/gcc/config/rs6000/amigaos.c
++++ b/gcc/config/rs6000/amigaos.c
+@@ -342,12 +342,19 @@ amigaos_handle_linearvarargs_attribute (tree *node, tree name,
*no_add_attrs = true;
}
@@ -372,5 +372,5 @@ index 0f575a38e4dc4aac0b454c56bf62f625c0f7eb9c..ccf4f912cb66cd424a2398c6535e05fa
amigaos_legitimize_baserel_address (rtx addr)
{
--
-2.1.4
+1.9.1
diff --git a/ppc-amigaos/recipes/patches/gcc/0003-Disable-.machine-directive-generation.p b/ppc-amigaos/recipes/patches/gcc/0003-Disable-.machine-directive-generation.p
index edadf9d..5cb489d 100644
--- a/ppc-amigaos/recipes/patches/gcc/0003-Disable-.machine-directive-generation.p
+++ b/ppc-amigaos/recipes/patches/gcc/0003-Disable-.machine-directive-generation.p
@@ -1,7 +1,7 @@
-From 43dda55bb84a70181e84f496fd8417ed3c22db54 Mon Sep 17 00:00:00 2001
+From 0f8e76ecc9220e1d4e1f311a52a5e80bd4ad8bb8 Mon Sep 17 00:00:00 2001
From: Sebastian Bauer <mail@sebastianbauer.info>
Date: Thu, 9 Jul 2015 06:54:37 +0200
-Subject: [PATCH 3/6] Disable .machine directive generation.
+Subject: [PATCH 3/9] Disable .machine directive generation.
It breaks manual args to the assembler with different flavor,
e.g., -Wa,-m440. This is probably not the right fix.
@@ -12,10 +12,10 @@ This reverts parts of a commit from 2015-03-03.
1 file changed, 3 insertions(+)
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
-index ee0ea2ffabb6b9c6fdcba687d88be1e1164374ee..19544afa364f7f7ab1a5c5a61ad7891218398f99 100644
---- gcc/config/rs6000/rs6000.c
-+++ gcc/config/rs6000/rs6000.c
-@@ -5191,12 +5191,14 @@ rs6000_file_start (void)
+index cd79b2034b59168b07c84dd6bf32faaf4a648cd0..14b40fe386382a6b418176084c57ec8db73b4280 100644
+--- a/gcc/config/rs6000/rs6000.c
++++ b/gcc/config/rs6000/rs6000.c
+@@ -5689,12 +5689,14 @@ rs6000_file_start (void)
}
#ifdef USING_ELFOS_H
@@ -25,12 +25,12 @@ index ee0ea2ffabb6b9c6fdcba687d88be1e1164374ee..19544afa364f7f7ab1a5c5a61ad78912
+ /* Temporarily disabled as it overrides e.g., -mcpu=440 */
+#if 0
fputs ("\t.machine ", asm_out_file);
- if ((rs6000_isa_flags & OPTION_MASK_DIRECT_MOVE) != 0)
+ if ((rs6000_isa_flags & OPTION_MASK_MODULO) != 0)
+ fputs ("power9\n", asm_out_file);
+ else if ((rs6000_isa_flags & OPTION_MASK_DIRECT_MOVE) != 0)
fputs ("power8\n", asm_out_file);
else if ((rs6000_isa_flags & OPTION_MASK_POPCNTD) != 0)
- fputs ("power7\n", asm_out_file);
- else if ((rs6000_isa_flags & OPTION_MASK_CMPB) != 0)
-@@ -5206,12 +5208,13 @@ rs6000_file_start (void)
+@@ -5706,12 +5708,13 @@ rs6000_file_start (void)
else if ((rs6000_isa_flags & OPTION_MASK_MFCRF) != 0)
fputs ("power4\n", asm_out_file);
else if ((rs6000_isa_flags & OPTION_MASK_POWERPC64) != 0)
@@ -43,7 +43,7 @@ index ee0ea2ffabb6b9c6fdcba687d88be1e1164374ee..19544afa364f7f7ab1a5c5a61ad78912
if (DEFAULT_ABI == ABI_ELFv2)
fprintf (file, "\t.abiversion 2\n");
-
+ }
--
-2.1.4
+1.9.1
diff --git a/ppc-amigaos/recipes/patches/gcc/0004-The-default-link-mode-is-static-for-AmigaOS.p b/ppc-amigaos/recipes/patches/gcc/0004-The-default-link-mode-is-static-for-AmigaOS.p
index 5eeb4e5..37c0532 100644
--- a/ppc-amigaos/recipes/patches/gcc/0004-The-default-link-mode-is-static-for-AmigaOS.p
+++ b/ppc-amigaos/recipes/patches/gcc/0004-The-default-link-mode-is-static-for-AmigaOS.p
@@ -1,7 +1,7 @@
-From 8eb1aa062283f82007d639e862278a750f314da5 Mon Sep 17 00:00:00 2001
+From 0a073e9854a2f5b558631929467837cec073d624 Mon Sep 17 00:00:00 2001
From: Sebastian Bauer <mail@sebastianbauer.info>
Date: Wed, 2 Dec 2015 20:56:33 +0100
-Subject: [PATCH 4/6] The default link mode is static for AmigaOS.
+Subject: [PATCH 4/9] The default link mode is static for AmigaOS.
Changed the g++ driver to reflect this.
---
@@ -9,10 +9,10 @@ Changed the g++ driver to reflect this.
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/gcc/cp/g++spec.c b/gcc/cp/g++spec.c
-index 6536d7e776f861b4bd40277e96c80a635cbcc85e..ff1d77eaefc20039f7e5df48ffb849ee533b9797 100644
---- gcc/cp/g++spec.c
-+++ gcc/cp/g++spec.c
-@@ -102,14 +102,14 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options,
+index 03cbde090cb361f7f6244c97a91c8ad567d9a092..c8dec4b7a0ad1d95811dd9a50a7916e3b4c76336 100644
+--- a/gcc/cp/g++spec.c
++++ b/gcc/cp/g++spec.c
+@@ -101,14 +101,14 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options,
/* By default, we throw on the math library if we have one. */
int need_math = (MATH_LIBRARY[0] != '\0');
@@ -29,7 +29,7 @@ index 6536d7e776f861b4bd40277e96c80a635cbcc85e..ff1d77eaefc20039f7e5df48ffb849ee
/* The total number of arguments with the new stuff. */
unsigned int argc;
-@@ -196,12 +196,16 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options,
+@@ -195,12 +195,16 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options,
break;
case OPT_static:
@@ -47,5 +47,5 @@ index 6536d7e776f861b4bd40277e96c80a635cbcc85e..ff1d77eaefc20039f7e5df48ffb849ee
case OPT_static_libstdc__:
library = library >= 0 ? 2 : library;
--
-2.1.4
+1.9.1
diff --git a/ppc-amigaos/recipes/patches/gcc/0005-Disable-the-usage-of-dev-urandom-when-compiling-for-.p b/ppc-amigaos/recipes/patches/gcc/0005-Disable-the-usage-of-dev-urandom-when-compiling-for-.p
index 99621d8..639c405 100644
--- a/ppc-amigaos/recipes/patches/gcc/0005-Disable-the-usage-of-dev-urandom-when-compiling-for-.p
+++ b/ppc-amigaos/recipes/patches/gcc/0005-Disable-the-usage-of-dev-urandom-when-compiling-for-.p
@@ -1,7 +1,7 @@
-From c9b38a7315faed955e2f01e37f84d06ba32aa9b5 Mon Sep 17 00:00:00 2001
+From 5e6d152e0100b004ae0400739db545dcfa5f9671 Mon Sep 17 00:00:00 2001
From: Sebastian Bauer <mail@sebastianbauer.info>
Date: Wed, 2 Dec 2015 21:39:42 +0100
-Subject: [PATCH 5/6] Disable the usage of /dev/urandom when compiling for
+Subject: [PATCH 5/9] Disable the usage of /dev/urandom when compiling for
AmigaOS.
---
@@ -10,10 +10,10 @@ Subject: [PATCH 5/6] Disable the usage of /dev/urandom when compiling for
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/gcc/gcc.c b/gcc/gcc.c
-index d4d061080ba1166fb14069094556246b32265da4..8239a6b2152ac192498cd8a50b0d4b9c7db45c62 100644
---- gcc/gcc.c
-+++ gcc/gcc.c
-@@ -9124,22 +9124,25 @@ print_asm_header_spec_function (int arg ATTRIBUTE_UNUSED,
+index e88e6d3497c13a4e9a5d92d71de6128678ec546f..eb56ea7242ab51c941b88d72f8dee2a0381e2c8f 100644
+--- a/gcc/gcc.c
++++ b/gcc/gcc.c
+@@ -9511,22 +9511,25 @@ print_asm_header_spec_function (int arg ATTRIBUTE_UNUSED,
/* Get a random number for -frandom-seed */
static unsigned HOST_WIDE_INT
@@ -40,10 +40,10 @@ index d4d061080ba1166fb14069094556246b32265da4..8239a6b2152ac192498cd8a50b0d4b9c
struct timeval tv;
diff --git a/gcc/toplev.c b/gcc/toplev.c
-index cb6c51739ffc40d19f83efafb02d7670e4da2915..3ba2210c953d2dde2ab919808b86ed3e7a4f4d1e 100644
---- gcc/toplev.c
-+++ gcc/toplev.c
-@@ -288,22 +288,22 @@ static void
+index 8979d2634260b1e5ad1183ed26da444c47cd3631..de6cdfc5dfdadbef3851fa842d6566648720ffa7 100644
+--- a/gcc/toplev.c
++++ b/gcc/toplev.c
+@@ -238,22 +238,22 @@ static void
init_local_tick (void)
{
if (!flag_random_seed)
@@ -69,5 +69,5 @@ index cb6c51739ffc40d19f83efafb02d7670e4da2915..3ba2210c953d2dde2ab919808b86ed3e
gettimeofday (&tv, NULL);
--
-2.1.4
+1.9.1
diff --git a/ppc-amigaos/recipes/patches/gcc/0006-Expand-arg-zero-on-AmigaOS-using-the-PROGDIR-assign.p b/ppc-amigaos/recipes/patches/gcc/0006-Expand-arg-zero-on-AmigaOS-using-the-PROGDIR-assign.p
index 6f15af2..e729aae 100644
--- a/ppc-amigaos/recipes/patches/gcc/0006-Expand-arg-zero-on-AmigaOS-using-the-PROGDIR-assign.p
+++ b/ppc-amigaos/recipes/patches/gcc/0006-Expand-arg-zero-on-AmigaOS-using-the-PROGDIR-assign.p
@@ -1,7 +1,7 @@
-From 85c5321c36040abb1c3b70cb1e0f9bf217178957 Mon Sep 17 00:00:00 2001
+From 2b3f8d96dd38b95816ee32ab6e7564b4cf9001dd Mon Sep 17 00:00:00 2001
From: Sebastian Bauer <mail@sebastianbauer.info>
Date: Sat, 5 Dec 2015 13:17:26 +0100
-Subject: [PATCH 6/6] Expand arg zero on AmigaOS using the PROGDIR: assign.
+Subject: [PATCH 6/9] Expand arg zero on AmigaOS using the PROGDIR: assign.
This should make sure that the proper relative paths are computed during
process_command().
@@ -10,10 +10,10 @@ process_command().
1 file changed, 10 insertions(+)
diff --git a/gcc/gcc.c b/gcc/gcc.c
-index 8239a6b2152ac192498cd8a50b0d4b9c7db45c62..f6f1ba3195a4ffc8e335d7abe797d4b006fc96d5 100644
---- gcc/gcc.c
-+++ gcc/gcc.c
-@@ -6898,12 +6898,22 @@ compare_files (char *cmpfile[])
+index eb56ea7242ab51c941b88d72f8dee2a0381e2c8f..4184cf1f3ac8063f9ae8f4b76da1e5e33c6f76cd 100644
+--- a/gcc/gcc.c
++++ b/gcc/gcc.c
+@@ -7166,12 +7166,22 @@ driver::~driver ()
int
driver::main (int argc, char **argv)
{
@@ -37,5 +37,5 @@ index 8239a6b2152ac192498cd8a50b0d4b9c7db45c62..f6f1ba3195a4ffc8e335d7abe797d4b0
set_up_specs ();
putenv_COLLECT_GCC (argv[0]);
--
-2.1.4
+1.9.1
diff --git a/ppc-amigaos/recipes/patches/gcc/0007-Some-AmigaOS-4.x-compability-changes-for-posix-threa.p b/ppc-amigaos/recipes/patches/gcc/0007-Some-AmigaOS-4.x-compability-changes-for-posix-threa.p
new file mode 100644
index 0000000..1c70232
--- /dev/null
+++ b/ppc-amigaos/recipes/patches/gcc/0007-Some-AmigaOS-4.x-compability-changes-for-posix-threa.p
@@ -0,0 +1,85 @@
+From 213fc9c82cbd5935a67a991a753478994b9eb968 Mon Sep 17 00:00:00 2001
+From: Sebastian Bauer <mail@sebastianbauer.info>
+Date: Thu, 21 Jan 2016 20:46:59 +0100
+Subject: [PATCH 7/9] Some AmigaOS 4.x compability changes for posix thread
+ support.
+
+---
+ libgcc/gthr-posix.h | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/libgcc/gthr-posix.h b/libgcc/gthr-posix.h
+index 555c0fe2458fa3e0e96d769d3f36ae35db47e1bb..daee24052b68cea2159d68abd6cf6817e0d7a81b 100644
+--- a/libgcc/gthr-posix.h
++++ b/libgcc/gthr-posix.h
+@@ -29,12 +29,16 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ /* POSIX threads specific definitions.
+ Easy, since the interface is just one-to-one mapping. */
+
+ #define __GTHREADS 1
+ #define __GTHREADS_CXX0X 1
+
++#ifdef __amigaos4__
++#include <exec/types.h>
++#endif
++
+ #include <pthread.h>
+
+ #if ((defined(_LIBOBJC) || defined(_LIBOBJC_WEAK)) \
+ || !defined(_GTHREAD_USE_MUTEX_TIMEDLOCK))
+ # include <unistd.h>
+ # if defined(_POSIX_TIMEOUTS) && _POSIX_TIMEOUTS >= 0
+@@ -107,13 +111,15 @@ __gthrw(pthread_join)
+ __gthrw(pthread_equal)
+ __gthrw(pthread_self)
+ __gthrw(pthread_detach)
+ #ifndef __BIONIC__
+ __gthrw(pthread_cancel)
+ #endif
++#ifndef __amigaos4__
+ __gthrw(sched_yield)
++#endif
+
+ __gthrw(pthread_mutex_lock)
+ __gthrw(pthread_mutex_trylock)
+ #if _GTHREAD_USE_MUTEX_TIMEDLOCK
+ __gthrw(pthread_mutex_timedlock)
+ #endif
+@@ -444,14 +450,16 @@ __gthread_objc_thread_get_priority (void)
+ }
+
+ /* Yield our process time to another thread. */
+ static inline void
+ __gthread_objc_thread_yield (void)
+ {
++#ifndef __amigaos4__
+ if (__gthread_active_p ())
+ __gthrw_(sched_yield) ();
++#endif
+ }
+
+ /* Terminate the current thread. */
+ static inline int
+ __gthread_objc_thread_exit (void)
+ {
+@@ -686,13 +694,17 @@ __gthread_self (void)
+ return __gthrw_(pthread_self) ();
+ }
+
+ static inline int
+ __gthread_yield (void)
+ {
++#ifdef __amigaos4__
++ return 1;
++#else
+ return __gthrw_(sched_yield) ();
++#endif
+ }
+
+ static inline int
+ __gthread_once (__gthread_once_t *__once, void (*__func) (void))
+ {
+ if (__gthread_active_p ())
+--
+1.9.1
+
diff --git a/ppc-amigaos/recipes/patches/gcc/0008-Added-libstc-support-for-AmigaOS.p b/ppc-amigaos/recipes/patches/gcc/0008-Added-libstc-support-for-AmigaOS.p
new file mode 100644
index 0000000..7285812
--- /dev/null
+++ b/ppc-amigaos/recipes/patches/gcc/0008-Added-libstc-support-for-AmigaOS.p
@@ -0,0 +1,624 @@
+From 385667d2ba86a86f1d44651999d293a797650f30 Mon Sep 17 00:00:00 2001
+From: Sebastian Bauer <mail@sebastianbauer.info>
+Date: Fri, 22 Jan 2016 20:04:50 +0100
+Subject: [PATCH 8/9] Added libstc++ support for AmigaOS.
+
+---
+ libstdc++-v3/config/os/amigaos/ctype_base.h | 59 +++++++
+ .../config/os/amigaos/ctype_configure_char.cc | 99 ++++++++++++
+ libstdc++-v3/config/os/amigaos/ctype_inline.h | 173 ++++++++++++++++++++
+ libstdc++-v3/config/os/amigaos/error_constants.h | 178 +++++++++++++++++++++
+ libstdc++-v3/config/os/amigaos/os_defines.h | 43 +++++
+ libstdc++-v3/configure.host | 3 +
+ 6 files changed, 555 insertions(+)
+ create mode 100644 libstdc++-v3/config/os/amigaos/ctype_base.h
+ create mode 100644 libstdc++-v3/config/os/amigaos/ctype_configure_char.cc
+ create mode 100644 libstdc++-v3/config/os/amigaos/ctype_inline.h
+ create mode 100644 libstdc++-v3/config/os/amigaos/error_constants.h
+ create mode 100644 libstdc++-v3/config/os/amigaos/os_defines.h
+
+diff --git a/libstdc++-v3/config/os/amigaos/ctype_base.h b/libstdc++-v3/config/os/amigaos/ctype_base.h
+new file mode 100644
+index 0000000000000000000000000000000000000000..260b6142b6fc6a11a1e5f0bf7820b592d09f285e
+--- /dev/null
++++ b/libstdc++-v3/config/os/amigaos/ctype_base.h
+@@ -0,0 +1,59 @@
++// Locale support -*- C++ -*-
++
++// Copyright (C) 1997-2015 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
++// <http://www.gnu.org/licenses/>.
++
++//
++// ISO C++ 14882: 22.1 Locales
++//
++
++// Default information, may not be appropriate for specific host.
++
++namespace std _GLIBCXX_VISIBILITY(default)
++{
++_GLIBCXX_BEGIN_NAMESPACE_VERSION
++
++ /// @brief Base class for ctype.
++ struct ctype_base
++ {
++ // Non-standard typedefs.
++ typedef const int* __to_type;
++
++ // NB: Offsets into ctype<char>::_M_table force a particular size
++ // on the mask type. Because of this, we don't use an enum.
++ typedef unsigned int mask;
++ static const mask upper = 1 << 0;
++ static const mask lower = 1 << 1;
++ static const mask alpha = 1 << 2;
++ static const mask digit = 1 << 3;
++ static const mask xdigit = 1 << 4;
++ static const mask space = 1 << 5;
++ static const mask print = 1 << 6;
++ static const mask graph = (1 << 2) | (1 << 3) | (1 << 9); // alnum|punct
++ static const mask cntrl = 1 << 8;
++ static const mask punct = 1 << 9;
++ static const mask alnum = (1 << 2) | (1 << 3); // alpha|digit
++ static const mask blank = 1 << 10;
++ };
++
++_GLIBCXX_END_NAMESPACE_VERSION
++} // namespace
+diff --git a/libstdc++-v3/config/os/amigaos/ctype_configure_char.cc b/libstdc++-v3/config/os/amigaos/ctype_configure_char.cc
+new file mode 100644
+index 0000000000000000000000000000000000000000..e6f4895aee78da54bc6b1e01df00816206361c41
+--- /dev/null
++++ b/libstdc++-v3/config/os/amigaos/ctype_configure_char.cc
+@@ -0,0 +1,99 @@
++// Locale support -*- C++ -*-
++
++// Copyright (C) 2011-2015 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
++// <http://www.gnu.org/licenses/>.
++
++/** @file ctype_configure_char.cc */
++
++//
++// ISO C++ 14882: 22.1 Locales
++//
++
++#include <locale>
++#include <cstdlib>
++#include <cstring>
++
++namespace std _GLIBCXX_VISIBILITY(default)
++{
++_GLIBCXX_BEGIN_NAMESPACE_VERSION
++
++// Information as gleaned from /usr/include/ctype.h
++
++ const ctype_base::mask*
++ ctype<char>::classic_table() throw()
++ { return 0; }
++
++ ctype<char>::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<char>::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<char>::do_toupper(char __c) const
++ { return ::toupper((int) __c); }
++
++ const char*
++ ctype<char>::do_toupper(char* __low, const char* __high) const
++ {
++ while (__low < __high)
++ {
++ *__low = ::toupper((int) *__low);
++ ++__low;
++ }
++ return __high;
++ }
++
++ char
++ ctype<char>::do_tolower(char __c) const
++ { return ::tolower((int) __c); }
++
++ const char*
++ ctype<char>::do_tolower(char* __low, const char* __high) const
++ {
++ while (__low < __high)
++ {
++ *__low = ::tolower((int) *__low);
++ ++__low;
++ }
++ return __high;
++ }
++
++_GLIBCXX_END_NAMESPACE_VERSION
++} // namespace
+diff --git a/libstdc++-v3/config/os/amigaos/ctype_inline.h b/libstdc++-v3/config/os/amigaos/ctype_inline.h
+new file mode 100644
+index 0000000000000000000000000000000000000000..cfa0146ae6b70623c2fe63b864ceef7bce0d5fe0
+--- /dev/null
++++ b/libstdc++-v3/config/os/amigaos/ctype_inline.h
+@@ -0,0 +1,173 @@
++// Locale support -*- C++ -*-
++
++// Copyright (C) 2000-2015 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
++// <http://www.gnu.org/licenses/>.
++
++/** @file bits/ctype_inline.h
++ * This is an internal header file, included by other library headers.
++ * Do not attempt to use it directly. @headername{locale}
++ */
++
++//
++// 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<char>::
++ is(mask __m, char __c) const
++ {
++ if (_M_table)
++ return _M_table[static_cast<unsigned char>(__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<mask>(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;
++#ifdef _GLIBCXX_USE_C99_CTYPE_TR1
++ case blank:
++ __testis = isblank(__c);
++ break;
++#endif
++ default:
++ __testis = false;
++ break;
++ }
++ __ret |= __testis;
++ }
++ }
++ return __ret;
++ }
++ }
++
++ const char*
++ ctype<char>::
++ is(const char* __low, const char* __high, mask* __vec) const
++ {
++ if (_M_table)
++ while (__low < __high)
++ *__vec++ = _M_table[static_cast<unsigned char>(*__low++)];
++ else
++ {
++ // Highest bitmask in ctype_base == 11.
++ 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<mask>(1 << __i);
++ if (this->is(__bit, *__low))
++ __m |= __bit;
++ }
++ *__vec = __m;
++ }
++ }
++ return __high;
++ }
++
++ const char*
++ ctype<char>::
++ scan_is(mask __m, const char* __low, const char* __high) const
++ {
++ if (_M_table)
++ while (__low < __high
++ && !(_M_table[static_cast<unsigned char>(*__low)] & __m))
++ ++__low;
++ else
++ while (__low < __high && !this->is(__m, *__low))
++ ++__low;
++ return __low;
++ }
++
++ const char*
++ ctype<char>::
++ scan_not(mask __m, const char* __low, const char* __high) const
++ {
++ if (_M_table)
++ while (__low < __high
++ && (_M_table[static_cast<unsigned char>(*__low)] & __m) != 0)
++ ++__low;
++ else
++ while (__low < __high && this->is(__m, *__low) != 0)
++ ++__low;
++ return __low;
++ }
++
++_GLIBCXX_END_NAMESPACE_VERSION
++} // namespace
+diff --git a/libstdc++-v3/config/os/amigaos/error_constants.h b/libstdc++-v3/config/os/amigaos/error_constants.h
+new file mode 100644
+index 0000000000000000000000000000000000000000..74492cf61c875eac28cb8a86d5bfdb3b8807aa16
+--- /dev/null
++++ b/libstdc++-v3/config/os/amigaos/error_constants.h
+@@ -0,0 +1,178 @@
++// Specific definitions for generic platforms -*- C++ -*-
++
++// Copyright (C) 2007-2015 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
++// <http://www.gnu.org/licenses/>.
++
++/** @file bits/error_constants.h
++ * This is an internal header file, included by other library headers.
++ * Do not attempt to use it directly. @headername{system_error}
++ */
++
++#ifndef _GLIBCXX_ERROR_CONSTANTS
++#define _GLIBCXX_ERROR_CONSTANTS 1
++
++#include <bits/c++config.h>
++#include <cerrno>
++
++namespace std _GLIBCXX_VISIBILITY(default)
++{
++_GLIBCXX_BEGIN_NAMESPACE_VERSION
++
++ enum class errc
++ {
++ address_family_not_supported = EAFNOSUPPORT,
++ address_in_use = EADDRINUSE,
++ address_not_available = EADDRNOTAVAIL,
++ already_connected = EISCONN,
++ argument_list_too_long = E2BIG,
++ argument_out_of_domain = EDOM,
++ bad_address = EFAULT,
++ bad_file_descriptor = EBADF,
++
++#ifdef _GLIBCXX_HAVE_EBADMSG
++ bad_message = EBADMSG,
++#endif
++
++ broken_pipe = EPIPE,
++ connection_aborted = ECONNABORTED,
++ connection_already_in_progress = EALREADY,
++ connection_refused = ECONNREFUSED,
++ connection_reset = ECONNRESET,
++ cross_device_link = EXDEV,
++ destination_address_required = EDESTADDRREQ,
++ device_or_resource_busy = EBUSY,
++ directory_not_empty = ENOTEMPTY,
++ executable_format_error = ENOEXEC,
++ file_exists = EEXIST,
++ file_too_large = EFBIG,
++ filename_too_long = ENAMETOOLONG,
++ function_not_supported = ENOSYS,
++ host_unreachable = EHOSTUNREACH,
++
++#ifdef _GLIBCXX_HAVE_EIDRM
++ identifier_removed = EIDRM,
++#endif
++
++ illegal_byte_sequence = EILSEQ,
++ inappropriate_io_control_operation = ENOTTY,
++ interrupted = EINTR,
++ invalid_argument = EINVAL,
++ invalid_seek = ESPIPE,
++ io_error = EIO,
++ is_a_directory = EISDIR,
++ message_size = EMSGSIZE,
++ network_down = ENETDOWN,
++ network_reset = ENETRESET,
++ network_unreachable = ENETUNREACH,
++ no_buffer_space = ENOBUFS,
++ no_child_process = ECHILD,
++
++#ifdef _GLIBCXX_HAVE_ENOLINK
++ no_link = ENOLINK,
++#endif
++
++ no_lock_available = ENOLCK,
++
++#ifdef _GLIBCXX_HAVE_ENODATA
++ no_message_available = ENODATA,
++#endif
++
++ no_message = ENOMSG,
++ no_protocol_option = ENOPROTOOPT,
++ no_space_on_device = ENOSPC,
++
++#ifdef _GLIBCXX_HAVE_ENOSR
++ no_stream_resources = ENOSR,
++#endif
++
++ no_such_device_or_address = ENXIO,
++ no_such_device = ENODEV,
++ no_such_file_or_directory = ENOENT,
++ no_such_process = ESRCH,
++ not_a_directory = ENOTDIR,
++ not_a_socket = ENOTSOCK,
++
++#ifdef _GLIBCXX_HAVE_ENOSTR
++ not_a_stream = ENOSTR,
++#endif
++
++ not_connected = ENOTCONN,
++ not_enough_memory = ENOMEM,
++
++#ifdef _GLIBCXX_HAVE_ENOTSUP
++ not_supported = ENOTSUP,
++#endif
++
++#ifdef _GLIBCXX_HAVE_ECANCELED
++ operation_canceled = ECANCELED,
++#endif
++
++ operation_in_progress = EINPROGRESS,
++ operation_not_permitted = EPERM,
++ operation_not_supported = EOPNOTSUPP,
++ operation_would_block = EWOULDBLOCK,
++
++#ifdef _GLIBCXX_HAVE_EOWNERDEAD
++ owner_dead = EOWNERDEAD,
++#endif
++
++ permission_denied = EACCES,
++
++#ifdef _GLIBCXX_HAVE_EPROTO
++ protocol_error = EPROTO,
++#endif
++
++ protocol_not_supported = EPROTONOSUPPORT,
++ read_only_file_system = EROFS,
++ resource_deadlock_would_occur = EDEADLK,
++ resource_unavailable_try_again = EAGAIN,
++ result_out_of_range = ERANGE,
++
++#ifdef _GLIBCXX_HAVE_ENOTRECOVERABLE
++ state_not_recoverable = ENOTRECOVERABLE,
++#endif
++
++#ifdef _GLIBCXX_HAVE_ETIME
++ stream_timeout = ETIME,
++#endif
++
++#ifdef _GLIBCXX_HAVE_ETXTBSY
++ text_file_busy = ETXTBSY,
++#endif
++
++ timed_out = ETIMEDOUT,
++ too_many_files_open_in_system = ENFILE,
++ too_many_files_open = EMFILE,
++ too_many_links = EMLINK,
++ too_many_symbolic_link_levels = ELOOP,
++
++#ifdef _GLIBCXX_HAVE_EOVERFLOW
++ value_too_large = EOVERFLOW,
++#endif
++
++ wrong_protocol_type = EPROTOTYPE
++ };
++
++_GLIBCXX_END_NAMESPACE_VERSION
++} // namespace
++
++#endif
+diff --git a/libstdc++-v3/config/os/amigaos/os_defines.h b/libstdc++-v3/config/os/amigaos/os_defines.h
+new file mode 100644
+index 0000000000000000000000000000000000000000..346f063958cd7e80ebf97be4acee0bdf391cb811
+--- /dev/null
++++ b/libstdc++-v3/config/os/amigaos/os_defines.h
+@@ -0,0 +1,43 @@
++// Specific definitions for AmigaOS -*- C++ -*-
++
++// Copyright (C) 2000-2015 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
++// <http://www.gnu.org/licenses/>.
++
++/** @file bits/os_defines.h
++ * This is an internal header file, included by other library headers.
++ * Do not attempt to use it directly. @headername{iosfwd}
++ */
++
++#ifndef _GLIBCXX_OS_DEFINES
++#define _GLIBCXX_OS_DEFINES 1
++
++// System-specific #define, typedefs, corrections, etc, go here. This
++// file will come before all others.
++
++// No ioctl() on AmigaOS
++#define _GLIBCXX_NO_IOCTL 1
++
++#ifdef __NEWLIB__
++#define _GLIBCXX_USE_C99_STDINT_TR1 1
++#endif
++
++#endif
+diff --git a/libstdc++-v3/configure.host b/libstdc++-v3/configure.host
+index 0b366eafaae8cfa0abd09128bd8ac16b9f775c7c..e54afbc0c30a4b0a40949d9ed78f64661224c253 100644
+--- a/libstdc++-v3/configure.host
++++ b/libstdc++-v3/configure.host
+@@ -223,12 +223,15 @@ case "${host_os}" in
+ atomicity_dir="os/aix"
+ ;;
+ aix*)
+ os_include_dir="os/generic"
+ atomicity_dir="cpu/generic"
+ ;;
++ amigaos*)
++ os_include_dir="os/amigaos"
++ ;;
+ bsd*)
+ # Plain BSD attempts to share FreeBSD files.
+ os_include_dir="os/bsd/freebsd"
+ ;;
+ cygwin*)
+ os_include_dir="os/newlib"
+--
+1.9.1
+
diff --git a/ppc-amigaos/recipes/patches/gcc/0009-Added-e500-support-for-AmigaOS.p b/ppc-amigaos/recipes/patches/gcc/0009-Added-e500-support-for-AmigaOS.p
new file mode 100644
index 0000000..2f80c33
--- /dev/null
+++ b/ppc-amigaos/recipes/patches/gcc/0009-Added-e500-support-for-AmigaOS.p
@@ -0,0 +1,31 @@
+From e4c6c0e05575c8aab06e5d2a16ac183f83206cbc Mon Sep 17 00:00:00 2001
+From: Sebastian Bauer <mail@sebastianbauer.info>
+Date: Mon, 30 Jan 2017 20:49:17 +0100
+Subject: [PATCH 9/9] Added e500 support for AmigaOS.
+
+---
+ gcc/config.gcc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gcc/config.gcc b/gcc/config.gcc
+index d262672083d57bd77846ba9277aeb3ef5279d11e..3699a9831cccbb6a74ed0f8b2ddf5574bee1f086 100644
+--- a/gcc/config.gcc
++++ b/gcc/config.gcc
+@@ -2295,13 +2295,13 @@ nvptx-*)
+ ;;
+ pdp11-*-*)
+ tm_file="${tm_file} newlib-stdint.h"
+ use_gcc_stdint=wrap
+ ;;
+ powerpc-*-amigaos*)
+- tm_file="${tm_file} dbxelf.h elfos.h rs6000/sysv4.h rs6000/amigaos.h"
++ tm_file="${tm_file} dbxelf.h elfos.h rs6000/sysv4.h rs6000/amigaos.h rs6000/e500.h"
+ tm_p_file="${tm_p_file} rs6000/amigaos-protos.h"
+ extra_options="${extra_options} rs6000/sysv4.opt rs6000/amigaos.opt"
+ tmake_file="rs6000/t-amigaos"
+ extra_objs=amigaos.o
+ use_collect2=no
+ ;;
+--
+1.9.1
+