--- a/gdb/nat/aarch64-sve-linux-ptrace.h
+++ b/gdb/nat/aarch64-sve-linux-ptrace.h
-@@ -20,12 +20,12 @@
- #ifndef AARCH64_SVE_LINUX_PTRACE_H
- #define AARCH64_SVE_LINUX_PTRACE_H
-
--#include <asm/sigcontext.h>
-+#include <signal.h>
- #include <sys/utsname.h>
+@@ -25,7 +25,7 @@
#include <sys/ptrace.h>
#include <asm/ptrace.h>
--- a/gdb/nat/aarch64-sve-linux-sigcontext.h
+++ b/gdb/nat/aarch64-sve-linux-sigcontext.h
@@ -19,6 +19,7 @@
- #ifndef AARCH64_SVE_LINUX_SIGCONTEXT_H
- #define AARCH64_SVE_LINUX_SIGCONTEXT_H
+ #ifndef NAT_AARCH64_SVE_LINUX_SIGCONTEXT_H
+ #define NAT_AARCH64_SVE_LINUX_SIGCONTEXT_H
+#ifndef SVE_MAGIC
#define SVE_MAGIC 0x53564501
#include "defs.h"
#include "inferior.h"
#include "infrun.h"
-@@ -71,6 +72,10 @@
+@@ -72,6 +73,10 @@
#define SPUFS_MAGIC 0x23c9b64e
#endif
--- a/gdb/nat/ppc-linux.h
+++ b/gdb/nat/ppc-linux.h
@@ -18,7 +18,10 @@
- #ifndef PPC_LINUX_H
- #define PPC_LINUX_H 1
+ #ifndef NAT_PPC_LINUX_H
+ #define NAT_PPC_LINUX_H
+#define pt_regs __pt_regs
#include <asm/ptrace.h>
/* This sometimes isn't defined. */
--- a/gdb/gdbserver/linux-ppc-low.c
+++ b/gdb/gdbserver/linux-ppc-low.c
-@@ -21,7 +21,9 @@
- #include "linux-low.h"
-
+@@ -23,7 +23,9 @@
+ #include "elf/common.h"
+ #include <sys/uio.h>
#include <elf.h>
+#define pt_regs __pt_regs
#include <asm/ptrace.h>
--- a/configure.ac
+++ b/configure.ac
-@@ -1277,13 +1277,13 @@ if test -z "$LD"; then
+@@ -1283,13 +1283,13 @@ if test -z "$LD"; then
fi
fi
AC_LANG_PUSH(C++)
AC_LINK_IFELSE([AC_LANG_SOURCE([
#if (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
-@@ -1609,7 +1609,7 @@ AC_ARG_WITH(stage1-ldflags,
- # if supported. But if the user explicitly specified the libraries to use,
+@@ -1629,7 +1629,7 @@ AC_ARG_WITH(stage1-ldflags,
# trust that they are doing what they want.
- if test "$stage1_libs" = "" -a "$have_static_libs" = yes; then
+ if test "$with_static_standard_libraries" = yes -a "$stage1_libs" = "" \
+ -a "$have_static_libs" = yes; then
- stage1_ldflags="-static-libstdc++ -static-libgcc"
+ stage1_ldflags="-static-libstdc++"
fi])
AC_SUBST(stage1_ldflags)
-@@ -1638,7 +1638,7 @@ AC_ARG_WITH(boot-ldflags,
+@@ -1658,7 +1658,7 @@ AC_ARG_WITH(boot-ldflags,
# statically. But if the user explicitly specified the libraries to
# use, trust that they are doing what they want.
if test "$poststage1_libs" = ""; then
--- a/configure
+++ b/configure
-@@ -5043,14 +5043,14 @@ if test -z "$LD"; then
+@@ -5053,14 +5053,14 @@ if test -z "$LD"; then
fi
fi
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-@@ -5833,7 +5833,7 @@ else
- # if supported. But if the user explicitly specified the libraries to use,
+@@ -5861,7 +5861,7 @@ else
# trust that they are doing what they want.
- if test "$stage1_libs" = "" -a "$have_static_libs" = yes; then
+ if test "$with_static_standard_libraries" = yes -a "$stage1_libs" = "" \
+ -a "$have_static_libs" = yes; then
- stage1_ldflags="-static-libstdc++ -static-libgcc"
+ stage1_ldflags="-static-libstdc++"
fi
fi
-@@ -5869,7 +5869,7 @@ else
+@@ -5897,7 +5897,7 @@ else
# statically. But if the user explicitly specified the libraries to
# use, trust that they are doing what they want.
if test "$poststage1_libs" = ""; then