summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb-7.12.midipix.patch246
1 files changed, 246 insertions, 0 deletions
diff --git a/gdb-7.12.midipix.patch b/gdb-7.12.midipix.patch
new file mode 100644
index 0000000..21dd93a
--- /dev/null
+++ b/gdb-7.12.midipix.patch
@@ -0,0 +1,246 @@
+==========
+gdb.config:
+==========
+#!/bin/sh
+
+ CFLAGS_FOR_TARGET="-g3 -O0 --sysroot=$HOME/midipix/nt64/debug/native" \
+ CXX_FOR_TARGET="-g3 -O0 --sysroot=$HOME/midipix/nt64/debug/native" \
+ LDFLAGS_FOR_TARGET="--sysroot=$HOME/midipix/nt64/debug/native" \
+../gdb-7.12/configure --with-system-zlib --with-system-libiberty \
+ --host=x86_64-nt64-midipix --target=x86_64-nt64-midipix \
+ --build=$(cc -dumpmachine)
+
+========
+gdb.make:
+========
+#!/bin/sh
+
+make LIBTOOL=rdlibtool MAKE="make LIBTOOL=rdlibtool" -j8 \
+ SYSROOT_FLAGS=--sysroot=$HOME/midipix/nt64/debug/native
+
+
+===========
+gdb.install:
+===========
+#!/bin/sh
+
+make LIBTOOL=rdlibtool MAKE="make LIBTOOL=rdlibtool" -j8 \
+ SYSROOT_FLAGS=--sysroot=$HOME/midipix/nt64/debug/native \
+ DESTDIR=destdir install
+
+diff -ru --new-file 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-03 23:32:57.633401252 +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 --new-file 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-03 23:32:57.637401253 +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 --new-file a/config.guess b/config.guess
+--- a/config.guess 2016-08-01 15:50:20.000000000 +0000
++++ b/config.guess 2019-06-03 23:32:57.637401253 +0000
+@@ -4,6 +4,9 @@
+
+ timestamp='2016-05-27'
+
++echo x86_64-nt64-midipix
++exit
++
+ # This file 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
+diff -ru --new-file a/config.sub b/config.sub
+--- a/config.sub 2016-08-01 15:50:20.000000000 +0000
++++ b/config.sub 2019-06-03 23:32:57.637401253 +0000
+@@ -1389,7 +1389,7 @@
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -chorusos* | -chorusrdb* | -cegcc* \
+ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+- | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
++ | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+ | -linux-newlib* | -linux-musl* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+diff -ru --new-file a/gdb/config/i386/midipix64.mh b/gdb/config/i386/midipix64.mh
+--- a/gdb/config/i386/midipix64.mh 1970-01-01 00:00:00.000000000 +0000
++++ b/gdb/config/i386/midipix64.mh 2019-06-03 23:33:23.657405443 +0000
+@@ -0,0 +1 @@
++
+diff -ru --new-file a/gdb/config/i386/midipix.mh b/gdb/config/i386/midipix.mh
+--- a/gdb/config/i386/midipix.mh 1970-01-01 00:00:00.000000000 +0000
++++ b/gdb/config/i386/midipix.mh 2019-06-03 23:33:15.317404098 +0000
+@@ -0,0 +1 @@
++
+diff -ru --new-file 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-03 23:32:57.637401253 +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 --new-file 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-03 23:32:57.637401253 +0000
+@@ -678,6 +678,13 @@
+ windows-tdep.o"
+ build_gdbserver=yes
+ ;;
++x86_64-*-midipix)
++ # Target: Midipix
++ gdb_target_obs="amd64-tdep.o amd64-windows-tdep.o \
++ i386-tdep.o i387-tdep.o \
++ windows-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 +725,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 --new-file 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-03 23:32:57.637401253 +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 --new-file 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-03 23:32:57.637401253 +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 --new-file 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-03 23:32:57.637401253 +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@
+@@ -468,12 +468,12 @@
+ # disassemblers?
+ OPCODES_DIR = ../opcodes
+ OPCODES_SRC = $(srcdir)/$(OPCODES_DIR)
+-OPCODES = $(OPCODES_DIR)/libopcodes.a
++OPCODES = -lopcodes
+ # Where are the other opcode tables which only have header file
+ # versions?
+ OP_INCLUDE = $(INCLUDE_DIR)/opcode
+ # Some source files like to use #include "opcodes/file.h"
+-OPCODES_CFLAGS = -I$(OP_INCLUDE) -I$(OPCODES_SRC)/..
++OPCODES_CFLAGS = -I$(OP_INCLUDE) -I$(OPCODES_SRC)/.. $(SYSROOT_FLAGS)
+
+ # The simulator is usually nonexistent; targets that include one
+ # should set this to list all the .o or .a files to be linked in.
+@@ -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 --new-file 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-03 23:32:57.637401253 +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