diff --git a/dkarm-eabi/patches/gcc-6.3.0.patch b/dkarm-eabi/patches/gcc-6.3.0.patch deleted file mode 100644 index 1a8cfeb..0000000 --- a/dkarm-eabi/patches/gcc-6.3.0.patch +++ /dev/null @@ -1,120 +0,0 @@ -diff -NBaur gcc-6.2.0/gcc/config/arm/t-arm-elf gcc-6.2.0-arm/gcc/config/arm/t-arm-elf ---- gcc-6.2.0/gcc/config/arm/t-arm-elf 2016-01-04 14:30:50.000000000 +0000 -+++ gcc-6.2.0-arm/gcc/config/arm/t-arm-elf 2016-12-10 12:16:20.076000000 +0000 -@@ -16,11 +16,19 @@ - # along with GCC; see the file COPYING3. If not see - # . - --MULTILIB_OPTIONS = marm/mthumb --MULTILIB_DIRNAMES = arm thumb -+MULTILIB_OPTIONS = mthumb mbig-endian march=armv6k mfloat-abi=hard -+MULTILIB_DIRNAMES = thumb be armv6k fpu - MULTILIB_EXCEPTIONS = - MULTILIB_MATCHES = - -+MULTILIB_REQUIRED = mthumb mbig-endian mthumb/mbig-endian march=armv6k/mfloat-abi=hard -+ -+ -+MULTILIB_MATCHES += march?armv6k=mtune?mpcore -+MULTILIB_MATCHES += march?armv6k=mcpu?mpcore -+ -+ -+ - #MULTILIB_OPTIONS += mcpu=fa526/mcpu=fa626/mcpu=fa606te/mcpu=fa626te/mcpu=fmp626/mcpu=fa726te - #MULTILIB_DIRNAMES += fa526 fa626 fa606te fa626te fmp626 fa726te - #MULTILIB_EXCEPTIONS += *mthumb*/*mcpu=fa526 *mthumb*/*mcpu=fa626 -@@ -38,9 +46,9 @@ - # Not quite true. We can support hard-vfp calling in Thumb2, but how do we - # express that here? Also, we really need architecture v5e or later - # (mcrr etc). --MULTILIB_OPTIONS += mfloat-abi=hard --MULTILIB_DIRNAMES += fpu --MULTILIB_EXCEPTIONS += *mthumb/*mfloat-abi=hard* -+#MULTILIB_OPTIONS += mfloat-abi=hard -+#MULTILIB_DIRNAMES += fpu -+#MULTILIB_EXCEPTIONS += *mthumb/*mfloat-abi=hard* - #MULTILIB_EXCEPTIONS += *mcpu=fa526/*mfloat-abi=hard* - #MULTILIB_EXCEPTIONS += *mcpu=fa626/*mfloat-abi=hard* - -diff -NBaur gcc-6.2.0/gcc/config/arm/unknown-elf.h gcc-6.2.0-arm/gcc/config/arm/unknown-elf.h ---- gcc-6.2.0/gcc/config/arm/unknown-elf.h 2016-01-04 14:30:50.000000000 +0000 -+++ gcc-6.2.0-arm/gcc/config/arm/unknown-elf.h 2016-09-07 08:58:29.977682360 +0100 -@@ -29,7 +29,7 @@ - #endif - - /* Now we define the strings used to build the spec file. */ --#define UNKNOWN_ELF_STARTFILE_SPEC " crti%O%s crtbegin%O%s crt0%O%s" -+#define UNKNOWN_ELF_STARTFILE_SPEC " crti%O%s crtbegin%O%s" - - #undef STARTFILE_SPEC - #define STARTFILE_SPEC \ -@@ -97,4 +97,4 @@ - udivmoddi4, which will depend on the exception unwind routines, - which will depend on abort, which is defined in libc. */ - #undef LINK_GCC_C_SEQUENCE_SPEC --#define LINK_GCC_C_SEQUENCE_SPEC "--start-group %G %L --end-group" -+#define LINK_GCC_C_SEQUENCE_SPEC "--start-group %G %L %(libgloss) --end-group" -diff -NBaur gcc-6.2.0/gcc/gcc.c gcc-6.2.0-arm/gcc/gcc.c ---- gcc-6.2.0/gcc/gcc.c 2016-08-15 12:19:34.000000000 +0100 -+++ gcc-6.2.0-arm/gcc/gcc.c 2016-09-07 08:58:29.981682360 +0100 -@@ -778,6 +778,11 @@ - #endif - #endif - -+#ifndef LIBGLOSS_SPEC -+# define LIBGLOSS_SPEC "-lsysbase" -+#endif -+ -+ - /* config.h can define STARTFILE_SPEC to override the default crt0 files. */ - #ifndef STARTFILE_SPEC - #define STARTFILE_SPEC \ -@@ -1062,6 +1067,7 @@ - static const char *lib_spec = LIB_SPEC; - static const char *link_gomp_spec = ""; - static const char *libgcc_spec = LIBGCC_SPEC; -+static const char *libgloss_spec = LIBGLOSS_SPEC; - static const char *endfile_spec = ENDFILE_SPEC; - static const char *startfile_spec = STARTFILE_SPEC; - static const char *linker_name_spec = LINKER_NAME; -@@ -1563,6 +1569,7 @@ - INIT_STATIC_SPEC ("lib", &lib_spec), - INIT_STATIC_SPEC ("link_gomp", &link_gomp_spec), - INIT_STATIC_SPEC ("libgcc", &libgcc_spec), -+ INIT_STATIC_SPEC ("libgloss", &libgloss_spec), - INIT_STATIC_SPEC ("startfile", &startfile_spec), - INIT_STATIC_SPEC ("cross_compile", &cross_compile), - INIT_STATIC_SPEC ("version", &compiler_version), -diff -NBaur gcc-6.2.0/libgcc/config/arm/t-bpabi gcc-6.2.0-arm/libgcc/config/arm/t-bpabi ---- gcc-6.2.0/libgcc/config/arm/t-bpabi 2012-08-17 16:06:06.000000000 +0100 -+++ gcc-6.2.0-arm/libgcc/config/arm/t-bpabi 2016-09-07 08:58:29.985682360 +0100 -@@ -17,4 +17,4 @@ - # On ARM, specifying -fnon-call-exceptions will needlessly pull in - # the unwinder in simple programs which use 64-bit division. Omitting - # the option is safe. --LIB2_DIVMOD_EXCEPTION_FLAGS := -fexceptions -+LIB2_DIVMOD_EXCEPTION_FLAGS := -fno-exceptions -diff -NBaur gcc-6.2.0/libgcc/crtstuff.c gcc-6.2.0-arm/libgcc/crtstuff.c ---- gcc-6.2.0/libgcc/crtstuff.c 2016-01-04 14:30:50.000000000 +0000 -+++ gcc-6.2.0-arm/libgcc/crtstuff.c 2016-09-07 08:58:29.985682360 +0100 -@@ -47,7 +47,7 @@ - - /* Target machine header files require this define. */ - #define IN_LIBGCC2 -- -+#define USED_FOR_TARGET - /* FIXME: Including auto-host is incorrect, but until we have - identified the set of defines that need to go into auto-target.h, - this will have to do. */ -diff -NBaur gcc-6.2.0/libgcc/Makefile.in gcc-6.2.0-arm/libgcc/Makefile.in ---- gcc-6.2.0/libgcc/Makefile.in 2016-02-25 12:23:52.000000000 +0000 -+++ gcc-6.2.0-arm/libgcc/Makefile.in 2016-09-07 08:58:29.989682360 +0100 -@@ -820,7 +820,7 @@ - # libgcc_eh.a, only LIB2ADDEH matters. If we do, only LIB2ADDEHSTATIC and - # LIB2ADDEHSHARED matter. (Usually all three are identical.) - --c_flags := -fexceptions -+c_flags := -fno-exceptions - - ifeq ($(enable_shared),yes) - diff --git a/dkarm-eabi/patches/gdb-7.11.patch b/dkarm-eabi/patches/gdb-7.11.patch deleted file mode 100644 index 5f5dabf..0000000 --- a/dkarm-eabi/patches/gdb-7.11.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff -NBaur gdb-7.11/gdb/Makefile.in gdb-7.11-arm/gdb/Makefile.in ---- gdb-7.11/gdb/Makefile.in 2016-02-24 09:55:15.000000000 +0000 -+++ gdb-7.11-arm/gdb/Makefile.in 2016-05-13 15:06:03.629019640 +0100 -@@ -2726,10 +2726,8 @@ - # Note that we put the dependencies into a .Tpo file, then move them - # into place if the compile succeeds. We need this because gcc does - # not atomically write the dependency output file. --@GMAKE_TRUE@override COMPILE.post = -c -o $@ -MT $@ -MMD -MP \ --@GMAKE_TRUE@ -MF $(DEPDIR)/$(basename $(@F)).Tpo --@GMAKE_TRUE@override POSTCOMPILE = @mv $(DEPDIR)/$(basename $(@F)).Tpo \ --@GMAKE_TRUE@ $(DEPDIR)/$(basename $(@F)).Po -+@GMAKE_TRUE@override COMPILE.post = -c -o $@ -+@GMAKE_TRUE@override POSTCOMPILE = - @GMAKE_TRUE@else - @GMAKE_TRUE@override COMPILE.pre = source='$<' object='$@' libtool=no \ - @GMAKE_TRUE@ DEPDIR=$(DEPDIR) $(DEPMODE) $(depcomp) $(CC) -diff -NBaur gdb-7.11/sim/common/Make-common.in gdb-7.11-arm/sim/common/Make-common.in ---- gdb-7.11/sim/common/Make-common.in 2016-02-10 03:19:39.000000000 +0000 -+++ gdb-7.11-arm/sim/common/Make-common.in 2016-05-13 15:06:03.633019640 +0100 -@@ -402,10 +402,8 @@ - # Note that we put the dependencies into a .Tpo file, then move them - # into place if the compile succeeds. We need this because gcc does - # not atomically write the dependency output file. --@GMAKE_TRUE@override COMPILE.post = -c -o $@ -MT $@ -MMD -MP \ --@GMAKE_TRUE@ -MF $(DEPDIR)/$(basename $(@F)).Tpo --@GMAKE_TRUE@override POSTCOMPILE = @mv $(DEPDIR)/$(basename $(@F)).Tpo \ --@GMAKE_TRUE@ $(DEPDIR)/$(basename $(@F)).Po -+@GMAKE_TRUE@override COMPILE.post = -c -o $@ -+@GMAKE_TRUE@override POSTCOMPILE = - @GMAKE_TRUE@else - @GMAKE_TRUE@override COMPILE.pre = source='$<' object='$@' libtool=no \ - @GMAKE_TRUE@ DEPDIR=$(DEPDIR) $(DEPMODE) $(depcomp) $(CC) diff --git a/dkarm-eabi/patches/gdb-7.12.1.patch b/dkarm-eabi/patches/gdb-7.12.1.patch deleted file mode 100644 index 3357f84..0000000 --- a/dkarm-eabi/patches/gdb-7.12.1.patch +++ /dev/null @@ -1,439 +0,0 @@ -diff --git a/gdb/Makefile.in b/gdb/Makefile.in -index bb7da14..d883835 100644 ---- a/gdb/Makefile.in -+++ b/gdb/Makefile.in -@@ -658,6 +658,7 @@ ALL_64_TARGET_OBS = \ - # All other target-dependent objects files (used with --enable-targets=all). - ALL_TARGET_OBS = \ - armbsd-tdep.o arm.o arm-linux.o arm-linux-tdep.o \ -+ arm-3ds-tdep.o \ - arm-get-next-pcs.o arm-symbian-tdep.o \ - armnbsd-tdep.o armobsd-tdep.o \ - arm-tdep.o arm-wince-tdep.o \ -@@ -1679,6 +1680,7 @@ ALLDEPFILES = \ - amd64-sol2-tdep.c \ - arm.c arm-get-next-pcs.c \ - arm-linux.c arm-linux-nat.c arm-linux-tdep.c \ -+ arm-3ds-tdep.c \ - arm-symbian-tdep.c arm-tdep.c \ - armnbsd-nat.c armbsd-tdep.c armnbsd-tdep.c armobsd-tdep.c \ - avr-tdep.c \ -diff --git a/gdb/arm-3ds-tdep.c b/gdb/arm-3ds-tdep.c -new file mode 100644 -index 0000000..9fd9f41 ---- /dev/null -+++ b/gdb/arm-3ds-tdep.c -@@ -0,0 +1,196 @@ -+/* Target-dependent code for 3DS. */ -+ -+/* This uses code from GDB, which license is (copied from another file): */ -+ -+/* -+ Copyright (C) 2002-2017 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 . */ -+ -+#include "defs.h" -+#include "gdbcore.h" -+#include "target.h" -+#include "osabi.h" -+#include "xml-syscall.h" -+ -+#include "arch/arm.h" -+#include "arch/arm-get-next-pcs.h" -+#include "arm-tdep.h" -+ -+static const gdb_byte arm_3ds_arm_le_breakpoint[] = {0xff, 0x00, 0x00, 0xef}; -+static const gdb_byte arm_3ds_thumb_le_breakpoint[] = {0xff, 0xdf}; -+ -+static CORE_ADDR -+ arm_3ds_get_next_pcs_syscall_next_pc (struct arm_get_next_pcs *self); -+ -+/* Operation function pointers for get_next_pcs. */ -+static struct arm_get_next_pcs_ops arm_3ds_get_next_pcs_ops = { -+ arm_get_next_pcs_read_memory_unsigned_integer, -+ arm_3ds_get_next_pcs_syscall_next_pc, -+ arm_get_next_pcs_addr_bits_remove, -+ arm_get_next_pcs_is_thumb, -+ NULL, -+}; -+ -+static CORE_ADDR -+arm_3ds_get_next_pcs_syscall_next_pc (struct arm_get_next_pcs *self) -+{ -+ CORE_ADDR next_pc = 0; -+ CORE_ADDR pc = regcache_read_pc (self->regcache); -+ int is_thumb = arm_is_thumb (self->regcache); -+ ULONGEST svc_number = 0; -+ -+ if (is_thumb) -+ { -+ next_pc = pc + 2; -+ } -+ else -+ { -+ next_pc = pc + 4; -+ } -+ -+ /* Addresses for calling Thumb functions have the bit 0 set. */ -+ if (is_thumb) -+ next_pc = MAKE_THUMB_ADDR (next_pc); -+ -+ return next_pc; -+} -+ -+static int -+arm_3ds_software_single_step (struct frame_info *frame) -+{ -+ struct regcache *regcache = get_current_regcache (); -+ struct gdbarch *gdbarch = get_regcache_arch (regcache); -+ struct address_space *aspace = get_regcache_aspace (regcache); -+ struct arm_get_next_pcs next_pcs_ctx; -+ CORE_ADDR pc; -+ int i; -+ VEC (CORE_ADDR) *next_pcs = NULL; -+ struct cleanup *old_chain; -+ -+ /* If the target does have hardware single step, GDB doesn't have -+ to bother software single step. */ -+ if (target_can_do_single_step () == 1) -+ return 0; -+ -+ old_chain = make_cleanup (VEC_cleanup (CORE_ADDR), &next_pcs); -+ -+ arm_get_next_pcs_ctor (&next_pcs_ctx, -+ &arm_3ds_get_next_pcs_ops, -+ gdbarch_byte_order (gdbarch), -+ gdbarch_byte_order_for_code (gdbarch), -+ 1, -+ regcache); -+ -+ next_pcs = arm_get_next_pcs (&next_pcs_ctx); -+ -+ for (i = 0; VEC_iterate (CORE_ADDR, next_pcs, i, pc); i++) -+ arm_insert_single_step_breakpoint (gdbarch, aspace, pc); -+ -+ do_cleanups (old_chain); -+ -+ return 1; -+} -+ -+static LONGEST -+arm_3ds_get_syscall_number (struct gdbarch *gdbarch, -+ ptid_t ptid) -+{ -+ struct regcache *regs = get_thread_regcache (ptid); -+ -+ ULONGEST pc; -+ ULONGEST cpsr; -+ ULONGEST t_bit = arm_psr_thumb_bit (gdbarch); -+ int is_thumb; -+ ULONGEST svc_number = -1; -+ -+ regcache_cooked_read_unsigned (regs, ARM_PC_REGNUM, &pc); -+ regcache_cooked_read_unsigned (regs, ARM_PS_REGNUM, &cpsr); -+ is_thumb = (cpsr & t_bit) != 0; -+ -+ if (is_thumb) -+ { -+ enum bfd_endian byte_order_for_code = -+ gdbarch_byte_order_for_code (gdbarch); -+ -+ /* PC gets incremented before the syscall-stop, so read the -+ previous instruction. */ -+ unsigned long this_instr = -+ read_memory_unsigned_integer (pc - 2, 2, byte_order_for_code); -+ -+ unsigned long svc_operand = (0x00ff & this_instr); -+ svc_number = svc_operand; -+ } -+ else -+ { -+ enum bfd_endian byte_order_for_code = -+ gdbarch_byte_order_for_code (gdbarch); -+ -+ /* PC gets incremented before the syscall-stop, so read the -+ previous instruction. */ -+ unsigned long this_instr = -+ read_memory_unsigned_integer (pc - 4, 4, byte_order_for_code); -+ -+ unsigned long svc_operand = (0x000000ff & this_instr); -+ svc_number = svc_operand; -+ } -+ -+ if (svc_number == 0xfe) -+ { -+ regcache_cooked_read_unsigned (regs, 12, &svc_number); -+ } -+ -+ return svc_number; -+} -+ -+static void -+arm_3ds_init_abi (struct gdbarch_info info, -+ struct gdbarch *gdbarch) -+{ -+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); -+ -+ switch (info.byte_order) -+ { -+ case BFD_ENDIAN_LITTLE: -+ tdep->arm_breakpoint = arm_3ds_arm_le_breakpoint; -+ tdep->thumb_breakpoint = arm_3ds_thumb_le_breakpoint; -+ tdep->arm_breakpoint_size = sizeof (arm_3ds_arm_le_breakpoint); -+ tdep->thumb_breakpoint_size = sizeof (arm_3ds_thumb_le_breakpoint); -+ break; -+ -+ default: -+ internal_error (__FILE__, __LINE__, -+ _("arm_gdbarch_init: bad byte order")); -+ } -+ tdep->fp_model = ARM_FLOAT_VFP; -+ -+ /* Single stepping. */ -+ set_gdbarch_software_single_step (gdbarch, arm_3ds_software_single_step); -+ -+ /* `catch syscall' */ -+ set_xml_syscall_file_name (gdbarch, "syscalls/arm-3ds.xml"); -+ set_gdbarch_get_syscall_number (gdbarch, arm_3ds_get_syscall_number); -+} -+ -+/* Provide a prototype to silence -Wmissing-prototypes. */ -+extern initialize_file_ftype _initialize_arm_3ds_tdep; -+ -+void -+_initialize_arm_3ds_tdep (void) -+{ -+ gdbarch_register_osabi (bfd_arch_arm, 0, GDB_OSABI_3DS, -+ arm_3ds_init_abi); -+} -diff --git a/gdb/configure.tgt b/gdb/configure.tgt -index 7f1aac3..8c213c0 100644 ---- a/gdb/configure.tgt -+++ b/gdb/configure.tgt -@@ -111,8 +111,8 @@ arm*-*-symbianelf*) - gdb_target_obs="arm.o arm-get-next-pcs.o arm-tdep.o arm-symbian-tdep.o" - ;; - arm*-*-*) -- # Target: ARM embedded system -- gdb_target_obs="arm.o arm-get-next-pcs.o arm-tdep.o" -+ # Target: ARM embedded system (+ 3DS) -+ gdb_target_obs="arm.o arm-get-next-pcs.o arm-tdep.o arm-3ds-tdep.o" - gdb_sim=../sim/arm/libsim.a - ;; - -diff --git a/gdb/data-directory/Makefile.in b/gdb/data-directory/Makefile.in -index 2597b3e..ae17d60 100644 ---- a/gdb/data-directory/Makefile.in -+++ b/gdb/data-directory/Makefile.in -@@ -52,7 +52,7 @@ GEN_SYSCALLS_FILES = arm-linux.xml aarch64-linux.xml \ - mips-o32-linux.xml mips-n32-linux.xml mips-n64-linux.xml \ - s390-linux.xml s390x-linux.xml - --SYSCALLS_FILES = gdb-syscalls.dtd freebsd.xml $(GEN_SYSCALLS_FILES) -+SYSCALLS_FILES = gdb-syscalls.dtd freebsd.xml arm-3ds.xml $(GEN_SYSCALLS_FILES) - - PYTHON_DIR = python - PYTHON_INSTALL_DIR = $(DESTDIR)$(GDB_DATADIR)/$(PYTHON_DIR) -diff --git a/gdb/defs.h b/gdb/defs.h -index 66082c0..1b36f8a 100644 ---- a/gdb/defs.h -+++ b/gdb/defs.h -@@ -616,6 +616,7 @@ enum gdb_osabi - GDB_OSABI_LYNXOS178, - GDB_OSABI_NEWLIB, - GDB_OSABI_SDE, -+ GDB_OSABI_3DS, - - GDB_OSABI_INVALID /* keep this last */ - }; -diff --git a/gdb/osabi.c b/gdb/osabi.c -index 93c7b61..737029b 100644 ---- a/gdb/osabi.c -+++ b/gdb/osabi.c -@@ -84,6 +84,7 @@ static const struct osabi_names gdb_osabi_names[] = - { "LynxOS178", NULL }, - { "Newlib", NULL }, - { "SDE", NULL }, -+ { "3DS", NULL }, - - { "", NULL } - }; -diff --git a/gdb/syscalls/arm-3ds.xml b/gdb/syscalls/arm-3ds.xml -new file mode 100644 -index 0000000..3414913 ---- /dev/null -+++ b/gdb/syscalls/arm-3ds.xml -@@ -0,0 +1,159 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+