summaryrefslogtreecommitdiff
path: root/patches/gdb/gdb-7.12.midipix.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/gdb/gdb-7.12.midipix.patch')
-rw-r--r--patches/gdb/gdb-7.12.midipix.patch190
1 files changed, 190 insertions, 0 deletions
diff --git a/patches/gdb/gdb-7.12.midipix.patch b/patches/gdb/gdb-7.12.midipix.patch
new file mode 100644
index 0000000..fdfc611
--- /dev/null
+++ b/patches/gdb/gdb-7.12.midipix.patch
@@ -0,0 +1,190 @@
+diff -ru a/bfd/Makefile.in b/bfd/Makefile.in
+--- a/bfd/Makefile.in 2016-10-07 17:09:21.000000000 +0000
++++ b/bfd/Makefile.in 2019-06-04 17:07:31.702589500 +0000
+@@ -385,8 +385,8 @@
+ # This is where we get zlib from. zlibdir is -L../zlib and zlibinc is
+ # -I../zlib, unless we were configured with --with-system-zlib, in which
+ # case both are empty.
+-ZLIB = @zlibdir@ -lz
+-ZLIBINC = @zlibinc@
++ZLIB = @zlibdir@ -lz $(SYSROOT_FLAGS)
++ZLIBINC = @zlibinc@ $(SYSROOT_FLAGS)
+ AM_CFLAGS = $(WARN_CFLAGS) $(ZLIBINC)
+ AM_CPPFLAGS = -DBINDIR='"$(bindir)"'
+ @PLUGINS_TRUE@LIBDL = @lt_cv_dlopen_libs@
+diff -ru a/bfd/config.bfd b/bfd/config.bfd
+--- a/bfd/config.bfd 2016-08-01 15:50:20.000000000 +0000
++++ b/bfd/config.bfd 2019-06-04 17:07:31.686989500 +0000
+@@ -729,7 +729,7 @@
+ targ_archs="$targ_archs bfd_arm_arch"
+ want64=true
+ ;;
+- x86_64-*-mingw* | x86_64-*-pe | x86_64-*-pep | x86_64-*-cygwin)
++ x86_64-*-mingw* | x86_64-*-pe | x86_64-*-pep | x86_64-*-cygwin | x86_64-*-midipix)
+ targ_defvec=x86_64_pe_vec
+ targ_selvecs="x86_64_pe_vec x86_64_pei_vec x86_64_pe_be_vec x86_64_elf64_vec l1om_elf64_vec k1om_elf64_vec i386_pe_vec i386_pei_vec i386_elf32_vec iamcu_elf32_vec"
+ want64=true
+@@ -782,7 +782,7 @@
+ targ_defvec=i386_elf32_vec
+ targ_selvecs="iamcu_elf32_vec i386_coff_vec"
+ ;;
+- i[3-7]86-*-mingw32* | i[3-7]86-*-cygwin* | i[3-7]86-*-winnt | i[3-7]86-*-pe)
++ i[3-7]86-*-mingw32* | i[3-7]86-*-cygwin* | i[3-7]86-*-winnt | i[3-7]86-*-pe | i[3-7]86-*-midipix)
+ targ_defvec=i386_pe_vec
+ targ_selvecs="i386_pe_vec i386_pei_vec i386_elf32_vec iamcu_elf32_vec"
+ targ_underscore=yes
+diff -ru a/gdb/Makefile.in b/gdb/Makefile.in
+--- a/gdb/Makefile.in 2016-10-07 17:09:21.000000000 +0000
++++ b/gdb/Makefile.in 2019-06-04 17:07:31.733789600 +0000
+@@ -150,7 +150,7 @@
+ # This is where we get zlib from. zlibdir is -L../zlib and zlibinc is
+ # -I../zlib, unless we were configured with --with-system-zlib, in which
+ # case both are empty.
+-ZLIB = @zlibdir@ -lz
++ZLIB = @zlibdir@ -lz $(SYSROOT_FLAGS)
+ ZLIBINC = @zlibinc@
+
+ # Where is the decnumber library? Typically in ../libdecnumber.
+@@ -162,9 +162,9 @@
+ # Where is the READLINE library? Typically in ../readline.
+ READLINE_DIR = ../readline
+ READLINE_SRC = $(srcdir)/$(READLINE_DIR)
+-READLINE = @READLINE@
+-READLINE_DEPS = @READLINE_DEPS@
+-READLINE_CFLAGS = @READLINE_CFLAGS@
++READLINE = -lreadline
++READLINE_DEPS =
++READLINE_CFLAGS = $(SYSROOT_FLAGS)
+
+ # Where is expat? This will be empty if expat was not available.
+ LIBEXPAT = @LIBEXPAT@
+@@ -599,7 +599,7 @@
+ $(LIBEXPAT) $(LIBLZMA) $(LIBBABELTRACE) $(LIBIPT) \
+ $(LIBIBERTY) $(WIN32LIBS) $(LIBGNU) $(LIBICONV)
+ CDEPS = $(XM_CDEPS) $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE_DEPS) \
+- $(OPCODES) $(INTL_DEPS) $(LIBIBERTY) $(CONFIG_DEPS) $(LIBGNU)
++ $(INTL_DEPS) $(LIBIBERTY) $(CONFIG_DEPS) $(LIBGNU)
+
+ ADD_FILES = $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
+ ADD_DEPS = $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
+diff -ru a/gdb/configure.host b/gdb/configure.host
+--- a/gdb/configure.host 2016-08-01 15:50:20.000000000 +0000
++++ b/gdb/configure.host 2019-06-04 17:07:31.718189500 +0000
+@@ -109,6 +109,7 @@
+ ;;
+ i[34567]86-*-msdosdjgpp*) gdb_host=go32 ;;
+ i[34567]86-*-linux*) gdb_host=linux ;;
++i[34567]86-*-midipix*) gdb_host=midipix ;;
+ i[34567]86-*-gnu*) gdb_host=i386gnu ;;
+ i[3456]86-*-nto*) gdb_host=nto ;;
+ i[34567]86-*-openbsd*) gdb_host=obsd ;;
+@@ -174,6 +175,7 @@
+ vax-*-openbsd*) gdb_host=obsd ;;
+
+ x86_64-*-linux*) gdb_host=linux64 ;;
++x86_64-*-midipix*) gdb_host=midipix64 ;;
+ x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu)
+ gdb_host=fbsd64 ;;
+ x86_64-*-netbsd* | x86_64-*-knetbsd*-gnu)
+diff -ru a/gdb/configure.tgt b/gdb/configure.tgt
+--- a/gdb/configure.tgt 2016-10-07 17:09:21.000000000 +0000
++++ b/gdb/configure.tgt 2019-06-04 17:07:31.718189500 +0000
+@@ -229,6 +229,12 @@
+ fi
+ build_gdbserver=yes
+ ;;
++i[34567]86-*-midipix*)
++ # Target: Intel 386 running win32
++ gdb_target_obs="i386-tdep.o i387-tdep.o \
++ i386-winnt-tdep.o windows-tdep.o"
++ build_gdbserver=no
++ ;;
+ i[34567]86-*-gnu*)
+ # Target: Intel 386 running the GNU Hurd
+ gdb_target_obs="i386-tdep.o i387-tdep.o i386gnu-tdep.o solib-svr4.o"
+@@ -678,6 +684,13 @@
+ windows-tdep.o"
+ build_gdbserver=yes
+ ;;
++x86_64-*-midipix)
++ # Target: Midipix
++ gdb_target_obs="amd64-tdep.o amd64-winnt-tdep.o \
++ i386-tdep.o i387-tdep.o \
++ windows-tdep.o i386-winnt-tdep.o"
++ build_gdbserver=no
++ ;;
+ x86_64-*-netbsd* | x86_64-*-knetbsd*-gnu)
+ # Target: NetBSD/amd64
+ gdb_target_obs="amd64-tdep.o amd64nbsd-tdep.o i386-tdep.o i387-tdep.o \
+@@ -718,6 +731,7 @@
+ *-*-mingw32ce*) gdb_osabi=GDB_OSABI_WINCE ;;
+ *-*-mingw* | *-*-cygwin*)
+ gdb_osabi=GDB_OSABI_CYGWIN ;;
++*-*-midipix*) gdb_osabi=GDB_OSABI_WINNT ;;
+ *-*-dicos*) gdb_osabi=GDB_OSABI_DICOS ;;
+ *-*-symbianelf*)
+ gdb_osabi=GDB_OSABI_SYMBIAN ;;
+diff -ru a/gdb/defs.h b/gdb/defs.h
+--- a/gdb/defs.h 2016-10-07 17:09:21.000000000 +0000
++++ b/gdb/defs.h 2019-06-04 17:07:31.733789600 +0000
+@@ -602,6 +602,7 @@
+ GDB_OSABI_NETBSD_ELF,
+ GDB_OSABI_OPENBSD_ELF,
+ GDB_OSABI_WINCE,
++ GDB_OSABI_WINNT,
+ GDB_OSABI_GO32,
+ GDB_OSABI_IRIX,
+ GDB_OSABI_HPUX_ELF,
+diff -ru a/gdb/doc/Makefile.in b/gdb/doc/Makefile.in
+--- a/gdb/doc/Makefile.in 2016-08-01 15:50:20.000000000 +0000
++++ b/gdb/doc/Makefile.in 2019-06-04 17:07:31.733789600 +0000
+@@ -74,8 +74,8 @@
+
+ # Where is the source dir for the READLINE library doc?
+ # Traditionally readline is in .. or .
+-READLINE_DIR = ${gdbdir}/../readline/doc
+-READLINE_TEXI_INCFLAG = @READLINE_TEXI_INCFLAG@
++READLINE_DIR = # ${gdbdir}/../readline/doc
++READLINE_TEXI_INCFLAG = # @READLINE_TEXI_INCFLAG@
+
+ # The GDB/MI docs come from a sibling directory ../mi
+ GDBMI_DIR = ${gdbdir}/mi
+@@ -673,6 +673,10 @@
+ maintainer-clean realclean: distclean
+ rm -f GDBvn.texi *.info* *.dvi *.ps *.html *.pdf $(MANS)
+
++ifeq (0,0)
++install:
++else
+ install: install-info install-man
++endif
+
+ uninstall: uninstall-info uninstall-man
+diff -ru a/gdb/osabi.c b/gdb/osabi.c
+--- a/gdb/osabi.c 2016-08-01 15:50:20.000000000 +0000
++++ b/gdb/osabi.c 2019-06-04 17:07:31.749389600 +0000
+@@ -70,6 +70,7 @@
+ { "NetBSD/ELF", NULL },
+ { "OpenBSD/ELF", NULL },
+ { "WindowsCE", NULL },
++ { "WINNT", "(midipix)" },
+ { "DJGPP", NULL },
+ { "Irix", NULL },
+ { "HP-UX/ELF", NULL },
+diff -ru a/gdb/stub-termcap.c b/gdb/stub-termcap.c
+--- a/gdb/stub-termcap.c 2016-10-07 17:09:21.000000000 +0000
++++ b/gdb/stub-termcap.c 2019-06-04 17:07:31.749389600 +0000
+@@ -50,11 +50,13 @@
+ weak (later versions, e.g., 4.8, do support it). Given this stub
+ file originally was Windows only, and we only needed this when we
+ made it work on other hosts, it should be OK. */
++#if 0
+ #ifndef __MINGW32__
+ char PC __attribute__((weak));
+ char *BC __attribute__((weak));
+ char *UP __attribute__((weak));
+ #endif
++#endif
+
+ /* Each of the files below is a minimal implementation of the standard
+ termcap function with the same name, suitable for use in a Windows