diff --git a/SOURCES/gcc48-pr62258.patch b/SOURCES/gcc48-pr62258.patch
new file mode 100644
index 0000000..4589214
--- /dev/null
+++ b/SOURCES/gcc48-pr62258.patch
@@ -0,0 +1,87 @@
+2015-09-03  Jonathan Wakely  <jwakely@redhat.com>
+
+	Backport from mainline
+	2015-04-27  Dmitry Prokoptsev  <dprokoptsev@gmail.com>
+		    Michael Hanselmann  <public@hansmi.ch>
+
+	PR libstdc++/62258
+	* libsupc++/eh_ptr.cc (rethrow_exception): Increment count of
+	uncaught exceptions.
+	* testsuite/18_support/exception_ptr/62258.cc: New.
+
+--- libstdc++-v3/libsupc++/eh_ptr.cc	(revision 227455)
++++ libstdc++-v3/libsupc++/eh_ptr.cc	(revision 227456)
+@@ -245,6 +245,9 @@ std::rethrow_exception(std::exception_pt
+   __GXX_INIT_DEPENDENT_EXCEPTION_CLASS(dep->unwindHeader.exception_class);
+   dep->unwindHeader.exception_cleanup = __gxx_dependent_exception_cleanup;
+ 
++  __cxa_eh_globals *globals = __cxa_get_globals ();
++  globals->uncaughtExceptions += 1;
++
+ #ifdef _GLIBCXX_SJLJ_EXCEPTIONS
+   _Unwind_SjLj_RaiseException (&dep->unwindHeader);
+ #else
+--- libstdc++-v3/testsuite/18_support/exception_ptr/62258.cc	(revision 0)
++++ libstdc++-v3/testsuite/18_support/exception_ptr/62258.cc	(revision 227456)
+@@ -0,0 +1,61 @@
++// { dg-options "-std=gnu++11" }
++// { dg-require-atomic-builtins "" }
++
++// Copyright (C) 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.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING3.  If not see
++// <http://www.gnu.org/licenses/>.
++
++// PR libstdc++/62258
++
++#include <exception>
++#include <testsuite_hooks.h>
++
++struct check_on_destruct
++{
++  ~check_on_destruct();
++};
++
++check_on_destruct::~check_on_destruct()
++{
++  VERIFY(std::uncaught_exception());
++}
++
++int main ()
++{
++  VERIFY(!std::uncaught_exception());
++
++  try
++    {
++      check_on_destruct check;
++
++      try
++        {
++          throw 1;
++        }
++      catch (...)
++        {
++          VERIFY(!std::uncaught_exception());
++
++          std::rethrow_exception(std::current_exception());
++        }
++    }
++  catch (...)
++    {
++      VERIFY(!std::uncaught_exception());
++    }
++
++  VERIFY(!std::uncaught_exception());
++}
diff --git a/SOURCES/gcc48-pr66731.patch b/SOURCES/gcc48-pr66731.patch
new file mode 100644
index 0000000..daf20b3
--- /dev/null
+++ b/SOURCES/gcc48-pr66731.patch
@@ -0,0 +1,111 @@
+2015-08-04  Szabolcs Nagy  <szabolcs.nagy@arm.com>
+
+	Backport from mainline:
+	2015-07-06  Szabolcs Nagy  <szabolcs.nagy@arm.com>
+
+	PR target/66731
+	* config/aarch64/aarch64.md (fnmul<mode>3): Handle -frounding-math.
+
+	* gcc.target/aarch64/fnmul-1.c: New.
+	* gcc.target/aarch64/fnmul-2.c: New.
+	* gcc.target/aarch64/fnmul-3.c: New.
+	* gcc.target/aarch64/fnmul-4.c: New.
+
+--- gcc/config/aarch64/aarch64.md	(revision 226591)
++++ gcc/config/aarch64/aarch64.md	(revision 226592)
+@@ -3101,6 +3101,17 @@
+         (mult:GPF
+ 		 (neg:GPF (match_operand:GPF 1 "register_operand" "w"))
+ 		 (match_operand:GPF 2 "register_operand" "w")))]
++  "TARGET_FLOAT && !flag_rounding_math"
++  "fnmul\\t%<s>0, %<s>1, %<s>2"
++  [(set_attr "v8type" "fmul")
++   (set_attr "mode" "<MODE>")]
++)
++
++(define_insn "*fnmul<mode>3"
++  [(set (match_operand:GPF 0 "register_operand" "=w")
++        (neg:GPF (mult:GPF
++		 (match_operand:GPF 1 "register_operand" "w")
++		 (match_operand:GPF 2 "register_operand" "w"))))]
+   "TARGET_FLOAT"
+   "fnmul\\t%<s>0, %<s>1, %<s>2"
+   [(set_attr "v8type" "fmul")
+--- gcc/testsuite/gcc.target/aarch64/fnmul-1.c	(nonexistent)
++++ gcc/testsuite/gcc.target/aarch64/fnmul-1.c	(revision 226592)
+@@ -0,0 +1,16 @@
++/* { dg-do compile } */
++/* { dg-options "-O2" } */
++
++double
++foo_d (double a, double b)
++{
++  /* { dg-final { scan-assembler "fnmul\\td\[0-9\]+, d\[0-9\]+, d\[0-9\]+" } } */
++  return -a * b;
++}
++
++float
++foo_s (float a, float b)
++{
++  /* { dg-final { scan-assembler "fnmul\\ts\[0-9\]+, s\[0-9\]+, s\[0-9\]+" } } */
++  return -a * b;
++}
+--- gcc/testsuite/gcc.target/aarch64/fnmul-2.c	(nonexistent)
++++ gcc/testsuite/gcc.target/aarch64/fnmul-2.c	(revision 226592)
+@@ -0,0 +1,18 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -frounding-math" } */
++
++double
++foo_d (double a, double b)
++{
++  /* { dg-final { scan-assembler "fneg\\td\[0-9\]+, d\[0-9\]+" } } */
++  /* { dg-final { scan-assembler "fmul\\td\[0-9\]+, d\[0-9\]+, d\[0-9\]+" } } */
++  return -a * b;
++}
++
++float
++foo_s (float a, float b)
++{
++  /* { dg-final { scan-assembler "fneg\\ts\[0-9\]+, s\[0-9\]+" } } */
++  /* { dg-final { scan-assembler "fmul\\ts\[0-9\]+, s\[0-9\]+, s\[0-9\]+" } } */
++  return -a * b;
++}
+--- gcc/testsuite/gcc.target/aarch64/fnmul-3.c	(nonexistent)
++++ gcc/testsuite/gcc.target/aarch64/fnmul-3.c	(revision 226592)
+@@ -0,0 +1,16 @@
++/* { dg-do compile } */
++/* { dg-options "-O2" } */
++
++double
++foo_d (double a, double b)
++{
++  /* { dg-final { scan-assembler "fnmul\\td\[0-9\]+, d\[0-9\]+, d\[0-9\]+" } } */
++  return -(a * b);
++}
++
++float
++foo_s (float a, float b)
++{
++  /* { dg-final { scan-assembler "fnmul\\ts\[0-9\]+, s\[0-9\]+, s\[0-9\]+" } } */
++  return -(a * b);
++}
+--- gcc/testsuite/gcc.target/aarch64/fnmul-4.c	(nonexistent)
++++ gcc/testsuite/gcc.target/aarch64/fnmul-4.c	(revision 226592)
+@@ -0,0 +1,16 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -frounding-math" } */
++
++double
++foo_d (double a, double b)
++{
++  /* { dg-final { scan-assembler "fnmul\\td\[0-9\]+, d\[0-9\]+, d\[0-9\]+" } } */
++  return -(a * b);
++}
++
++float
++foo_s (float a, float b)
++{
++  /* { dg-final { scan-assembler "fnmul\\ts\[0-9\]+, s\[0-9\]+, s\[0-9\]+" } } */
++  return -(a * b);
++}
diff --git a/SOURCES/gcc48-pr68184.patch b/SOURCES/gcc48-pr68184.patch
new file mode 100644
index 0000000..445aefd
--- /dev/null
+++ b/SOURCES/gcc48-pr68184.patch
@@ -0,0 +1,59 @@
+2017-02-28  Jakub Jelinek  <jakub@redhat.com>
+
+	Backport from mainline
+	2015-12-02  Jan Hubicka  <hubicka@ucw.cz>
+
+	PR ipa/68184
+	* cgraphunit.c (cgraph_node::analyze): Set can_throw_external.
+
+	* g++.dg/torture/pr68184.C: New testcase.
+
+--- gcc/cgraphunit.c.jj	2014-09-10 09:15:51.000000000 +0200
++++ gcc/cgraphunit.c	2017-02-28 08:24:44.387385510 +0100
+@@ -626,8 +626,10 @@ cgraph_analyze_function (struct cgraph_n
+     }
+   else if (node->thunk.thunk_p)
+     {
+-      cgraph_create_edge (node, cgraph_get_node (node->thunk.alias),
+-			  NULL, 0, CGRAPH_FREQ_BASE);
++      struct cgraph_node *t = cgraph_get_node (node->thunk.alias);
++      cgraph_create_edge (node, t, NULL, 0,
++			  CGRAPH_FREQ_BASE)->can_throw_external
++	= !TREE_NOTHROW (t->symbol.decl);
+     }
+   else if (node->dispatcher_function)
+     {
+--- gcc/testsuite/g++.dg/torture/pr68184.C.jj	2017-02-28 08:26:09.205246069 +0100
++++ gcc/testsuite/g++.dg/torture/pr68184.C	2015-12-03 16:39:34.589010321 +0100
+@@ -0,0 +1,31 @@
++// { dg-do run }
++namespace {
++struct IFoo { virtual void foo() = 0; };
++struct IBar { virtual void bar() = 0; };
++
++struct FooBar : private IBar, private IFoo
++{
++    void call_foo()
++    {
++        try
++        {
++            static_cast<IFoo*>(this)->foo();
++        }
++        catch( ... ) {}
++    }
++    void foo() { throw 1; }
++    void bar()  {}
++};
++
++void test()
++{
++    FooBar foobar;
++    foobar.call_foo();
++}
++}
++int main()
++{
++    test();
++    return 0;
++}
++
diff --git a/SOURCES/gcc48-pr69116.patch b/SOURCES/gcc48-pr69116.patch
new file mode 100644
index 0000000..9b93c79
--- /dev/null
+++ b/SOURCES/gcc48-pr69116.patch
@@ -0,0 +1,92 @@
+2016-02-10  Jonathan Wakely  <jwakely@redhat.com>
+
+	PR libstdc++/69116
+	* include/bits/valarray_before.h (__fun, __fun_with_valarray): Only
+	define result_type for types which can be safely used with valarrays.
+	* testsuite/26_numerics/valarray/69116.cc: New.
+
+--- libstdc++-v3/include/bits/valarray_before.h	(revision 233264)
++++ libstdc++-v3/include/bits/valarray_before.h	(revision 233265)
+@@ -331,14 +331,24 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
+       { return pow(__x, __y); }
+   };
+ 
++  template<typename _Tp, bool _IsValidValarrayValue = !__is_abstract(_Tp)>
++    struct __fun_with_valarray
++    {
++      typedef _Tp result_type;
++    };
++
++  template<typename _Tp>
++    struct __fun_with_valarray<_Tp, false>
++    {
++      // No result type defined for invalid value types.
++    };
+ 
+   // We need these bits in order to recover the return type of
+   // some functions/operators now that we're no longer using
+   // function templates.
+   template<typename, typename _Tp>
+-    struct __fun
++    struct __fun : __fun_with_valarray<_Tp>
+     {
+-      typedef _Tp result_type;
+     };
+ 
+   // several specializations for relational operators.
+--- libstdc++-v3/testsuite/26_numerics/valarray/69116.cc	(nonexistent)
++++ libstdc++-v3/testsuite/26_numerics/valarray/69116.cc	(revision 233265)
+@@ -0,0 +1,53 @@
++// Copyright (C) 2016 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.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING3.  If not see
++// <http://www.gnu.org/licenses/>.
++
++// { dg-do compile }
++// { dg-options "-std=gnu++98" }
++
++// libstdc++/69116
++
++#include <exception>
++#include <valarray>
++
++template<typename T>
++  void foo(const T&) { }
++
++struct X : std::exception // makes namespace std an associated namespace
++{
++  virtual void pure() = 0;
++
++  typedef void(*func_type)(const X&);
++
++  void operator+(func_type) const;
++  void operator-(func_type) const;
++  void operator*(func_type) const;
++  void operator/(func_type) const;
++  void operator%(func_type) const;
++  void operator<<(func_type) const;
++  void operator>>(func_type) const;
++};
++
++void foo(X& x)
++{
++  x + foo;
++  x - foo;
++  x * foo;
++  x / foo;
++  x % foo;
++  x << foo;
++  x >> foo;
++}
diff --git a/SOURCES/gcc48-pr70549.patch b/SOURCES/gcc48-pr70549.patch
new file mode 100644
index 0000000..429893f
--- /dev/null
+++ b/SOURCES/gcc48-pr70549.patch
@@ -0,0 +1,61 @@
+2017-03-08  Bernd Schmidt  <bschmidt@redhat.com>
+
+	PR target/70549
+	* config/aarch64/aarch64.c (aarch64_secondary_reload): Reload
+	CORE_REGS rclass constants in [SD]Fmode through FP_REGS.
+
+	* g++.dg/opt/pr70549.C: New test.
+
+--- gcc/config/aarch64/aarch64.c.jj	2017-03-08 15:50:55.000000000 +0100
++++ gcc/config/aarch64/aarch64.c	2017-03-08 16:01:15.426080172 +0100
+@@ -3846,8 +3846,13 @@ aarch64_secondary_reload (bool in_p ATTR
+       && GET_MODE_SIZE (mode) == 16 && MEM_P (x))
+     return FP_REGS;
+ 
++  if (rclass == CORE_REGS
++      && (mode == SFmode || mode == DFmode)
++      && CONSTANT_P (x))
++    return FP_REGS;
++
+   if (rclass == FP_REGS && (mode == TImode || mode == TFmode) && CONSTANT_P(x))
+-      return CORE_REGS;
++    return CORE_REGS;
+ 
+   return NO_REGS;
+ }
+--- gcc/testsuite/g++.dg/opt/pr70549.C.jj	2017-03-08 16:02:45.104918249 +0100
++++ gcc/testsuite/g++.dg/opt/pr70549.C	2017-03-08 16:02:14.000000000 +0100
+@@ -0,0 +1,33 @@
++// PR target/70549
++// { dg-do compile }
++// { dg-options "-O2" }
++// { dg-additional-options "-fPIC" { target fpic } }
++
++struct A { float x; float y; };
++A a, b, c;
++int d, e;
++A bar ();
++void foo (A, A);
++inline A operator/ (A, A p2) { if (p2.x) return a; }
++struct B { A dval; };
++int baz (A, B, A, int);
++
++void
++test ()
++{
++  B q;
++  A f, g, h, k;
++  h.x = 1.0;
++  f = h;
++  struct A i, j = f;
++  do {
++    i = bar ();
++    g = i / j;
++    foo (g, c);
++    int l = baz (k, q, b, e);
++    if (l)
++      goto cleanup;
++    j = i;
++  } while (d);
++cleanup:;
++}
diff --git a/SOURCES/gcc48-pr72747.patch b/SOURCES/gcc48-pr72747.patch
new file mode 100644
index 0000000..4216ada
--- /dev/null
+++ b/SOURCES/gcc48-pr72747.patch
@@ -0,0 +1,90 @@
+2016-11-02  Will Schmidt <will_schmidt@vnet.ibm.com>
+
+	Backport from trunk
+	2016-10-26  Will Schmidt <will_schmidt@vnet.ibm.com>
+
+	PR middle-end/72747
+	* gimplify.c (gimplify_init_constructor): Move emit of constructor
+	assignment to earlier in the if/else logic.
+
+	* c-c++-common/pr72747-1.c: New test.
+	* c-c++-common/pr72747-2.c: Likewise.
+
+--- gcc/gimplify.c	(revision 241792)
++++ gcc/gimplify.c	(revision 241793)
+@@ -4273,24 +4273,23 @@ gimplify_init_constructor (tree *expr_p,
+ 
+   if (ret == GS_ERROR)
+     return GS_ERROR;
+-  else if (want_value)
++  /* If we have gimplified both sides of the initializer but have
++     not emitted an assignment, do so now.  */
++  if (*expr_p)
++    {
++      tree lhs = TREE_OPERAND (*expr_p, 0);
++      tree rhs = TREE_OPERAND (*expr_p, 1);
++      gimple init = gimple_build_assign (lhs, rhs);
++      gimplify_seq_add_stmt (pre_p, init);
++    }
++  if (want_value)
+     {
+       *expr_p = object;
+       return GS_OK;
+     }
+   else
+     {
+-      /* If we have gimplified both sides of the initializer but have
+-	 not emitted an assignment, do so now.  */
+-      if (*expr_p)
+-	{
+-	  tree lhs = TREE_OPERAND (*expr_p, 0);
+-	  tree rhs = TREE_OPERAND (*expr_p, 1);
+-	  gimple init = gimple_build_assign (lhs, rhs);
+-	  gimplify_seq_add_stmt (pre_p, init);
+-	  *expr_p = NULL;
+-	}
+-
++      *expr_p = NULL;
+       return GS_ALL_DONE;
+     }
+ }
+--- gcc/testsuite/c-c++-common/pr72747-1.c	(nonexistent)
++++ gcc/testsuite/c-c++-common/pr72747-1.c	(revision 241793)
+@@ -0,0 +1,16 @@
++/* { dg-do compile } */
++/* { dg-require-effective-target powerpc_altivec_ok } */
++/* { dg-options "-maltivec -fdump-tree-gimple" } */
++
++/* PR 72747: Test that cascaded definition is happening for constant vectors. */
++
++#include <altivec.h>
++
++int main (int argc, char *argv[])
++{
++	__vector int v1,v2;
++	v1 = v2 = vec_splats ((int) 42);
++	return 0;
++}
++/* { dg-final { scan-tree-dump-times " v2 = { 42, 42, 42, 42 }" 1 "gimple" } } */
++
+--- gcc/testsuite/c-c++-common/pr72747-2.c	(nonexistent)
++++ gcc/testsuite/c-c++-common/pr72747-2.c	(revision 241793)
+@@ -0,0 +1,18 @@
++/* { dg-do compile } */
++/* { dg-require-effective-target powerpc_altivec_ok } */
++/* { dg-options "-c -maltivec -fdump-tree-gimple" } */
++
++/* PR 72747: test that cascaded definition is happening for non constants. */
++
++void foo ()
++{
++  extern int i;
++  __vector int v,w;
++    v = w = (vector int) { i };
++}
++
++int main (int argc, char *argv[])
++{
++  return 0;
++}
++/* { dg-final { scan-tree-dump-times " w = " 1 "gimple" } } */
diff --git a/SOURCES/gcc48-pr72863.patch b/SOURCES/gcc48-pr72863.patch
new file mode 100644
index 0000000..87547f7
--- /dev/null
+++ b/SOURCES/gcc48-pr72863.patch
@@ -0,0 +1,73 @@
+2016-08-25  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
+
+	Backport from mainline (minus test for POWER9 support)
+	2016-08-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
+
+	PR target/72863
+	* vsx.md (vsx_load_<mode>): For P8LE, emit swaps at expand time.
+	(vsx_store_<mode>): Likewise.
+
+	* gcc.target/powerpc/pr72863.c: New test.
+
+--- gcc/config/rs6000/vsx.md	(revision 239761)
++++ gcc/config/rs6000/vsx.md	(revision 239762)
+@@ -716,13 +716,27 @@ (define_expand "vsx_load_<mode>"
+   [(set (match_operand:VSX_M 0 "vsx_register_operand" "")
+ 	(match_operand:VSX_M 1 "memory_operand" ""))]
+   "VECTOR_MEM_VSX_P (<MODE>mode)"
+-  "")
++{
++  /* Expand to swaps if needed, prior to swap optimization.  */
++  if (!BYTES_BIG_ENDIAN)
++    {
++      rs6000_emit_le_vsx_move (operands[0], operands[1], <MODE>mode);
++      DONE;
++    }
++})
+ 
+ (define_expand "vsx_store_<mode>"
+   [(set (match_operand:VSX_M 0 "memory_operand" "")
+ 	(match_operand:VSX_M 1 "vsx_register_operand" ""))]
+   "VECTOR_MEM_VSX_P (<MODE>mode)"
+-  "")
++{
++  /* Expand to swaps if needed, prior to swap optimization.  */
++  if (!BYTES_BIG_ENDIAN)
++    {
++      rs6000_emit_le_vsx_move (operands[0], operands[1], <MODE>mode);
++      DONE;
++    }
++})
+ 
+ 
+ ;; VSX vector floating point arithmetic instructions.  The VSX scalar
+--- gcc/testsuite/gcc.target/powerpc/pr72863.c	(nonexistent)
++++ gcc/testsuite/gcc.target/powerpc/pr72863.c	(revision 239762)
+@@ -0,0 +1,27 @@
++/* { dg-do compile { target { powerpc64le-*-* } } } */
++/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
++/* { dg-options "-mcpu=power8 -O3" } */
++/* { dg-final { scan-assembler "lxvd2x" } } */
++/* { dg-final { scan-assembler "stxvd2x" } } */
++/* { dg-final { scan-assembler-not "xxpermdi" } } */
++
++#include <altivec.h>
++
++extern unsigned char *src, *dst;
++
++void b(void)
++{
++  int i;
++
++  unsigned char *s8 = src;
++  unsigned char *d8 = dst;
++
++  for (i = 0; i < 100; i++) {
++    vector unsigned char vs = vec_vsx_ld(0, s8);
++    vector unsigned char vd = vec_vsx_ld(0, d8);
++    vector unsigned char vr = vec_xor(vs, vd);
++    vec_vsx_st(vr, 0, d8);
++    s8 += 16;
++    d8 += 16;
++  }
++}
diff --git a/SOURCES/gcc48-pr78064.patch b/SOURCES/gcc48-pr78064.patch
new file mode 100644
index 0000000..0773493
--- /dev/null
+++ b/SOURCES/gcc48-pr78064.patch
@@ -0,0 +1,15 @@
+2016-10-24  Florian Weimer  <fweimer@redhat.com>
+
+	PR libgcc/78064
+	* unwind-c.c: Include auto-target.h.
+
+--- libgcc/unwind-c.c	(revision 241490)
++++ libgcc/unwind-c.c	(revision 241491)
+@@ -26,6 +26,7 @@ see the files COPYING3 and COPYING.RUNTI
+ 
+ #include "tconfig.h"
+ #include "tsystem.h"
++#include "auto-target.h"
+ #include "unwind.h"
+ #define NO_SIZE_OF_ENCODED_VALUE
+ #include "unwind-pe.h"
diff --git a/SOURCES/gcc48-pr78796.patch b/SOURCES/gcc48-pr78796.patch
new file mode 100644
index 0000000..6afd47a
--- /dev/null
+++ b/SOURCES/gcc48-pr78796.patch
@@ -0,0 +1,56 @@
+2016-12-14  Wilco Dijkstra  <wdijkstr@arm.com>
+	    Jakub Jelinek  <jakub@redhat.com>
+
+	PR target/78796
+	* config/aarch64/aarch64.c (aarch64_classify_symbol): Merge large
+	model checks into switch.
+
+	* gcc.dg/tls/pr78796.c: New test.
+
+--- gcc/config/aarch64/aarch64.c	(revision 243645)
++++ gcc/config/aarch64/aarch64.c	(revision 243646)
+@@ -4986,6 +4986,9 @@ aarch64_classify_symbol (rtx x,
+   switch (aarch64_cmodel)
+     {
+     case AARCH64_CMODEL_LARGE:
++      if (aarch64_tls_symbol_p (x))
++	return aarch64_classify_tls_symbol (x);
++
+       return SYMBOL_FORCE_TO_MEM;
+ 
+     case AARCH64_CMODEL_TINY:
+--- gcc/testsuite/gcc.dg/tls/pr78796.c	(nonexistent)
++++ gcc/testsuite/gcc.dg/tls/pr78796.c	(revision 243646)
+@@ -0,0 +1,32 @@
++/* PR target/78796 */
++/* { dg-do run } */
++/* { dg-options "-O2" } */
++/* { dg-additional-options "-mcmodel=large" { target aarch64-*-* } } */
++/* { dg-require-effective-target tls } */
++
++struct S { int a, b, c, d, e; };
++struct S t;
++__thread struct S s;
++
++__attribute__((used, noinline, noclone)) void
++foo (int *x, int *y)
++{
++  asm volatile ("" : : "g" (x), "g" (y) : "memory");
++  if (*x != 1 || *y != 2)
++    __builtin_abort ();
++}
++
++__attribute__((used, noinline, noclone)) void
++bar (void)
++{
++  foo (&t.c, &s.c);
++}
++
++int
++main ()
++{
++  t.c = 1;
++  s.c = 2;
++  bar ();
++  return 0;
++}
diff --git a/SOURCES/gcc48-pr78875.patch b/SOURCES/gcc48-pr78875.patch
new file mode 100644
index 0000000..12dd0eb
--- /dev/null
+++ b/SOURCES/gcc48-pr78875.patch
@@ -0,0 +1,254 @@
+2017-01-17  Segher Boessenkool  <segher@kernel.crashing.org>
+
+	PR target/78875
+	* config/rs6000/rs6000-opts.h (stack_protector_guard): New enum.
+	* config/rs6000/rs6000.c (rs6000_option_override_internal): Handle
+	the new options.
+	* config/rs6000/rs6000.md (stack_protect_set): Handle the new more
+	flexible settings.
+	(stack_protect_test): Ditto.
+	* config/rs6000/rs6000.opt (mstack-protector-guard=,
+	mstack-protector-guard-reg=, mstack-protector-guard-offset=): New
+	options.
+	* doc/invoke.texi (Option Summary) [RS/6000 and PowerPC Options]:
+	Add -mstack-protector-guard=, -mstack-protector-guard-reg=, and
+	-mstack-protector-guard-offset=.
+	(RS/6000 and PowerPC Options): Ditto.
+
+	* gcc.target/powerpc/ssp-1.c: New testcase.
+	* gcc.target/powerpc/ssp-2.c: New testcase.
+
+--- gcc/config/rs6000/rs6000.opt	(revision 244555)
++++ gcc/config/rs6000/rs6000.opt	(revision 244556)
+@@ -593,3 +593,31 @@ Allow float variables in upper registers
+ moptimize-swaps
+ Target Undocumented Var(rs6000_optimize_swaps) Init(1) Save
+ Analyze and remove doubleword swaps from VSX computations.
++
++mstack-protector-guard=
++Target RejectNegative Joined Enum(stack_protector_guard) Var(rs6000_stack_protector_guard) Init(SSP_TLS)
++Use given stack-protector guard.
++
++Enum
++Name(stack_protector_guard) Type(enum stack_protector_guard)
++Valid arguments to -mstack-protector-guard=:
++
++EnumValue
++Enum(stack_protector_guard) String(tls) Value(SSP_TLS)
++
++EnumValue
++Enum(stack_protector_guard) String(global) Value(SSP_GLOBAL)
++
++mstack-protector-guard-reg=
++Target RejectNegative Joined Var(rs6000_stack_protector_guard_reg_str)
++Use the given base register for addressing the stack-protector guard.
++
++TargetVariable
++int rs6000_stack_protector_guard_reg = 0
++
++mstack-protector-guard-offset=
++Target RejectNegative Joined Integer Var(rs6000_stack_protector_guard_offset_str)
++Use the given offset for addressing the stack-protector guard.
++
++TargetVariable
++long rs6000_stack_protector_guard_offset = 0
+--- gcc/config/rs6000/rs6000.c	(revision 244555)
++++ gcc/config/rs6000/rs6000.c	(revision 244556)
+@@ -3727,6 +3727,54 @@ rs6000_option_override_internal (bool gl
+ 				    atoi (rs6000_sched_insert_nops_str));
+     }
+ 
++  /* Handle stack protector */
++  if (!global_options_set.x_rs6000_stack_protector_guard)
++#ifdef TARGET_THREAD_SSP_OFFSET
++    rs6000_stack_protector_guard = SSP_TLS;
++#else
++    rs6000_stack_protector_guard = SSP_GLOBAL;
++#endif
++
++#ifdef TARGET_THREAD_SSP_OFFSET
++  rs6000_stack_protector_guard_offset = TARGET_THREAD_SSP_OFFSET;
++  rs6000_stack_protector_guard_reg = TARGET_64BIT ? 13 : 2;
++#endif
++
++  if (global_options_set.x_rs6000_stack_protector_guard_offset_str)
++    {
++      char *endp;
++      const char *str = rs6000_stack_protector_guard_offset_str;
++
++      errno = 0;
++      long offset = strtol (str, &endp, 0);
++      if (!*str || *endp || errno)
++	error ("%qs is not a valid number "
++	       "in -mstack-protector-guard-offset=", str);
++
++      if (!IN_RANGE (offset, -0x8000, 0x7fff)
++	  || (TARGET_64BIT && (offset & 3)))
++	error ("%qs is not a valid offset "
++	       "in -mstack-protector-guard-offset=", str);
++
++      rs6000_stack_protector_guard_offset = offset;
++    }
++
++  if (global_options_set.x_rs6000_stack_protector_guard_reg_str)
++    {
++      const char *str = rs6000_stack_protector_guard_reg_str;
++      int reg = decode_reg_name (str);
++
++      if (!IN_RANGE (reg, 1, 31))
++	error ("%qs is not a valid base register "
++	       "in -mstack-protector-guard-reg=", str);
++
++      rs6000_stack_protector_guard_reg = reg;
++    }
++
++  if (rs6000_stack_protector_guard == SSP_TLS
++      && !IN_RANGE (rs6000_stack_protector_guard_reg, 1, 31))
++    error ("-mstack-protector-guard=tls needs a valid base register");
++
+   if (global_init_p)
+     {
+ #ifdef TARGET_REGNAMES
+--- gcc/config/rs6000/rs6000.md	(revision 244555)
++++ gcc/config/rs6000/rs6000.md	(revision 244556)
+@@ -13092,19 +13092,23 @@
+ 
+ 
+ (define_expand "stack_protect_set"
+-  [(match_operand 0 "memory_operand" "")
+-   (match_operand 1 "memory_operand" "")]
++  [(match_operand 0 "memory_operand")
++   (match_operand 1 "memory_operand")]
+   ""
+ {
+-#ifdef TARGET_THREAD_SSP_OFFSET
+-  rtx tlsreg = gen_rtx_REG (Pmode, TARGET_64BIT ? 13 : 2);
+-  rtx addr = gen_rtx_PLUS (Pmode, tlsreg, GEN_INT (TARGET_THREAD_SSP_OFFSET));
+-  operands[1] = gen_rtx_MEM (Pmode, addr);
+-#endif
++  if (rs6000_stack_protector_guard == SSP_TLS)
++    {
++      rtx reg = gen_rtx_REG (Pmode, rs6000_stack_protector_guard_reg);
++      rtx offset = GEN_INT (rs6000_stack_protector_guard_offset);
++      rtx addr = gen_rtx_PLUS (Pmode, reg, offset);
++      operands[1] = gen_rtx_MEM (Pmode, addr);
++    }
++
+   if (TARGET_64BIT)
+     emit_insn (gen_stack_protect_setdi (operands[0], operands[1]));
+   else
+     emit_insn (gen_stack_protect_setsi (operands[0], operands[1]));
++
+   DONE;
+ })
+ 
+@@ -13127,21 +13131,26 @@
+    (set_attr "length" "12")])
+ 
+ (define_expand "stack_protect_test"
+-  [(match_operand 0 "memory_operand" "")
+-   (match_operand 1 "memory_operand" "")
+-   (match_operand 2 "" "")]
++  [(match_operand 0 "memory_operand")
++   (match_operand 1 "memory_operand")
++   (match_operand 2 "")]
+   ""
+ {
+-  rtx test, op0, op1;
+-#ifdef TARGET_THREAD_SSP_OFFSET
+-  rtx tlsreg = gen_rtx_REG (Pmode, TARGET_64BIT ? 13 : 2);
+-  rtx addr = gen_rtx_PLUS (Pmode, tlsreg, GEN_INT (TARGET_THREAD_SSP_OFFSET));
+-  operands[1] = gen_rtx_MEM (Pmode, addr);
+-#endif
+-  op0 = operands[0];
+-  op1 = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, operands[1]), UNSPEC_SP_TEST);
+-  test = gen_rtx_EQ (VOIDmode, op0, op1);
+-  emit_jump_insn (gen_cbranchsi4 (test, op0, op1, operands[2]));
++  rtx guard = operands[1];
++
++  if (rs6000_stack_protector_guard == SSP_TLS)
++    {
++      rtx reg = gen_rtx_REG (Pmode, rs6000_stack_protector_guard_reg);
++      rtx offset = GEN_INT (rs6000_stack_protector_guard_offset);
++      rtx addr = gen_rtx_PLUS (Pmode, reg, offset);
++      guard = gen_rtx_MEM (Pmode, addr);
++    }
++
++  operands[1] = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, guard), UNSPEC_SP_TEST);
++  rtx test = gen_rtx_EQ (VOIDmode, operands[0], operands[1]);
++  rtx jump = gen_cbranchsi4 (test, operands[0], operands[1], operands[2]);
++  emit_jump_insn (jump);
++
+   DONE;
+ })
+ 
+--- gcc/config/rs6000/rs6000-opts.h	(revision 244555)
++++ gcc/config/rs6000/rs6000-opts.h	(revision 244556)
+@@ -154,6 +154,12 @@ enum rs6000_vector {
+   VECTOR_OTHER			/* Some other vector unit */
+ };
+ 
++/* Where to get the canary for the stack protector.  */
++enum stack_protector_guard {
++  SSP_TLS,			/* per-thread canary in TLS block */
++  SSP_GLOBAL			/* global canary */
++};
++
+ /* No enumeration is defined to index the -mcpu= values (entries in
+    processor_target_table), with the type int being used instead, but
+    we need to distinguish the special "native" value.  */
+--- gcc/doc/invoke.texi	(revision 244555)
++++ gcc/doc/invoke.texi	(revision 244556)
+@@ -862,7 +862,9 @@ See RS/6000 and PowerPC Options.
+ -mcrypto -mno-crypto -mdirect-move -mno-direct-move @gol
+ -mquad-memory -mno-quad-memory @gol
+ -mquad-memory-atomic -mno-quad-memory-atomic @gol
+--mcompat-align-parm -mno-compat-align-parm}
++-mcompat-align-parm -mno-compat-align-parm @gol
++-mstack-protector-guard=@var{guard} -mstack-protector-guard-reg=@var{reg} @gol
++-mstack-protector-guard-offset=@var{offset}}
+ 
+ @emph{RX Options}
+ @gccoptlist{-m64bit-doubles  -m32bit-doubles  -fpu  -nofpu@gol
+@@ -18295,6 +18297,23 @@ GCC.
+ 
+ In this version of the compiler, the @option{-mcompat-align-parm}
+ is the default, except when using the Linux ELFv2 ABI.
++
++@item -mstack-protector-guard=@var{guard}
++@itemx -mstack-protector-guard-reg=@var{reg}
++@itemx -mstack-protector-guard-offset=@var{offset}
++@opindex mstack-protector-guard
++@opindex mstack-protector-guard-reg
++@opindex mstack-protector-guard-offset
++Generate stack protection code using canary at @var{guard}.  Supported
++locations are @samp{global} for global canary or @samp{tls} for per-thread
++canary in the TLS block (the default with GNU libc version 2.4 or later).
++
++With the latter choice the options
++@option{-mstack-protector-guard-reg=@var{reg}} and
++@option{-mstack-protector-guard-offset=@var{offset}} furthermore specify
++which register to use as base register for reading the canary, and from what
++offset from that base register. The default for those is as specified in the
++relevant ABI.
+ @end table
+ 
+ @node RX Options
+--- gcc/testsuite/gcc.target/powerpc/ssp-1.c	(nonexistent)
++++ gcc/testsuite/gcc.target/powerpc/ssp-1.c	(revision 244562)
+@@ -0,0 +1,6 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -fstack-protector-all -mstack-protector-guard=global" } */
++
++/* { dg-final { scan-assembler "__stack_chk_guard" } } */
++
++void f(void) { }
+--- gcc/testsuite/gcc.target/powerpc/ssp-2.c	(nonexistent)
++++ gcc/testsuite/gcc.target/powerpc/ssp-2.c	(revision 244562)
+@@ -0,0 +1,6 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -fstack-protector-all -mstack-protector-guard=tls -mstack-protector-guard-reg=r18 -mstack-protector-guard-offset=0x3038" } */
++
++/* { dg-final { scan-assembler {\m12344\(r?18\)} } } */
++
++void f(void) { }
diff --git a/SOURCES/gcc48-pr79439.patch b/SOURCES/gcc48-pr79439.patch
new file mode 100644
index 0000000..c593dfc
--- /dev/null
+++ b/SOURCES/gcc48-pr79439.patch
@@ -0,0 +1,53 @@
+2017-03-01  Michael Meissner  <meissner@linux.vnet.ibm.com>
+
+	PR target/79439
+	* config/rs6000/predicates.md (current_file_function_operand): Do
+	not allow self calls to be local if the function is replaceable.
+
+	* gcc.target/powerpc/pr79439.c: New test.
+
+--- gcc/config/rs6000/predicates.md	(revision 245812)
++++ gcc/config/rs6000/predicates.md	(revision 245813)
+@@ -1086,8 +1086,8 @@
+ 			 && ((DEFAULT_ABI != ABI_AIX
+ 			      && DEFAULT_ABI != ABI_ELFv2)
+ 			     || !SYMBOL_REF_EXTERNAL_P (op)))
+-		        || (op == XEXP (DECL_RTL (current_function_decl),
+-						  0)))")))
++		        || (op == XEXP (DECL_RTL (current_function_decl), 0)
++			    && !decl_replaceable_p (current_function_decl)))")))
+ 
+ ;; Return 1 if this operand is a valid input for a move insn.
+ (define_predicate "input_operand"
+--- gcc/testsuite/gcc.target/powerpc/pr79439.c	(nonexistent)
++++ gcc/testsuite/gcc.target/powerpc/pr79439.c	(revision 245813)
+@@ -0,0 +1,29 @@
++/* { dg-do compile { target { powerpc64*-*-linux* && lp64 } } } */
++/* { dg-options "-O2 -fpic" } */
++
++/* On the Linux 64-bit ABIs, we should not eliminate NOP in the 'rec' call if
++   -fpic is used because rec can be interposed at link time (since it is
++   external), and the recursive call should call the interposed function.  The
++   Linux 32-bit ABIs do not require NOPs after the BL instruction.  */
++
++int f (void);
++
++void
++g (void)
++{
++}
++
++int
++rec (int a)
++{
++  int ret = 0;
++  if (a > 10 && f ())
++    ret += rec (a - 1);
++  g ();
++  return a + ret;
++}
++
++/* { dg-final { scan-assembler-times {\mbl f\M}   1 } } */
++/* { dg-final { scan-assembler-times {\mbl g\M}   2 } } */
++/* { dg-final { scan-assembler-times {\mbl rec\M} 1 } } */
++/* { dg-final { scan-assembler-times {\mnop\M}    4 } } */
diff --git a/SOURCES/gcc48-pr79969.patch b/SOURCES/gcc48-pr79969.patch
new file mode 100644
index 0000000..53a4ed7
--- /dev/null
+++ b/SOURCES/gcc48-pr79969.patch
@@ -0,0 +1,43 @@
+2017-03-09  Jakub Jelinek  <jakub@redhat.com>
+
+	PR c/79969
+	* c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
+	TYPE_STUB_DECL.
+
+	* gcc.dg/debug/dwarf2/enum-loc1.c: New test.
+
+--- gcc/c/c-decl.c.jj	2017-03-05 22:39:45.000000000 +0100
++++ gcc/c/c-decl.c	2017-03-09 08:19:33.100042166 +0100
+@@ -8201,6 +8201,10 @@ start_enum (location_t loc, struct c_enu
+       enumtype = make_node (ENUMERAL_TYPE);
+       pushtag (loc, name, enumtype);
+     }
++  /* Update type location to the one of the definition, instead of e.g.
++     a forward declaration.  */
++  else if (TYPE_STUB_DECL (enumtype))
++    DECL_SOURCE_LOCATION (TYPE_STUB_DECL (enumtype)) = loc;
+ 
+   if (C_TYPE_BEING_DEFINED (enumtype))
+     error_at (loc, "nested redefinition of %<enum %E%>", name);
+--- gcc/testsuite/gcc.dg/debug/dwarf2/enum-loc1.c.jj	2017-03-09 08:09:30.742037844 +0100
++++ gcc/testsuite/gcc.dg/debug/dwarf2/enum-loc1.c	2017-03-09 08:16:45.202268438 +0100
+@@ -0,0 +1,19 @@
++/* PR c/79969 */
++/* { dg-do compile } */
++/* { dg-options "-gdwarf-2 -dA -fno-merge-debug-strings" } */
++
++enum ENUMTAG;
++
++enum ENUMTAG
++{
++  B = 1,
++  C = 2
++};
++
++void
++bar (void)
++{
++  enum ENUMTAG a = C;
++}
++
++/* { dg-final { scan-assembler "DW_TAG_enumeration_type\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*\"ENUMTAG\[^\\r\\n\]*DW_AT_name(\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*DW_AT_)*\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*\[^0-9a-fA-FxX](0x)?7\[^0-9a-fA-FxX]\[^\\r\\n\]*DW_AT_decl_line" } } */
diff --git a/SOURCES/gcc48-rh1369183.patch b/SOURCES/gcc48-rh1369183.patch
new file mode 100644
index 0000000..7127d15
--- /dev/null
+++ b/SOURCES/gcc48-rh1369183.patch
@@ -0,0 +1,52 @@
+2017-03-07  Jakub Jelinek  <jakub@redhat.com>
+
+	Partial backport
+	2016-05-07  Fritz Reese  <fritzoreese@gmail.com>
+
+	PR fortran/56226
+	* interface.c (gfc_compare_derived_types): Don't ICE if the
+	derived type or both types have no components.
+
+	* gfortran.dg/rh1369183.f90: New test.
+
+--- gcc/fortran/interface.c.jj	2015-06-18 16:32:45.000000000 +0200
++++ gcc/fortran/interface.c	2017-03-07 18:35:38.982302826 +0100
+@@ -418,6 +418,13 @@ gfc_compare_derived_types (gfc_symbol *d
+       && !(derived1->attr.is_bind_c && derived2->attr.is_bind_c))
+     return 0;
+ 
++  /* Protect against null components.  */
++  if (derived1->attr.zero_comp != derived2->attr.zero_comp)
++    return 0;
++
++  if (derived1->attr.zero_comp)
++    return 1;
++
+   dt1 = derived1->components;
+   dt2 = derived2->components;
+ 
+--- gcc/testsuite/gfortran.dg/rh1369183.f90.jj	2017-03-07 18:37:39.574775432 +0100
++++ gcc/testsuite/gfortran.dg/rh1369183.f90	2017-03-07 18:38:38.423993194 +0100
+@@ -0,0 +1,22 @@
++! { dg-do compile }
++
++module mod1369183
++  implicit none
++  contains
++  subroutine sub(test)
++    type test_t
++      sequence
++      integer(4) type
++    end type test_t
++    type(test_t),intent(inout) :: test
++  end subroutine sub
++end module mod1369183
++subroutine rh1369183
++  use mod1369183
++  implicit none 
++  type test_t
++  sequence
++  end type test_t
++  type(test_t) :: tst
++  call sub(tst)                ! { dg-error "Type mismatch in argument" }
++end subroutine rh1369183
diff --git a/SOURCES/gcc48-rh1402585.patch b/SOURCES/gcc48-rh1402585.patch
new file mode 100644
index 0000000..3aa1cae
--- /dev/null
+++ b/SOURCES/gcc48-rh1402585.patch
@@ -0,0 +1,32 @@
+--- gcc/reload.c	(revision 235552)
++++ gcc/reload.c	(working copy)
+@@ -4054,14 +4054,14 @@ find_reloads (rtx insn, int replace, int
+ 			     &XEXP (recog_data.operand[i], 0), (rtx*) 0,
+ 			     base_reg_class (VOIDmode, as, MEM, SCRATCH),
+ 			     address_mode,
+-			     VOIDmode, 0, 0, i, RELOAD_FOR_INPUT);
++			     VOIDmode, 0, 0, i, RELOAD_OTHER);
+ 	    rld[operand_reloadnum[i]].inc
+ 	      = GET_MODE_SIZE (GET_MODE (recog_data.operand[i]));
+ 
+ 	    /* If this operand is an output, we will have made any
+ 	       reloads for its address as RELOAD_FOR_OUTPUT_ADDRESS, but
+ 	       now we are treating part of the operand as an input, so
+-	       we must change these to RELOAD_FOR_INPUT_ADDRESS.  */
++	       we must change these to RELOAD_FOR_OTHER_ADDRESS.  */
+ 
+ 	    if (modified[i] == RELOAD_WRITE)
+ 	      {
+@@ -4070,10 +4070,10 @@ find_reloads (rtx insn, int replace, int
+ 		    if (rld[j].opnum == i)
+ 		      {
+ 			if (rld[j].when_needed == RELOAD_FOR_OUTPUT_ADDRESS)
+-			  rld[j].when_needed = RELOAD_FOR_INPUT_ADDRESS;
++			  rld[j].when_needed = RELOAD_FOR_OTHER_ADDRESS;
+ 			else if (rld[j].when_needed
+ 				 == RELOAD_FOR_OUTADDR_ADDRESS)
+-			  rld[j].when_needed = RELOAD_FOR_INPADDR_ADDRESS;
++			  rld[j].when_needed = RELOAD_FOR_OTHER_ADDRESS;
+ 		      }
+ 		  }
+ 	      }
diff --git a/SOURCES/gcc48-rh1457969.patch b/SOURCES/gcc48-rh1457969.patch
new file mode 100644
index 0000000..84178fe
--- /dev/null
+++ b/SOURCES/gcc48-rh1457969.patch
@@ -0,0 +1,16 @@
+2014-01-15  Pat Haugen  <pthaugen@us.ibm.com>
+
+	* config/rs6000/rs6000.c (rs6000_output_function_prologue): Check if
+	current procedure should be profiled.
+
+--- gcc/config/rs6000/rs6000.c
++++ gcc/config/rs6000/rs6000.c
+@@ -23198,7 +23198,7 @@ rs6000_output_function_prologue (FILE *file,
+   /* Output -mprofile-kernel code.  This needs to be done here instead of
+      in output_function_profile since it must go after the ELFv2 ABI
+      local entry point.  */
+-  if (TARGET_PROFILE_KERNEL)
++  if (TARGET_PROFILE_KERNEL && crtl->profile)
+     {
+       gcc_assert (DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_ELFv2);
+       gcc_assert (!TARGET_32BIT);
diff --git a/SPECS/gcc.spec b/SPECS/gcc.spec
index 5675774..af0a0b6 100644
--- a/SPECS/gcc.spec
+++ b/SPECS/gcc.spec
@@ -2,7 +2,7 @@
 %global SVNREV 225304
 # Note, gcc_release must be integer, if you want to add suffixes to
 # %{release}, append them after %{gcc_release} on Release: line.
-%global gcc_release 11
+%global gcc_release 16
 %global _unpackaged_files_terminate_build 0
 %global _performance_build 1
 %global multilib_64_archs sparc64 ppc64 ppc64p7 s390x x86_64
@@ -233,6 +233,21 @@ Patch33: gcc48-pr52714.patch
 Patch34: gcc48-rh1344807.patch
 Patch35: gcc48-libgomp-20160715.patch
 Patch36: gcc48-pr63293.patch
+Patch37: gcc48-pr72863.patch
+Patch38: gcc48-pr78064.patch
+Patch39: gcc48-pr62258.patch
+Patch40: gcc48-rh1369183.patch
+Patch41: gcc48-pr68184.patch
+Patch42: gcc48-pr79439.patch
+Patch43: gcc48-pr66731.patch
+Patch44: gcc48-pr69116.patch
+Patch45: gcc48-pr72747.patch
+Patch46: gcc48-pr78796.patch
+Patch47: gcc48-pr79969.patch
+Patch48: gcc48-pr78875.patch
+Patch49: gcc48-rh1402585.patch
+Patch50: gcc48-pr70549.patch
+Patch51: gcc48-rh1457969.patch
 
 Patch1000: fastjar-0.97-segfault.patch
 Patch1001: fastjar-0.97-len1.patch
@@ -947,6 +962,21 @@ touch -r %{PATCH27} libstdc++-v3/python/libstdcxx/v6/printers.py
 %patch34 -p0 -b .rh1344807~
 %patch35 -p0 -b .libgomp-20160715~
 %patch36 -p0 -b .pr63293~
+%patch37 -p0 -b .pr72863~
+%patch38 -p0 -b .pr78064~
+%patch39 -p0 -b .pr62258~
+%patch40 -p0 -b .rh1369183~
+%patch41 -p0 -b .pr68184~
+%patch42 -p0 -b .pr79439~
+%patch43 -p0 -b .pr66731~
+%patch44 -p0 -b .pr69116~
+%patch45 -p0 -b .pr72747~
+%patch46 -p0 -b .pr78796~
+%patch47 -p0 -b .pr79969~
+%patch48 -p0 -b .pr78875~
+%patch49 -p0 -b .rh1402585~
+%patch50 -p0 -b .pr70549~
+%patch51 -p0 -b .rh1457969~
 
 %if 0%{?_enable_debug_packages}
 cat > split-debuginfo.sh <<\EOF
@@ -3390,6 +3420,41 @@ fi
 %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/plugin
 
 %changelog
+* Thu Jun  1 2017 Marek Polacek <polacek@redhat.com> 4.8.5-16
+- disable emitting profiling in functions marked with a special
+  attribute (#1457969)
+
+* Wed May 31 2017 Marek Polacek <polacek@redhat.com> 4.8.5-15
+- properly apply the PR70549 patch (#1349067)
+
+* Mon Mar 13 2017 Marek Polacek <polacek@redhat.com> 4.8.5-14
+- promote reloads of a PLUS to RELOAD_OTHER (#1402585)
+
+* Fri Mar 10 2017 Jakub Jelinek <jakub@redhat.com> 4.8.5-13
+- add -mstack-protector-guard={tls,global}, -mstack-protector-guard-reg=
+  and -mstack-protector-guard-offset= options on ppc* (#1415952,
+  PR target/78875)
+
+* Tue Mar  7 2017 Jakub Jelinek <jakub@redhat.com> 4.8.5-12
+- fix up std::rethrow_exception (#1375711, PR libstdc++/62258)
+- use _Unwind_GetIPInfo in __gcc_personality_v0 (#1387402, PR libgcc/78064)
+- fix vec_vsx_ld/st on ppc64le (#1389801, PR target/72863, PR target/78084)
+- fix ICE in gfc_compare_derived_types (#1369183)
+- fix EH from C++ thunks (#1427412, PR ipa/68184)
+- on ppc64{,le} emit nop after recursive call if the current function
+  is replaceable (#1420723, PR target/79439)
+- on aarch64 with -frounding-math use fnmul only with -(a*b) and not
+  with (-a)*b (#1418446, PR target/66731)
+- constrain std::valarray functions and operators (#1416214,
+  PR libstdc++/69116)
+- fix gimplification of aggregate assignments when lhs is used
+  (#1396298, PR middle-end/72747, PR c/78408)
+- fix aarch64 TLS with -mcmodel=large (#1389276, PR target/78796)
+- fix aarch64 reloading of floating point constants into general purpose
+  registers (#1349067, PR target/70549)
+- fix DW_AT_decl_line on DW_TAG_enumeration_type for C enumeration
+  definitions following forward declarations (#1423460, PR c/79969)
+
 * Wed Aug 31 2016 Jakub Jelinek <jakub@redhat.com> 4.8.5-11
 - on aarch64 emit scheduling barriers before stack deallocation in
   function epilogues (#1362635, PR target/63293)