diff --git a/gdb/syscalls/Makefile b/gdb/syscalls/Makefile
new file mode 100644
index 0000000..30fa4e4
--- /dev/null
+++ b/gdb/syscalls/Makefile
@@ -0,0 +1,41 @@
+# Copyright (C) 2007-2015 Free Software Foundation, Inc.
+
+# This file is part of GDB.
+
+# This program 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 of the License, or
+# (at your option) any later version.
+#
+# This program 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 program. If not, see .
+
+# This file requires GNU make!
+
+# This Makefile generates the XML syscall files from their xml.in and
+# *-defaults.xml counterparts. Because this relies on xsltproc, it is
+# not normally run during the build process; it should be run by hand
+# when one of the affected source files is changed, and the results
+# should be kept in the GDB repository.
+
+# To generate the updated xml files, just enter the syscalls directory
+# and run
+#
+# $ make
+
+XSLTPROC = xsltproc
+SYSCALL_FILES = aarch64-linux.xml arm-linux.xml mips-n64-linux.xml \
+ ppc64-linux.xml s390-linux.xml sparc64-linux.xml \
+ amd64-linux.xml bfin-linux.xml i386-linux.xml \
+ mips-n32-linux.xml mips-o32-linux.xml ppc-linux.xml \
+ s390x-linux.xml sparc-linux.xml
+
+all: $(SYSCALL_FILES)
+
+%.xml: %.xml.in apply-defaults.xsl linux-defaults.xml.in
+ $(XSLTPROC) -o $@ apply-defaults.xsl $<
diff --git a/gdb/syscalls/aarch64-linux.xml b/gdb/syscalls/aarch64-linux.xml.in
similarity index 100%
rename from gdb/syscalls/aarch64-linux.xml
rename to gdb/syscalls/aarch64-linux.xml.in
diff --git a/gdb/syscalls/amd64-linux.xml b/gdb/syscalls/amd64-linux.xml.in
similarity index 100%
rename from gdb/syscalls/amd64-linux.xml
rename to gdb/syscalls/amd64-linux.xml.in
diff --git a/gdb/syscalls/apply-defaults.xsl b/gdb/syscalls/apply-defaults.xsl
new file mode 100644
index 0000000..5b7f224
--- /dev/null
+++ b/gdb/syscalls/apply-defaults.xsl
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/gdb/syscalls/arm-linux.xml b/gdb/syscalls/arm-linux.xml.in
similarity index 100%
rename from gdb/syscalls/arm-linux.xml
rename to gdb/syscalls/arm-linux.xml.in
diff --git a/gdb/syscalls/bfin-linux.xml b/gdb/syscalls/bfin-linux.xml.in
similarity index 100%
rename from gdb/syscalls/bfin-linux.xml
rename to gdb/syscalls/bfin-linux.xml.in
diff --git a/gdb/syscalls/i386-linux.xml b/gdb/syscalls/i386-linux.xml.in
similarity index 100%
rename from gdb/syscalls/i386-linux.xml
rename to gdb/syscalls/i386-linux.xml.in
diff --git a/gdb/syscalls/linux-defaults.xml.in b/gdb/syscalls/linux-defaults.xml.in
new file mode 100644
index 0000000..576be0c
--- /dev/null
+++ b/gdb/syscalls/linux-defaults.xml.in
@@ -0,0 +1,243 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/gdb/syscalls/mips-n32-linux.xml b/gdb/syscalls/mips-n32-linux.xml.in
similarity index 100%
rename from gdb/syscalls/mips-n32-linux.xml
rename to gdb/syscalls/mips-n32-linux.xml.in
diff --git a/gdb/syscalls/mips-n64-linux.xml b/gdb/syscalls/mips-n64-linux.xml.in
similarity index 100%
rename from gdb/syscalls/mips-n64-linux.xml
rename to gdb/syscalls/mips-n64-linux.xml.in
diff --git a/gdb/syscalls/mips-o32-linux.xml b/gdb/syscalls/mips-o32-linux.xml.in
similarity index 100%
rename from gdb/syscalls/mips-o32-linux.xml
rename to gdb/syscalls/mips-o32-linux.xml.in
diff --git a/gdb/syscalls/ppc-linux.xml b/gdb/syscalls/ppc-linux.xml.in
similarity index 100%
rename from gdb/syscalls/ppc-linux.xml
rename to gdb/syscalls/ppc-linux.xml.in
diff --git a/gdb/syscalls/ppc64-linux.xml b/gdb/syscalls/ppc64-linux.xml.in
similarity index 100%
rename from gdb/syscalls/ppc64-linux.xml
rename to gdb/syscalls/ppc64-linux.xml.in
diff --git a/gdb/syscalls/s390-linux.xml b/gdb/syscalls/s390-linux.xml.in
similarity index 100%
rename from gdb/syscalls/s390-linux.xml
rename to gdb/syscalls/s390-linux.xml.in
diff --git a/gdb/syscalls/s390x-linux.xml b/gdb/syscalls/s390x-linux.xml.in
similarity index 100%
rename from gdb/syscalls/s390x-linux.xml
rename to gdb/syscalls/s390x-linux.xml.in
diff --git a/gdb/syscalls/sparc-linux.xml b/gdb/syscalls/sparc-linux.xml.in
similarity index 100%
rename from gdb/syscalls/sparc-linux.xml
rename to gdb/syscalls/sparc-linux.xml.in
diff --git a/gdb/syscalls/sparc64-linux.xml b/gdb/syscalls/sparc64-linux.xml.in
similarity index 100%
rename from gdb/syscalls/sparc64-linux.xml
rename to gdb/syscalls/sparc64-linux.xml.in