Compare commits

...

27 Commits

Author SHA1 Message Date
Dave Murphy
d2614153c5 update to binutils 2.32 2019-02-11 19:28:58 +00:00
Dave Murphy
37b381ea1f proper fix for struct timeval 2019-02-11 19:28:09 +00:00
Dave Murphy
a6c67408af devkitPPC: separate rules files for independent update 2019-01-30 12:49:32 +00:00
Dave Murphy
bd5c0ba3ec remove old wii-u attempt 2019-01-30 11:04:48 +00:00
Dave Murphy
41b418fd8c consolidate paths 2019-01-30 08:57:46 +00:00
Dave Murphy
8421d92bcb always use --build 2018-12-15 21:36:53 +00:00
Dave Murphy
20dc1324d4 increase devices to 32 2018-12-15 21:36:53 +00:00
Dave Murphy
118896fb1a add gdb 8.2 patch 2018-12-15 21:36:53 +00:00
Dave Murphy
ab95988007 update devkitARM version 2018-12-15 21:36:53 +00:00
Dave Murphy
596d710c3b use gdb 8.2 2018-12-15 21:35:15 +00:00
Dave Murphy
f0463ecba1 update to binutils 2.31.1 2018-12-15 21:35:15 +00:00
Dave Murphy
0bbc2be394 update to gcc 8.2 2018-12-15 21:35:15 +00:00
Dave Murphy
61dec9401a add note about devkitPro pacman 2018-11-14 19:34:07 +00:00
Dave Murphy
a9712ae81e use gdb 8.2 2018-11-14 19:34:07 +00:00
Dave Murphy
83f1b5cf02 remove old gcc patch 2018-11-14 19:34:07 +00:00
Dave Murphy
0c9af4df25 use binutils 2.31.1 2018-11-14 19:34:07 +00:00
Dave Murphy
4191cbef14 use gcc 8.2 2018-11-14 19:34:07 +00:00
PoroCYon
b0d0a3b3a3 fix symbol names in bin2o-generated header files sometimes being invalid C identifiers 2018-09-18 17:16:49 +01:00
Dave Murphy
da8d9c793b explicitly MPL crt0 files. Closes #31 2018-08-15 02:02:59 +01:00
Dave Murphy
e477403617 update devkitA64 gcc to 8.2.0 2018-07-28 15:57:51 +01:00
Dave Murphy
c84da440c4 update devkitA64 binutils 2018-07-28 15:56:01 +01:00
Dave Murphy
e0aebb7afb devkitA64 r11 updates 2018-07-15 16:56:12 +01:00
Dave Murphy
eed906eda5 update newlib 2018-07-15 16:04:56 +01:00
Dave Murphy
893eeef9c5 set prefix 2018-07-15 16:04:38 +01:00
Dave Murphy
9f518e2f8d disable git scripts 2018-07-03 10:52:02 +01:00
Dave Murphy
df5a8f947a updates for devkitPPC r32 2018-07-03 09:37:08 +01:00
Dave Murphy
0778d4209c disable git buildscripts 2018-06-13 19:24:53 +01:00
37 changed files with 875 additions and 551 deletions

View File

@@ -1,8 +1,8 @@
#!/bin/bash #!/bin/bash
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
# devkitARM release 49 # devkitARM release 50
# devkitPPC release 31 # devkitPPC release 33
# devkitA64 release 10 # devkitA64 release 12
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
if [ 0 -eq 1 ] ; then if [ 0 -eq 1 ] ; then
@@ -18,6 +18,9 @@ echo "Please note, these scripts are provided as a courtesy, toolchains built wi
echo "are for personal use only and may not be distributed by entities other than devkitPro." echo "are for personal use only and may not be distributed by entities other than devkitPro."
echo "See http://devkitpro.org/wiki/Trademarks" echo "See http://devkitpro.org/wiki/Trademarks"
echo echo
echo "Users should use devkitPro pacman to maintain toolchain installations where possible"
echo "See https://devkitpro.org/wiki/devkitPro_pacman"
echo
echo "Patches and improvements are of course welcome, please submit a PR" echo "Patches and improvements are of course welcome, please submit a PR"
echo "https://github.com/devkitPro/buildscripts/pulls" echo "https://github.com/devkitPro/buildscripts/pulls"
echo echo
@@ -43,8 +46,9 @@ DFU_UTIL_VER=0.9.1
STLINK_VER=1.2.3 STLINK_VER=1.2.3
GAMECUBE_TOOLS_VER=1.0.2 GAMECUBE_TOOLS_VER=1.0.2
LIBOGC_VER=1.8.20 LIBOGC_VER=1.8.21
WIILOAD_VER=0.5.1 WIILOAD_VER=0.5.1
DKPPC_RULES_VER=1.0.0
LIBCTRU_VER=1.5.0 LIBCTRU_VER=1.5.0
CITRO3D_VER=1.4.0 CITRO3D_VER=1.4.0
@@ -57,8 +61,8 @@ TEX3DS_VER=1.0.0
GP32_TOOLS_VER=1.0.3 GP32_TOOLS_VER=1.0.3
LIBMIRKO_VER=0.9.8 LIBMIRKO_VER=0.9.8
SWITCH_TOOLS_VER=1.4.0 SWITCH_TOOLS_VER=1.4.1
LIBNX_VER=1.2.1 LIBNX_VER=1.3.0
OSXMIN=${OSXMIN:-10.9} OSXMIN=${OSXMIN:-10.9}
@@ -151,11 +155,13 @@ export MAKE
TOOLPATH=$(echo $INSTALLDIR | sed -e 's/^\([a-zA-Z]\):/\/\1/') TOOLPATH=$(echo $INSTALLDIR | sed -e 's/^\([a-zA-Z]\):/\/\1/')
export PATH=$PATH:$TOOLPATH/$package/bin export PATH=$PATH:$TOOLPATH/$package/bin
CROSS_PARAMS="--build=`./config.guess`"
if [ ! -z $CROSSBUILD ]; then if [ ! -z $CROSSBUILD ]; then
toolsprefix=$INSTALLDIR/$CROSSBUILD/tools toolsprefix=$INSTALLDIR/$CROSSBUILD/tools
prefix=$INSTALLDIR/$CROSSBUILD/$package prefix=$INSTALLDIR/$CROSSBUILD/$package
toolsprefix=$INSTALLDIR/$CROSSBUILD/tools toolsprefix=$INSTALLDIR/$CROSSBUILD/tools
CROSS_PARAMS="--build=`./config.guess` --host=$CROSSBUILD" CROSS_PARAMS="$CROSS_PARAMS --host=$CROSSBUILD"
CROSS_GCC_PARAMS="--with-gmp=$CROSSPATH --with-mpfr=$CROSSPATH --with-mpc=$CROSSPATH" CROSS_GCC_PARAMS="--with-gmp=$CROSSPATH --with-mpfr=$CROSSPATH --with-mpc=$CROSSPATH"
else else
toolsprefix=$INSTALLDIR/tools toolsprefix=$INSTALLDIR/tools
@@ -206,7 +212,7 @@ fi
patchdir=$(pwd)/$basedir/patches patchdir=$(pwd)/$basedir/patches
scriptdir=$(pwd)/$basedir/scripts scriptdir=$(pwd)/$basedir/scripts
archives="binutils-${BINUTILS_VER}.tar.bz2 gcc-${GCC_VER}.tar.xz newlib-${NEWLIB_VER}.tar.gz gdb-${GDB_VER}.tar.xz" archives="binutils-${BINUTILS_VER}.tar.xz gcc-${GCC_VER}.tar.xz newlib-${NEWLIB_VER}.tar.gz gdb-${GDB_VER}.tar.xz"
if [ $VERSION -eq 1 ]; then if [ $VERSION -eq 1 ]; then
@@ -229,7 +235,7 @@ if [ $VERSION -eq 2 ]; then
hostarchives="gamecube-tools-$GAMECUBE_TOOLS_VER.tar.bz2 wiiload-$WIILOAD_VER.tar.bz2 general-tools-$GENERAL_TOOLS_VER.tar.bz2" hostarchives="gamecube-tools-$GAMECUBE_TOOLS_VER.tar.bz2 wiiload-$WIILOAD_VER.tar.bz2 general-tools-$GENERAL_TOOLS_VER.tar.bz2"
archives="binutils-${MN_BINUTILS_VER}.tar.bz2 $archives" archives="binutils-${MN_BINUTILS_VER}.tar.bz2 devkitppc-rules-$DKPPC_RULES_VER.tar.xz $archives"
fi fi
if [ $VERSION -eq 3 ]; then if [ $VERSION -eq 3 ]; then
@@ -260,7 +266,7 @@ cd $BUILDSCRIPTDIR
mkdir -p $BUILDDIR mkdir -p $BUILDDIR
cd $BUILDDIR cd $BUILDDIR
extract_and_patch binutils $BINUTILS_VER bz2 extract_and_patch binutils $BINUTILS_VER xz
extract_and_patch gcc $GCC_VER xz extract_and_patch gcc $GCC_VER xz
extract_and_patch newlib $NEWLIB_VER gz extract_and_patch newlib $NEWLIB_VER gz
extract_and_patch gdb $GDB_VER xz extract_and_patch gdb $GDB_VER xz
@@ -300,6 +306,8 @@ if [ "$BUILD_DKPRO_SKIP_LIBRARIES" != "1" ] && [ -f $scriptdir/build-libs.sh ];
. $scriptdir/build-libs.sh || { echo "Error building libraries"; exit 1; }; cd $BUILDSCRIPTDIR; . $scriptdir/build-libs.sh || { echo "Error building libraries"; exit 1; }; cd $BUILDSCRIPTDIR;
fi fi
cd $BUILDSCRIPTDIR
if [ ! -z $CROSSBUILD ] && grep -q "mingw" <<<"$CROSSBUILD" ; then if [ ! -z $CROSSBUILD ] && grep -q "mingw" <<<"$CROSSBUILD" ; then
cp -v $CROSSBINPATH//libwinpthread-1.dll $prefix/bin cp -v $CROSSBINPATH//libwinpthread-1.dll $prefix/bin
fi fi

View File

@@ -1,5 +1,7 @@
#!/bin/bash #!/bin/bash
export CROSSBUILD=i686-w64-mingw32 export CROSSBUILD=i686-w64-mingw32
export CROSSLIBPATH=/opt/mingw32/mingw/lib export CROSSPATH=/opt/mingw32/mingw
export CROSSBINPATH=/opt/mingw32/mingw/bin export CROSSLIBPATH=$CROSSPATH/lib
export CROSSBINPATH=$CROSSPATH/bin
export PATH=/opt/mingw32/bin:$PATH export PATH=/opt/mingw32/bin:$PATH

View File

@@ -0,0 +1,346 @@
diff -NBaur binutils-2.31.1/bfd/elfnn-aarch64.c binutils-2.31.1-dka64/bfd/elfnn-aarch64.c
--- binutils-2.31.1/bfd/elfnn-aarch64.c 2018-06-25 12:44:16.000000000 +0100
+++ binutils-2.31.1-dka64/bfd/elfnn-aarch64.c 2018-07-27 18:11:15.757082269 +0100
@@ -2342,6 +2342,12 @@
aarch64_stub_erratum_843419_veneer,
};
+/* Is an undefined weak symbol resolved to 0 ? */
+#define UNDEFINED_WEAK_RESOLVED_TO_ZERO(INFO, EH) \
+ ((EH)->root.root.type == bfd_link_hash_undefweak \
+ && bfd_link_executable (INFO) \
+ && !(INFO)->dynamic_undefined_weak)
+
struct elf_aarch64_stub_hash_entry
{
/* Base hash table entry structure. */
@@ -6370,11 +6376,13 @@
Elf_Internal_Sym *sym;
asection *sec;
struct elf_link_hash_entry *h;
+ struct elf_aarch64_link_hash_entry *eh;
bfd_vma relocation;
bfd_reloc_status_type r;
arelent bfd_reloc;
char sym_type;
bfd_boolean unresolved_reloc = FALSE;
+ bfd_boolean resolved_to_zero = FALSE;
char *error_message = NULL;
r_symndx = ELFNN_R_SYM (rel->r_info);
@@ -6509,6 +6517,10 @@
h, &unresolved_reloc,
save_addend, &addend, sym);
+ eh = (struct elf_aarch64_link_hash_entry *) h;
+ resolved_to_zero = (eh != NULL
+ && UNDEFINED_WEAK_RESOLVED_TO_ZERO (info, eh));
+
switch (elfNN_aarch64_bfd_reloc_from_type (input_bfd, r_type))
{
case BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC:
@@ -6532,7 +6544,7 @@
need_relocs =
(!bfd_link_executable (info) || indx != 0) &&
(h == NULL
- || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
+ || (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT && !resolved_to_zero)
|| h->root.type != bfd_link_hash_undefweak);
BFD_ASSERT (globals->root.srelgot != NULL);
@@ -6627,7 +6639,7 @@
need_relocs =
(!bfd_link_executable (info) || indx != 0) &&
(h == NULL
- || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
+ || (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT && !resolved_to_zero)
|| h->root.type != bfd_link_hash_undefweak);
BFD_ASSERT (globals->root.srelgot != NULL);
@@ -6676,7 +6688,7 @@
bfd_vma off = symbol_tlsdesc_got_offset (input_bfd, h, r_symndx);
need_relocs = (h == NULL
- || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
+ || (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT && !resolved_to_zero)
|| h->root.type != bfd_link_hash_undefweak);
BFD_ASSERT (globals->root.srelgot != NULL);
@@ -7019,6 +7031,26 @@
return FALSE;
}
+/* Remove undefined weak symbol from the dynamic symbol table if it
+ is resolved to 0. */
+
+extern bfd_boolean
+elfNN_aarch64_elf_fixup_symbol (struct bfd_link_info *, struct elf_link_hash_entry *);
+
+bfd_boolean
+elfNN_aarch64_elf_fixup_symbol (struct bfd_link_info *info,
+ struct elf_link_hash_entry *h)
+{
+ if (h->dynindx != -1
+ && UNDEFINED_WEAK_RESOLVED_TO_ZERO (info, elf_aarch64_hash_entry (h)))
+ {
+ h->dynindx = -1;
+ _bfd_elf_strtab_delref (elf_hash_table (info)->dynstr,
+ h->dynstr_index);
+ }
+ return TRUE;
+}
+
/* Adjust a symbol defined by a dynamic object and referenced by a
regular object. The current definition is in some section of the
dynamic object, but we're not including those sections. We have to
@@ -8221,6 +8253,7 @@
struct elf_aarch64_link_hash_table *htab;
struct elf_aarch64_link_hash_entry *eh;
struct elf_dyn_relocs *p;
+ bfd_boolean resolved_to_zero;
/* An example of a bfd_link_hash_indirect symbol is versioned
symbol. For example: __gxx_personality_v0(bfd_link_hash_indirect)
@@ -8240,6 +8273,10 @@
info = (struct bfd_link_info *) inf;
htab = elf_aarch64_hash_table (info);
+ eh = (struct elf_aarch64_link_hash_entry *) h;
+ eh->tlsdesc_got_jump_table_offset = (bfd_vma) - 1;
+ resolved_to_zero = UNDEFINED_WEAK_RESOLVED_TO_ZERO (info, eh);
+
/* Since STT_GNU_IFUNC symbol must go through PLT, we handle it
here if it is defined and referenced in a non-shared object. */
if (h->type == STT_GNU_IFUNC
@@ -8249,7 +8286,7 @@
{
/* Make sure this symbol is output as a dynamic symbol.
Undefined weak syms won't yet be marked as dynamic. */
- if (h->dynindx == -1 && !h->forced_local
+ if (h->dynindx == -1 && !h->forced_local && !resolved_to_zero
&& h->root.type == bfd_link_hash_undefweak)
{
if (!bfd_elf_link_record_dynamic_symbol (info, h))
@@ -8283,6 +8320,11 @@
of relaxing into these from the large model PLT entries. */
s->size += PLT_SMALL_ENTRY_SIZE;
+ /* There should be no PLT relocations against resolved undefined
+ weak symbols in the executable. */
+ if (!resolved_to_zero)
+ {
+
/* We also need to make an entry in the .got.plt section, which
will be placed in the .got section by the linker script. */
htab->root.sgotplt->size += GOT_ENTRY_SIZE;
@@ -8305,6 +8347,7 @@
htab->root.srelplt->reloc_count++;
}
+ }
else
{
h->plt.offset = (bfd_vma) - 1;
@@ -8317,9 +8360,6 @@
h->needs_plt = 0;
}
- eh = (struct elf_aarch64_link_hash_entry *) h;
- eh->tlsdesc_got_jump_table_offset = (bfd_vma) - 1;
-
if (h->got.refcount > 0)
{
bfd_boolean dyn;
@@ -8331,7 +8371,7 @@
/* Make sure this symbol is output as a dynamic symbol.
Undefined weak syms won't yet be marked as dynamic. */
- if (dyn && h->dynindx == -1 && !h->forced_local
+ if (dyn && h->dynindx == -1 && !h->forced_local && !resolved_to_zero
&& h->root.type == bfd_link_hash_undefweak)
{
if (!bfd_elf_link_record_dynamic_symbol (info, h))
@@ -8345,7 +8385,7 @@
{
h->got.offset = htab->root.sgot->size;
htab->root.sgot->size += GOT_ENTRY_SIZE;
- if ((ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
+ if (((ELF_ST_VISIBILITY (h->other) == STV_DEFAULT && !resolved_to_zero)
|| h->root.type != bfd_link_hash_undefweak)
&& (bfd_link_pic (info)
|| WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, 0, h))
@@ -8381,7 +8421,7 @@
}
indx = h && h->dynindx != -1 ? h->dynindx : 0;
- if ((ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
+ if (((ELF_ST_VISIBILITY (h->other) == STV_DEFAULT && !resolved_to_zero)
|| h->root.type != bfd_link_hash_undefweak)
&& (!bfd_link_executable (info)
|| indx != 0
@@ -8447,7 +8487,7 @@
visibility. */
if (eh->dyn_relocs != NULL && h->root.type == bfd_link_hash_undefweak)
{
- if (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT
+ if (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT || resolved_to_zero
|| UNDEFWEAK_NO_DYNAMIC_RELOC (info, h))
eh->dyn_relocs = NULL;
@@ -8467,7 +8507,9 @@
symbols which turn out to need copy relocs or are not
dynamic. */
- if (!h->non_got_ref
+ if (!(h->non_got_ref
+ || (h->root.type == bfd_link_hash_undefweak
+ && !resolved_to_zero))
&& ((h->def_dynamic
&& !h->def_regular)
|| (htab->root.dynamic_sections_created
@@ -8478,6 +8520,7 @@
Undefined weak syms won't yet be marked as dynamic. */
if (h->dynindx == -1
&& !h->forced_local
+ && !resolved_to_zero
&& h->root.type == bfd_link_hash_undefweak
&& !bfd_elf_link_record_dynamic_symbol (info, h))
return FALSE;
@@ -9098,8 +9141,17 @@
Elf_Internal_Sym *sym)
{
struct elf_aarch64_link_hash_table *htab;
+ struct elf_aarch64_link_hash_entry *eh;
+ bfd_boolean local_undefweak;
htab = elf_aarch64_hash_table (info);
+ eh = (struct elf_aarch64_link_hash_entry *) h;
+
+ /* We keep PLT/GOT entries without dynamic PLT/GOT relocations for
+ resolved undefined weak symbols in executable so that their
+ references have value 0 at run-time. */
+ local_undefweak = UNDEFINED_WEAK_RESOLVED_TO_ZERO (info, eh);
+
if (h->plt.offset != (bfd_vma) - 1)
{
asection *plt, *gotplt, *relplt;
@@ -9134,7 +9186,7 @@
return FALSE;
elfNN_aarch64_create_small_pltn_entry (h, htab, output_bfd, info);
- if (!h->def_regular)
+ if (!local_undefweak && !h->def_regular)
{
/* Mark the symbol as undefined, rather than as defined in
the .plt section. */
@@ -9153,10 +9205,11 @@
}
if (h->got.offset != (bfd_vma) - 1
- && elf_aarch64_hash_entry (h)->got_type == GOT_NORMAL
+ && elf_aarch64_hash_entry (h)->got_type == GOT_NORMAL
/* Undefined weak symbol in static PIE resolves to 0 without
any dynamic relocations. */
- && !UNDEFWEAK_NO_DYNAMIC_RELOC (info, h))
+ && !UNDEFWEAK_NO_DYNAMIC_RELOC (info, h)
+ && !local_undefweak)
{
Elf_Internal_Rela rela;
bfd_byte *loc;
@@ -9650,6 +9703,9 @@
#define elf_backend_init_index_section \
_bfd_elf_init_2_index_sections
+#define elf_backend_fixup_symbol \
+ elfNN_aarch64_elf_fixup_symbol
+
#define elf_backend_finish_dynamic_sections \
elfNN_aarch64_finish_dynamic_sections
diff -NBaur binutils-2.31.1/ld/emulparams/aarch64elf32.sh binutils-2.31.1-dka64/ld/emulparams/aarch64elf32.sh
--- binutils-2.31.1/ld/emulparams/aarch64elf32.sh 2018-06-24 19:38:57.000000000 +0100
+++ binutils-2.31.1-dka64/ld/emulparams/aarch64elf32.sh 2018-07-27 18:04:52.585317513 +0100
@@ -1,3 +1,5 @@
+. ${srcdir}/emulparams/dynamic_undefined_weak.sh
+
ARCH="aarch64:ilp32"
MACHINE=
NOP=0x1f2003d5
diff -NBaur binutils-2.31.1/ld/emulparams/aarch64elf.sh binutils-2.31.1-dka64/ld/emulparams/aarch64elf.sh
--- binutils-2.31.1/ld/emulparams/aarch64elf.sh 2018-06-24 19:38:57.000000000 +0100
+++ binutils-2.31.1-dka64/ld/emulparams/aarch64elf.sh 2018-07-27 18:04:52.585317513 +0100
@@ -1,3 +1,5 @@
+. ${srcdir}/emulparams/dynamic_undefined_weak.sh
+
ARCH=aarch64
MACHINE=
NOP=0x1f2003d5
diff -NBaur binutils-2.31.1/ld/emultempl/aarch64elf.em binutils-2.31.1-dka64/ld/emultempl/aarch64elf.em
--- binutils-2.31.1/ld/emultempl/aarch64elf.em 2018-06-26 12:27:20.000000000 +0100
+++ binutils-2.31.1-dka64/ld/emultempl/aarch64elf.em 2018-07-27 18:04:52.585317513 +0100
@@ -380,7 +380,7 @@
{ "no-apply-dynamic-relocs", no_argument, NULL, OPTION_NO_APPLY_DYNAMIC_RELOCS},
'
-PARSE_AND_LIST_OPTIONS='
+PARSE_AND_LIST_OPTIONS=${PARSE_AND_LIST_OPTIONS}'
fprintf (file, _(" --no-enum-size-warning Don'\''t warn about objects with incompatible\n"
" enum sizes\n"));
fprintf (file, _(" --no-wchar-size-warning Don'\''t warn about objects with incompatible\n"
diff -NBaur binutils-2.31.1/ld/Makefile.am binutils-2.31.1-dka64/ld/Makefile.am
--- binutils-2.31.1/ld/Makefile.am 2018-06-24 19:38:57.000000000 +0100
+++ binutils-2.31.1-dka64/ld/Makefile.am 2018-07-27 18:04:52.585317513 +0100
@@ -1495,19 +1495,23 @@
$(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
eaarch64elf.c: $(srcdir)/emulparams/aarch64elf.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
+ $(srcdir)/emulparams/dynamic_undefined_weak.sh \
+ $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em ldemul-list.h \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
eaarch64elf32.c: $(srcdir)/emulparams/aarch64elf32.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
+ $(srcdir)/emulparams/dynamic_undefined_weak.sh \
+ $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em ldemul-list.h \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
eaarch64elfb.c: $(srcdir)/emulparams/aarch64elfb.sh $(srcdir)/emulparams/aarch64elf.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
+ $(srcdir)/emulparams/dynamic_undefined_weak.sh \
+ $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em ldemul-list.h \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
eaarch64elf32b.c: $(srcdir)/emulparams/aarch64elf32b.sh $(srcdir)/emulparams/aarch64elf32.sh \
- $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
+ $(srcdir)/emulparams/dynamic_undefined_weak.sh \
+ $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em ldemul-list.h \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
eaarch64cloudabi.c: $(srcdir)/emulparams/aarch64cloudabi.sh \
diff -NBaur binutils-2.31.1/ld/Makefile.in binutils-2.31.1-dka64/ld/Makefile.in
--- binutils-2.31.1/ld/Makefile.in 2018-07-18 08:46:21.000000000 +0100
+++ binutils-2.31.1-dka64/ld/Makefile.in 2018-07-27 18:04:52.585317513 +0100
@@ -3097,18 +3097,22 @@
eaarch64elf.c: $(srcdir)/emulparams/aarch64elf.sh \
$(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
+ $(srcdir)/emulparams/dynamic_undefined_weak.sh \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
eaarch64elf32.c: $(srcdir)/emulparams/aarch64elf32.sh \
$(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
+ $(srcdir)/emulparams/dynamic_undefined_weak.sh \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
eaarch64elfb.c: $(srcdir)/emulparams/aarch64elfb.sh $(srcdir)/emulparams/aarch64elf.sh \
$(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
+ $(srcdir)/emulparams/dynamic_undefined_weak.sh \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
eaarch64elf32b.c: $(srcdir)/emulparams/aarch64elf32b.sh $(srcdir)/emulparams/aarch64elf32.sh \
$(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
+ $(srcdir)/emulparams/dynamic_undefined_weak.sh \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
eaarch64cloudabi.c: $(srcdir)/emulparams/aarch64cloudabi.sh \

View File

@@ -0,0 +1,199 @@
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 532c33f4c2b..c8a8bc698a7 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -945,6 +945,7 @@ aarch64*-*-elf | aarch64*-*-fuchsia* | aarch64*-*-rtems*)
case $target in
aarch64-*-elf*)
use_gcc_stdint=wrap
+ tm_defines="${tm_defines} TARGET_DEFAULT_ASYNC_UNWIND_TABLES=1"
;;
aarch64-*-fuchsia*)
tm_file="${tm_file} fuchsia.h"
diff --git a/gcc/config/aarch64/aarch64-elf-raw.h b/gcc/config/aarch64/aarch64-elf-raw.h
index c074238df06..ef503ddd5a6 100644
--- a/gcc/config/aarch64/aarch64-elf-raw.h
+++ b/gcc/config/aarch64/aarch64-elf-raw.h
@@ -22,6 +22,7 @@
#ifndef GCC_AARCH64_ELF_RAW_H
#define GCC_AARCH64_ELF_RAW_H
+#define LINK_GCC_C_SEQUENCE_SPEC "--start-group %G %L %(libgloss) --end-group"
#define STARTFILE_SPEC " crti%O%s crtbegin%O%s crt0%O%s"
#define ENDFILE_SPEC \
" crtend%O%s crtn%O%s " \
diff --git a/gcc/config/aarch64/aarch64-opts.h b/gcc/config/aarch64/aarch64-opts.h
index 7a5c6d7664f..687793841de 100644
--- a/gcc/config/aarch64/aarch64-opts.h
+++ b/gcc/config/aarch64/aarch64-opts.h
@@ -48,6 +48,12 @@ enum aarch64_tls_type {
TLS_DESCRIPTORS
};
+/* Which thread pointer access sequence to use. */
+enum aarch64_tp_type {
+ TP_HARD,
+ TP_SOFT
+};
+
/* The code model defines the address generation strategy.
Most have a PIC and non-PIC variant. */
enum aarch64_code_model {
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index 175f13dc264..733ab473cbd 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -11979,8 +11979,24 @@ aarch64_load_tp (rtx target)
|| !register_operand (target, Pmode))
target = gen_reg_rtx (Pmode);
- /* Can return in any reg. */
- emit_insn (gen_aarch64_load_tp_hard (target));
+ if (TARGET_HARD_TP)
+ {
+ /* Can return in any reg. */
+ emit_insn (gen_aarch64_load_tp_hard (target));
+ }
+ else
+ {
+ /* Always returned in r0. Immediately copy the result into a pseudo,
+ otherwise other uses of r0 (e.g. setting up function arguments) may
+ clobber the value. */
+
+ rtx tmp;
+
+ emit_insn (gen_aarch64_load_tp_soft ());
+
+ tmp = gen_rtx_REG (DImode, R0_REGNUM);
+ emit_move_insn (target, tmp);
+ }
return target;
}
diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h
index 976f9afae54..73263bcb5e7 100644
--- a/gcc/config/aarch64/aarch64.h
+++ b/gcc/config/aarch64/aarch64.h
@@ -957,6 +957,10 @@ typedef struct
/* Check TLS Descriptors mechanism is selected. */
#define TARGET_TLS_DESC (aarch64_tls_dialect == TLS_DESCRIPTORS)
+/* Check selected thread pointer access sequence to use. */
+#define TARGET_HARD_TP (target_thread_pointer == TP_HARD)
+#define TARGET_SOFT_TP (target_thread_pointer == TP_SOFT)
+
extern enum aarch64_code_model aarch64_cmodel;
/* When using the tiny addressing model conditional and unconditional branches
diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md
index 32a0e1f3685..783c655acf0 100644
--- a/gcc/config/aarch64/aarch64.md
+++ b/gcc/config/aarch64/aarch64.md
@@ -5693,11 +5693,22 @@
(define_insn "aarch64_load_tp_hard"
[(set (match_operand:DI 0 "register_operand" "=r")
(unspec:DI [(const_int 0)] UNSPEC_TLS))]
- ""
- "mrs\\t%0, tpidr_el0"
+ "TARGET_HARD_TP"
+ "mrs\\t%0, tpidr_el0\\t// aarch64_load_tp_hard"
[(set_attr "type" "mrs")]
)
+(define_insn "aarch64_load_tp_soft"
+ [(set (reg:DI 0) (unspec:DI [(const_int 0)] UNSPEC_TLS))
+ (clobber (reg:DI IP0_REGNUM))
+ (clobber (reg:DI IP1_REGNUM))
+ (clobber (reg:DI LR_REGNUM))
+ (clobber (reg:CC CC_REGNUM))]
+ "TARGET_SOFT_TP"
+ "bl\\t__aarch64_read_tp\\t// aarch64_load_tp_soft"
+ [(set_attr "type" "branch")]
+)
+
;; The TLS ABI specifically requires that the compiler does not schedule
;; instructions in the TLS stubs, in order to enable linker relaxation.
;; Therefore we treat the stubs as an atomic sequence.
diff --git a/gcc/config/aarch64/aarch64.opt b/gcc/config/aarch64/aarch64.opt
index 52eaf8c6f40..52bccddc6e3 100644
--- a/gcc/config/aarch64/aarch64.opt
+++ b/gcc/config/aarch64/aarch64.opt
@@ -115,6 +115,20 @@ Enum(aarch64_tls_size) String(32) Value(32)
EnumValue
Enum(aarch64_tls_size) String(48) Value(48)
+mtp=
+Target RejectNegative Joined Enum(aarch64_tp_type) Var(target_thread_pointer) Init(TP_HARD)
+Specify how to access the thread pointer.
+
+Enum
+Name(aarch64_tp_type) Type(enum aarch64_tp_type)
+Valid arguments to -mtp=:
+
+EnumValue
+Enum(aarch64_tp_type) String(hard) Value(TP_HARD)
+
+EnumValue
+Enum(aarch64_tp_type) String(soft) Value(TP_SOFT)
+
march=
Target RejectNegative ToLower Joined Var(aarch64_arch_string)
-march=ARCH Use features of architecture ARCH.
diff --git a/gcc/config/aarch64/t-aarch64 b/gcc/config/aarch64/t-aarch64
index 0be1f0d63aa..a54068bfd96 100644
--- a/gcc/config/aarch64/t-aarch64
+++ b/gcc/config/aarch64/t-aarch64
@@ -68,5 +68,7 @@ cortex-a57-fma-steering.o: $(srcdir)/config/aarch64/cortex-a57-fma-steering.c \
$(srcdir)/config/aarch64/cortex-a57-fma-steering.c
comma=,
-MULTILIB_OPTIONS = $(subst $(comma),/, $(patsubst %, mabi=%, $(subst $(comma),$(comma)mabi=,$(TM_MULTILIB_CONFIG))))
-MULTILIB_DIRNAMES = $(subst $(comma), ,$(TM_MULTILIB_CONFIG))
+MULTILIB_OPTIONS = mcmodel=large fPIC
+MULTILIB_DIRNAMES = large pic
+MULTILIB_REQUIRED = mcmodel=large fPIC
+MULTILIB_MATCHES = fPIC=fpic fPIC=fpie fPIC=fPIE
diff --git a/gcc/gcc.c b/gcc/gcc.c
index a716f708259..6a11011dba7 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -786,6 +786,11 @@ proper position among the other output files. */
#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 \
@@ -1081,6 +1086,7 @@ static const char *link_spec = LINK_SPEC;
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;
@@ -1577,6 +1583,7 @@ static struct spec_list static_specs[] =
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 --git a/libgcc/crtstuff.c b/libgcc/crtstuff.c
index 5e894455e16..f2347455de0 100644
--- a/libgcc/crtstuff.c
+++ b/libgcc/crtstuff.c
@@ -47,6 +47,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
/* 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,

View File

@@ -609,10 +609,10 @@ index 000000000..b6cdfaeb8
+m4_include([../acinclude.m4]) +m4_include([../acinclude.m4])
diff --git a/libgloss/libsysbase/chdir.c b/libgloss/libsysbase/chdir.c diff --git a/libgloss/libsysbase/chdir.c b/libgloss/libsysbase/chdir.c
new file mode 100644 new file mode 100644
index 000000000..90d2dc5b7 index 000000000..b94f6a8b4
--- /dev/null --- /dev/null
+++ b/libgloss/libsysbase/chdir.c +++ b/libgloss/libsysbase/chdir.c
@@ -0,0 +1,201 @@ @@ -0,0 +1,200 @@
+#include <unistd.h> +#include <unistd.h>
+#include <limits.h> +#include <limits.h>
+#include <reent.h> +#include <reent.h>
@@ -712,11 +712,10 @@ index 000000000..90d2dc5b7
+ extra += extraSize; + extra += extraSize;
+ } while (extraSize != 0); + } while (extraSize != 0);
+ +
+ if (pathEnd[-1] != DIRECTORY_SEPARATOR_CHAR) { + if (strlen(path) > 2 ) {
+ pathEnd[0] = DIRECTORY_SEPARATOR_CHAR; + if (pathEnd[-1] == DIRECTORY_SEPARATOR_CHAR && pathEnd[-2] != ':')
+ pathEnd[1] = 0; + pathEnd[-1] = '\0';
+ pathEnd += 1; + }
+ }
+ +
+ return 0; + return 0;
+} +}
@@ -5349,10 +5348,10 @@ index 000000000..da85a3f46
+ +
diff --git a/libgloss/libsysbase/dirent.c b/libgloss/libsysbase/dirent.c diff --git a/libgloss/libsysbase/dirent.c b/libgloss/libsysbase/dirent.c
new file mode 100644 new file mode 100644
index 000000000..0ad29029c index 000000000..7d1f4545d
--- /dev/null --- /dev/null
+++ b/libgloss/libsysbase/dirent.c +++ b/libgloss/libsysbase/dirent.c
@@ -0,0 +1,255 @@ @@ -0,0 +1,256 @@
+#include <malloc.h> +#include <malloc.h>
+#include <errno.h> +#include <errno.h>
+#include <string.h> +#include <string.h>
@@ -5562,6 +5561,7 @@ index 000000000..0ad29029c
+ +
+ strncpy (entry->d_name, filename, sizeof(entry->d_name)); + strncpy (entry->d_name, filename, sizeof(entry->d_name));
+ entry->d_ino = st.st_ino; + entry->d_ino = st.st_ino;
+ entry->d_type = S_ISDIR(st.st_mode)?DT_DIR:DT_REG;
+ +
+ *result = entry; + *result = entry;
+ return 0; + return 0;
@@ -7416,10 +7416,10 @@ index 2082dfdb1..e535f189b 100644
#define MALLOC_ALIGNMENT 16 #define MALLOC_ALIGNMENT 16
#endif #endif
diff --git a/newlib/libc/include/sys/dirent.h b/newlib/libc/include/sys/dirent.h diff --git a/newlib/libc/include/sys/dirent.h b/newlib/libc/include/sys/dirent.h
index a3fb5c02c..5debd1525 100644 index a3fb5c02c..79df5cf61 100644
--- a/newlib/libc/include/sys/dirent.h --- a/newlib/libc/include/sys/dirent.h
+++ b/newlib/libc/include/sys/dirent.h +++ b/newlib/libc/include/sys/dirent.h
@@ -1,13 +1,58 @@ @@ -1,13 +1,65 @@
/* <dirent.h> includes <sys/dirent.h>, which is this file. On a /* <dirent.h> includes <sys/dirent.h>, which is this file. On a
system which supports <dirent.h>, this file is overridden by system which supports <dirent.h>, this file is overridden by
dirent.h in the libc/sys/.../sys directory. On a system which does dirent.h in the libc/sys/.../sys directory. On a system which does
@@ -7431,7 +7431,6 @@ index a3fb5c02c..5debd1525 100644
+#ifndef _dirent_h_ +#ifndef _dirent_h_
+#define _dirent_h_ +#define _dirent_h_
+ +
+#include <sys/iosupport.h>
+#include <sys/types.h> +#include <sys/types.h>
+#include <sys/syslimits.h> +#include <sys/syslimits.h>
+ +
@@ -7444,37 +7443,45 @@ index a3fb5c02c..5debd1525 100644
+#define DT_LNK 10 +#define DT_LNK 10
+#define DT_SOCK 12 +#define DT_SOCK 12
+#define DT_WHT 14 +#define DT_WHT 14
+
+#define _DIRENT_HAVE_D_TYPE
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
-#error "<dirent.h> not supported" -#error "<dirent.h> not supported"
+ +
+ struct dirent { +struct dirent {
+ ino_t d_ino; + ino_t d_ino;
+ unsigned char d_type; + unsigned char d_type;
+ char d_name[NAME_MAX+1]; + char d_name[NAME_MAX+1];
+ }; +};
+ +
+ typedef struct { +/* Directory iterator for mantaining state between dir* calls */
+ long int position; +typedef struct {
+ DIR_ITER* dirData; + int device;
+ struct dirent fileData; + void *dirStruct;
+ } DIR; +} DIR_ITER;
+ +
+ int closedir(DIR *dirp); +typedef struct {
+ DIR *opendir(const char *dirname); + long int position;
+ struct dirent *readdir(DIR *dirp); + DIR_ITER* dirData;
+ int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result); + struct dirent fileData;
+ void rewinddir(DIR *dirp); +} DIR;
+ void seekdir(DIR *dirp, long int loc);
+ long int telldir(DIR *dirp);
+ +
+ int scandir(const char *dirp, struct dirent ***namelist, +int closedir(DIR *dirp);
+ int (*filter)(const struct dirent *), +DIR *opendir(const char *dirname);
+ int (*compar)(const struct dirent **, const struct dirent **)); +struct dirent *readdir(DIR *dirp);
+int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result);
+void rewinddir(DIR *dirp);
+void seekdir(DIR *dirp, long int loc);
+long int telldir(DIR *dirp);
+ +
+ int alphasort(const struct dirent **a, const struct dirent **b); +int scandir(const char *dirp, struct dirent ***namelist,
+ int (*filter)(const struct dirent *),
+ int (*compar)(const struct dirent **, const struct dirent **));
+
+int alphasort(const struct dirent **a, const struct dirent **b);
+ +
#ifdef __cplusplus #ifdef __cplusplus
} }
@@ -7497,10 +7504,10 @@ index 2900b332f..6efb54eb3 100644
#ifdef __rtems__ #ifdef __rtems__
diff --git a/newlib/libc/include/sys/iosupport.h b/newlib/libc/include/sys/iosupport.h diff --git a/newlib/libc/include/sys/iosupport.h b/newlib/libc/include/sys/iosupport.h
new file mode 100644 new file mode 100644
index 000000000..ee14d2610 index 000000000..e177ccf8e
--- /dev/null --- /dev/null
+++ b/newlib/libc/include/sys/iosupport.h +++ b/newlib/libc/include/sys/iosupport.h
@@ -0,0 +1,112 @@ @@ -0,0 +1,106 @@
+//--------------------------------------------------------------------------------- +//---------------------------------------------------------------------------------
+#ifndef __iosupp_h__ +#ifndef __iosupp_h__
+#define __iosupp_h__ +#define __iosupp_h__
@@ -7514,6 +7521,7 @@ index 000000000..ee14d2610
+#include <sys/stat.h> +#include <sys/stat.h>
+#include <sys/statvfs.h> +#include <sys/statvfs.h>
+#include <time.h> +#include <time.h>
+#include <dirent.h>
+ +
+enum { +enum {
+ STD_IN, + STD_IN,
@@ -7522,19 +7530,12 @@ index 000000000..ee14d2610
+ STD_MAX = 16 + STD_MAX = 16
+}; +};
+ +
+
+typedef struct { +typedef struct {
+ unsigned int device; + unsigned int device;
+ unsigned int refcount; + unsigned int refcount;
+ void *fileStruct; + void *fileStruct;
+} __handle; +} __handle;
+ +
+/* Directory iterator for mantaining state between dir* calls */
+typedef struct {
+ int device;
+ void *dirStruct;
+} DIR_ITER;
+
+typedef struct { +typedef struct {
+ const char *name; + const char *name;
+ size_t structSize; + size_t structSize;

View File

@@ -33,8 +33,8 @@ include $(DEVKITPRO)/devkitA64/base_tools
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
define bin2o define bin2o
bin2s $< | $(AS) -o $(@) bin2s $< | $(AS) -o $(@)
echo "extern const u8" `(echo $(<F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"_end[];" > `(echo $(<F) | tr . _)`.h echo "extern const u8" `(echo $(<F) | sed -e 's/^\([0-9]\)/_\1/' -e 's/[^A-Za-z0-9_]/_/g')`"_end[];" > `(echo $(<F) | tr . _)`.h
echo "extern const u8" `(echo $(<F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"[];" >> `(echo $(<F) | tr . _)`.h echo "extern const u8" `(echo $(<F) | sed -e 's/^\([0-9]\)/_\1/' -e 's/[^A-Za-z0-9_]/_/g')`"[];" >> `(echo $(<F) | tr . _)`.h
echo "extern const u32" `(echo $(<F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`_size";" >> `(echo $(<F) | tr . _)`.h echo "extern const u32" `(echo $(<F) | sed -e 's/^\([0-9]\)/_\1/' -e 's/[^A-Za-z0-9_]/_/g')`_size";" >> `(echo $(<F) | tr . _)`.h
endef endef

View File

@@ -64,7 +64,7 @@ then
--prefix=$prefix \ --prefix=$prefix \
--enable-lto $plugin_ld\ --enable-lto $plugin_ld\
--with-system-zlib \ --with-system-zlib \
--with-bugurl="https://github.com/devkitPro/buildscripts/issues" --with-pkgversion="devkitA64 release 10" \ --with-bugurl="https://github.com/devkitPro/buildscripts/issues" --with-pkgversion="devkitA64 release 12" \
$CROSS_PARAMS \ $CROSS_PARAMS \
$CROSS_GCC_PARAMS \ $CROSS_GCC_PARAMS \
|| { echo "Error configuring gcc"; exit 1; } || { echo "Error configuring gcc"; exit 1; }

View File

@@ -1,3 +1,8 @@
/*--------------------------------------------------------------------------------
This Source Code Form is subject to the terms of the Mozilla Public License,
v. 2.0. If a copy of the MPL was not distributed with this file, You can
obtain one at https://mozilla.org/MPL/2.0/.
--------------------------------------------------------------------------------*/
OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
OUTPUT_ARCH(arm) OUTPUT_ARCH(arm)
ENTRY(_start) ENTRY(_start)

View File

@@ -1,3 +1,9 @@
/*--------------------------------------------------------------------------------
This Source Code Form is subject to the terms of the Mozilla Public License,
v. 2.0. If a copy of the MPL was not distributed with this file, You can
obtain one at https://mozilla.org/MPL/2.0/.
--------------------------------------------------------------------------------*/
@--------------------------------------------------------------------------------- @---------------------------------------------------------------------------------
@ 3DS processor selection @ 3DS processor selection
@--------------------------------------------------------------------------------- @---------------------------------------------------------------------------------

View File

@@ -1,3 +1,8 @@
/*--------------------------------------------------------------------------------
This Source Code Form is subject to the terms of the Mozilla Public License,
v. 2.0. If a copy of the MPL was not distributed with this file, You can
obtain one at https://mozilla.org/MPL/2.0/.
--------------------------------------------------------------------------------*/
OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
OUTPUT_ARCH(arm) OUTPUT_ARCH(arm)
ENTRY(_start) ENTRY(_start)

View File

@@ -1,3 +1,8 @@
/*--------------------------------------------------------------------------------
This Source Code Form is subject to the terms of the Mozilla Public License,
v. 2.0. If a copy of the MPL was not distributed with this file, You can
obtain one at https://mozilla.org/MPL/2.0/.
--------------------------------------------------------------------------------*/
OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
OUTPUT_ARCH(arm) OUTPUT_ARCH(arm)
ENTRY(_start) ENTRY(_start)

View File

@@ -1,3 +1,9 @@
/*--------------------------------------------------------------------------------
This Source Code Form is subject to the terms of the Mozilla Public License,
v. 2.0. If a copy of the MPL was not distributed with this file, You can
obtain one at https://mozilla.org/MPL/2.0/.
--------------------------------------------------------------------------------*/
@--------------------------------------------------------------------------------- @---------------------------------------------------------------------------------
.section ".crt0","ax" .section ".crt0","ax"
.global _start .global _start

View File

@@ -1,3 +1,8 @@
/*--------------------------------------------------------------------------------
This Source Code Form is subject to the terms of the Mozilla Public License,
v. 2.0. If a copy of the MPL was not distributed with this file, You can
obtain one at https://mozilla.org/MPL/2.0/.
--------------------------------------------------------------------------------*/
OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
OUTPUT_ARCH(arm) OUTPUT_ARCH(arm)
ENTRY(_start) ENTRY(_start)

View File

@@ -1,3 +1,8 @@
/*--------------------------------------------------------------------------------
This Source Code Form is subject to the terms of the Mozilla Public License,
v. 2.0. If a copy of the MPL was not distributed with this file, You can
obtain one at https://mozilla.org/MPL/2.0/.
--------------------------------------------------------------------------------*/
OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
OUTPUT_ARCH(arm) OUTPUT_ARCH(arm)
ENTRY(_start) ENTRY(_start)

View File

@@ -1,3 +1,8 @@
/*--------------------------------------------------------------------------------
This Source Code Form is subject to the terms of the Mozilla Public License,
v. 2.0. If a copy of the MPL was not distributed with this file, You can
obtain one at https://mozilla.org/MPL/2.0/.
--------------------------------------------------------------------------------*/
OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
OUTPUT_ARCH(arm) OUTPUT_ARCH(arm)
ENTRY(_start) ENTRY(_start)

View File

@@ -1,3 +1,8 @@
/*--------------------------------------------------------------------------------
This Source Code Form is subject to the terms of the Mozilla Public License,
v. 2.0. If a copy of the MPL was not distributed with this file, You can
obtain one at https://mozilla.org/MPL/2.0/.
--------------------------------------------------------------------------------*/
MEMORY { MEMORY {
ewram : ORIGIN = 0x02000000, LENGTH = 4M - 512k ewram : ORIGIN = 0x02000000, LENGTH = 4M - 512k
dtcm : ORIGIN = 0x0b000000, LENGTH = 16K dtcm : ORIGIN = 0x0b000000, LENGTH = 16K

View File

@@ -1,3 +1,9 @@
/*--------------------------------------------------------------------------------
This Source Code Form is subject to the terms of the Mozilla Public License,
v. 2.0. If a copy of the MPL was not distributed with this file, You can
obtain one at https://mozilla.org/MPL/2.0/.
--------------------------------------------------------------------------------*/
@--------------------------------------------------------------------------------- @---------------------------------------------------------------------------------
@ DS processor selection @ DS processor selection
@--------------------------------------------------------------------------------- @---------------------------------------------------------------------------------

View File

@@ -1,3 +1,8 @@
/*--------------------------------------------------------------------------------
This Source Code Form is subject to the terms of the Mozilla Public License,
v. 2.0. If a copy of the MPL was not distributed with this file, You can
obtain one at https://mozilla.org/MPL/2.0/.
--------------------------------------------------------------------------------*/
OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
OUTPUT_ARCH(arm) OUTPUT_ARCH(arm)
ENTRY(_start) ENTRY(_start)

View File

@@ -1,3 +1,9 @@
/*--------------------------------------------------------------------------------
This Source Code Form is subject to the terms of the Mozilla Public License,
v. 2.0. If a copy of the MPL was not distributed with this file, You can
obtain one at https://mozilla.org/MPL/2.0/.
--------------------------------------------------------------------------------*/
@--------------------------------------------------------------------------------- @---------------------------------------------------------------------------------
.section ".crt0","ax" .section ".crt0","ax"
.global _start .global _start

View File

@@ -1,3 +1,8 @@
/*--------------------------------------------------------------------------------
This Source Code Form is subject to the terms of the Mozilla Public License,
v. 2.0. If a copy of the MPL was not distributed with this file, You can
obtain one at https://mozilla.org/MPL/2.0/.
--------------------------------------------------------------------------------*/
MEMORY { MEMORY {
ewram : ORIGIN = 0x02000000, LENGTH = 15M - 512k ewram : ORIGIN = 0x02000000, LENGTH = 15M - 512k
dtcm : ORIGIN = 0x0b000000, LENGTH = 16K dtcm : ORIGIN = 0x0b000000, LENGTH = 16K

View File

@@ -3,6 +3,10 @@
@--------------------------------------------------------------------------------- @---------------------------------------------------------------------------------
@ author : tim schuerewegen @ author : tim schuerewegen
@ version : 1.0 @ version : 1.0
@---------------------------------------------------------------------------------
@ This Source Code Form is subject to the terms of the Mozilla Public License,
@ v. 2.0. If a copy of the MPL was not distributed with this file, You can
@ obtain one at https://mozilla.org/MPL/2.0/.
@--------------------------------------------------------------------------------- @---------------------------------------------------------------------------------
.section ".crt0","ax" .section ".crt0","ax"
.global _start .global _start

View File

@@ -1,3 +1,9 @@
/*--------------------------------------------------------------------------------
This Source Code Form is subject to the terms of the Mozilla Public License,
v. 2.0. If a copy of the MPL was not distributed with this file, You can
obtain one at https://mozilla.org/MPL/2.0/.
--------------------------------------------------------------------------------*/
.section ".crt0","ax" .section ".crt0","ax"
.global _start .global _start
.align .align

View File

@@ -1,3 +1,9 @@
/*--------------------------------------------------------------------------------
This Source Code Form is subject to the terms of the Mozilla Public License,
v. 2.0. If a copy of the MPL was not distributed with this file, You can
obtain one at https://mozilla.org/MPL/2.0/.
--------------------------------------------------------------------------------*/
.section ".crt0","ax" .section ".crt0","ax"
.code 32 .code 32
.align .align

View File

@@ -1,7 +1,8 @@
diff -NBaur gcc-8.1.0/gcc/config/arm/arm-cpus.in gcc-8.1.0-arm/gcc/config/arm/arm-cpus.in diff --git a/gcc/config/arm/arm-cpus.in b/gcc/config/arm/arm-cpus.in
--- gcc-8.1.0/gcc/config/arm/arm-cpus.in 2018-01-11 15:21:26.000000000 +0000 index 545321b0bbe..63ed77af8fd 100644
+++ gcc-8.1.0-arm/gcc/config/arm/arm-cpus.in 2018-05-11 01:05:33.648236777 +0000 --- a/gcc/config/arm/arm-cpus.in
@@ -393,7 +393,7 @@ +++ b/gcc/config/arm/arm-cpus.in
@@ -395,7 +395,7 @@ begin arch armv6k
tune for mpcore tune for mpcore
tune flags CO_PROC tune flags CO_PROC
base 6K base 6K
@@ -10,9 +11,10 @@ diff -NBaur gcc-8.1.0/gcc/config/arm/arm-cpus.in gcc-8.1.0-arm/gcc/config/arm/ar
option fp add VFPv2 FP_DBL option fp add VFPv2 FP_DBL
optalias vfpv2 fp optalias vfpv2 fp
option nofp remove ALL_FP option nofp remove ALL_FP
diff -NBaur gcc-8.1.0/gcc/config/arm/t-arm-elf gcc-8.1.0-arm/gcc/config/arm/t-arm-elf diff --git a/gcc/config/arm/t-arm-elf b/gcc/config/arm/t-arm-elf
--- gcc-8.1.0/gcc/config/arm/t-arm-elf 2018-01-11 15:21:26.000000000 +0000 index 9ec5bf065ac..9ab3ffb109d 100644
+++ gcc-8.1.0-arm/gcc/config/arm/t-arm-elf 2018-05-10 23:15:13.124566279 +0000 --- a/gcc/config/arm/t-arm-elf
+++ b/gcc/config/arm/t-arm-elf
@@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
-# Copyright (C) 1998-2018 Free Software Foundation, Inc. -# Copyright (C) 1998-2018 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 Free Software Foundation, Inc. +# Copyright (C) 1998-2017 Free Software Foundation, Inc.
@@ -105,25 +107,22 @@ diff -NBaur gcc-8.1.0/gcc/config/arm/t-arm-elf gcc-8.1.0-arm/gcc/config/arm/t-ar
- -
-MULTILIB_MATCHES += $(foreach FPARCH, $(v7a_fps), \ -MULTILIB_MATCHES += $(foreach FPARCH, $(v7a_fps), \
- march?armv7+fp=march?armv7-a+$(FPARCH)) - march?armv7+fp=march?armv7-a+$(FPARCH))
-
-MULTILIB_MATCHES += $(foreach FPARCH, $(v7ve_fps), \ -MULTILIB_MATCHES += $(foreach FPARCH, $(v7ve_fps), \
- march?armv7+fp=march?armv7ve+$(FPARCH)) - march?armv7+fp=march?armv7ve+$(FPARCH))
+MULTILIB_REQUIRED = mthumb mbig-endian mthumb/mbig-endian march=armv6k/mfloat-abi=hard -
-MULTILIB_MATCHES += $(foreach ARCH, $(all_v7_a_r), \ -MULTILIB_MATCHES += $(foreach ARCH, $(all_v7_a_r), \
- march?armv7+fp=march?$(ARCH) \ - march?armv7+fp=march?$(ARCH) \
- march?armv7+fp=march?$(ARCH)+fp) - march?armv7+fp=march?$(ARCH)+fp)
-
-MULTILIB_MATCHES += $(foreach ARCH, $(all_v8_archs), \ -MULTILIB_MATCHES += $(foreach ARCH, $(all_v8_archs), \
- march?armv7+fp=march?$(ARCH) \ - march?armv7+fp=march?$(ARCH) \
- $(foreach FPARCH, $(v8_fps), \ - $(foreach FPARCH, $(v8_fps), \
- march?armv7+fp=march?$(ARCH)+$(FPARCH))) - march?armv7+fp=march?$(ARCH)+$(FPARCH)))
+MULTILIB_MATCHES += march?armv6k=mtune?mpcore -
+MULTILIB_MATCHES += march?armv6k=mcpu?mpcore
-MULTILIB_MATCHES += $(foreach ARCH, armv7e-m armv8-m.mainline, \ -MULTILIB_MATCHES += $(foreach ARCH, armv7e-m armv8-m.mainline, \
- march?armv7+fp=march?$(ARCH)+fp.dp) - march?armv7+fp=march?$(ARCH)+fp.dp)
-
-# PART 4 - Reuse rules -# PART 4 - Reuse rules
-MULTILIB_REUSE += mthumb=mthumb/mfpu.auto -MULTILIB_REUSE += mthumb=mthumb/mfpu.auto
@@ -135,6 +134,14 @@ diff -NBaur gcc-8.1.0/gcc/config/arm/t-arm-elf gcc-8.1.0-arm/gcc/config/arm/t-ar
-MULTILIB_REUSE += mthumb/mfpu.auto/march.armv7+fp/mfloat-abi.hard=mthumb/march.armv7+fp/mfloat-abi.hard -MULTILIB_REUSE += mthumb/mfpu.auto/march.armv7+fp/mfloat-abi.hard=mthumb/march.armv7+fp/mfloat-abi.hard
-MULTILIB_REUSE += mthumb/mfpu.auto/march.armv7+fp/mfloat-abi.hard=mfpu.auto/march.armv7+fp/mfloat-abi.hard -MULTILIB_REUSE += mthumb/mfpu.auto/march.armv7+fp/mfloat-abi.hard=mfpu.auto/march.armv7+fp/mfloat-abi.hard
-MULTILIB_REUSE += mthumb/mfpu.auto/march.armv7+fp/mfloat-abi.hard=march.armv7+fp/mfloat-abi.hard -MULTILIB_REUSE += mthumb/mfpu.auto/march.armv7+fp/mfloat-abi.hard=march.armv7+fp/mfloat-abi.hard
+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_OPTIONS += mcpu=fa526/mcpu=fa626/mcpu=fa606te/mcpu=fa626te/mcpu=fmp626/mcpu=fa726te
+#MULTILIB_DIRNAMES += fa526 fa626 fa606te fa626te fmp626 fa726te +#MULTILIB_DIRNAMES += fa526 fa626 fa606te fa626te fmp626 fa726te
+#MULTILIB_EXCEPTIONS += *mthumb*/*mcpu=fa526 *mthumb*/*mcpu=fa626 +#MULTILIB_EXCEPTIONS += *mthumb*/*mcpu=fa526 *mthumb*/*mcpu=fa626
@@ -202,9 +209,10 @@ diff -NBaur gcc-8.1.0/gcc/config/arm/t-arm-elf gcc-8.1.0-arm/gcc/config/arm/t-ar
+# MULTILIB_MATCHES += mcpu?arm7=mcpu?arm600 +# MULTILIB_MATCHES += mcpu?arm7=mcpu?arm600
+# MULTILIB_MATCHES += mcpu?arm7=mcpu?arm610 +# MULTILIB_MATCHES += mcpu?arm7=mcpu?arm610
+# MULTILIB_MATCHES += mcpu?arm7=mcpu?arm620 +# MULTILIB_MATCHES += mcpu?arm7=mcpu?arm620
diff -NBaur gcc-8.1.0/gcc/config/arm/unknown-elf.h gcc-8.1.0-arm/gcc/config/arm/unknown-elf.h diff --git a/gcc/config/arm/unknown-elf.h b/gcc/config/arm/unknown-elf.h
--- gcc-8.1.0/gcc/config/arm/unknown-elf.h 2018-01-03 10:03:58.000000000 +0000 index 12dd0931b08..59584fe64bc 100644
+++ gcc-8.1.0-arm/gcc/config/arm/unknown-elf.h 2018-05-10 23:01:02.432676190 +0000 --- a/gcc/config/arm/unknown-elf.h
+++ b/gcc/config/arm/unknown-elf.h
@@ -29,7 +29,7 @@ @@ -29,7 +29,7 @@
#endif #endif
@@ -225,10 +233,11 @@ diff -NBaur gcc-8.1.0/gcc/config/arm/unknown-elf.h gcc-8.1.0-arm/gcc/config/arm/
+#undef NO_IMPLICIT_EXTERN_C +#undef NO_IMPLICIT_EXTERN_C
+#define NO_IMPLICIT_EXTERN_C +#define NO_IMPLICIT_EXTERN_C
+ +
diff -NBaur gcc-8.1.0/gcc/gcc.c gcc-8.1.0-arm/gcc/gcc.c diff --git a/gcc/gcc.c b/gcc/gcc.c
--- gcc-8.1.0/gcc/gcc.c 2018-02-09 06:44:06.000000000 +0000 index a716f708259..6a11011dba7 100644
+++ gcc-8.1.0-arm/gcc/gcc.c 2018-05-10 23:01:02.440676328 +0000 --- a/gcc/gcc.c
@@ -786,6 +786,11 @@ +++ b/gcc/gcc.c
@@ -786,6 +786,11 @@ proper position among the other output files. */
#endif #endif
#endif #endif
@@ -240,7 +249,7 @@ diff -NBaur gcc-8.1.0/gcc/gcc.c gcc-8.1.0-arm/gcc/gcc.c
/* config.h can define STARTFILE_SPEC to override the default crt0 files. */ /* config.h can define STARTFILE_SPEC to override the default crt0 files. */
#ifndef STARTFILE_SPEC #ifndef STARTFILE_SPEC
#define STARTFILE_SPEC \ #define STARTFILE_SPEC \
@@ -1081,6 +1086,7 @@ @@ -1081,6 +1086,7 @@ static const char *link_spec = LINK_SPEC;
static const char *lib_spec = LIB_SPEC; static const char *lib_spec = LIB_SPEC;
static const char *link_gomp_spec = ""; static const char *link_gomp_spec = "";
static const char *libgcc_spec = LIBGCC_SPEC; static const char *libgcc_spec = LIBGCC_SPEC;
@@ -248,7 +257,7 @@ diff -NBaur gcc-8.1.0/gcc/gcc.c gcc-8.1.0-arm/gcc/gcc.c
static const char *endfile_spec = ENDFILE_SPEC; static const char *endfile_spec = ENDFILE_SPEC;
static const char *startfile_spec = STARTFILE_SPEC; static const char *startfile_spec = STARTFILE_SPEC;
static const char *linker_name_spec = LINKER_NAME; static const char *linker_name_spec = LINKER_NAME;
@@ -1577,6 +1583,7 @@ @@ -1577,6 +1583,7 @@ static struct spec_list static_specs[] =
INIT_STATIC_SPEC ("lib", &lib_spec), INIT_STATIC_SPEC ("lib", &lib_spec),
INIT_STATIC_SPEC ("link_gomp", &link_gomp_spec), INIT_STATIC_SPEC ("link_gomp", &link_gomp_spec),
INIT_STATIC_SPEC ("libgcc", &libgcc_spec), INIT_STATIC_SPEC ("libgcc", &libgcc_spec),
@@ -256,19 +265,21 @@ diff -NBaur gcc-8.1.0/gcc/gcc.c gcc-8.1.0-arm/gcc/gcc.c
INIT_STATIC_SPEC ("startfile", &startfile_spec), INIT_STATIC_SPEC ("startfile", &startfile_spec),
INIT_STATIC_SPEC ("cross_compile", &cross_compile), INIT_STATIC_SPEC ("cross_compile", &cross_compile),
INIT_STATIC_SPEC ("version", &compiler_version), INIT_STATIC_SPEC ("version", &compiler_version),
diff -NBaur gcc-8.1.0/libgcc/config/arm/t-bpabi gcc-8.1.0-arm/libgcc/config/arm/t-bpabi diff --git a/libgcc/config/arm/t-bpabi b/libgcc/config/arm/t-bpabi
--- gcc-8.1.0/libgcc/config/arm/t-bpabi 2012-08-17 15:06:06.000000000 +0000 index dddddc7c444..c2502597953 100644
+++ gcc-8.1.0-arm/libgcc/config/arm/t-bpabi 2018-05-10 23:01:02.440676328 +0000 --- a/libgcc/config/arm/t-bpabi
@@ -17,4 +17,4 @@ +++ b/libgcc/config/arm/t-bpabi
@@ -17,4 +17,4 @@ SHLIB_MAPFILES += $(srcdir)/config/arm/libgcc-bpabi.ver
# On ARM, specifying -fnon-call-exceptions will needlessly pull in # On ARM, specifying -fnon-call-exceptions will needlessly pull in
# the unwinder in simple programs which use 64-bit division. Omitting # the unwinder in simple programs which use 64-bit division. Omitting
# the option is safe. # the option is safe.
-LIB2_DIVMOD_EXCEPTION_FLAGS := -fexceptions -LIB2_DIVMOD_EXCEPTION_FLAGS := -fexceptions
+LIB2_DIVMOD_EXCEPTION_FLAGS := -fno-exceptions +LIB2_DIVMOD_EXCEPTION_FLAGS := -fno-exceptions
diff -NBaur gcc-8.1.0/libgcc/crtstuff.c gcc-8.1.0-arm/libgcc/crtstuff.c diff --git a/libgcc/crtstuff.c b/libgcc/crtstuff.c
--- gcc-8.1.0/libgcc/crtstuff.c 2018-01-03 10:03:58.000000000 +0000 index 5e894455e16..f81c9c6a64c 100644
+++ gcc-8.1.0-arm/libgcc/crtstuff.c 2018-05-10 23:01:02.440676328 +0000 --- a/libgcc/crtstuff.c
@@ -47,7 +47,7 @@ +++ b/libgcc/crtstuff.c
@@ -47,7 +47,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
/* Target machine header files require this define. */ /* Target machine header files require this define. */
#define IN_LIBGCC2 #define IN_LIBGCC2
@@ -277,15 +288,3 @@ diff -NBaur gcc-8.1.0/libgcc/crtstuff.c gcc-8.1.0-arm/libgcc/crtstuff.c
/* FIXME: Including auto-host is incorrect, but until we have /* FIXME: Including auto-host is incorrect, but until we have
identified the set of defines that need to go into auto-target.h, identified the set of defines that need to go into auto-target.h,
this will have to do. */ this will have to do. */
diff -NBaur gcc-8.1.0/libgcc/Makefile.in gcc-8.1.0-arm/libgcc/Makefile.in
--- gcc-8.1.0/libgcc/Makefile.in 2018-01-03 10:03:58.000000000 +0000
+++ gcc-8.1.0-arm/libgcc/Makefile.in 2018-05-10 23:01:02.440676328 +0000
@@ -847,7 +847,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)

View File

@@ -1,29 +1,7 @@
diff --git a/gdb/Makefile.in b/gdb/Makefile.in diff -NBaur gdb-8.2/gdb/arm-3ds-tdep.c gdb-8.2-3ds/gdb/arm-3ds-tdep.c
index 1d2dbaf3f7..2d24f09c1b 100644 --- gdb-8.2/gdb/arm-3ds-tdep.c 1970-01-01 01:00:00.000000000 +0100
--- a/gdb/Makefile.in +++ gdb-8.2-3ds/gdb/arm-3ds-tdep.c 2018-11-15 22:55:21.916968907 +0000
+++ b/gdb/Makefile.in @@ -0,0 +1,157 @@
@@ -779,6 +779,7 @@ ALL_64_TARGET_OBS = \
ALL_TARGET_OBS = \
arc-tdep.o \
arm.o \
+ arm-3ds-tdep.o \
arm-bsd-tdep.o \
arm-get-next-pcs.o \
arm-linux.o \
@@ -2487,6 +2488,7 @@ ALLDEPFILES = \
amd64-tdep.c \
arc-tdep.c \
arm.c \
+ arm-3ds-tdep.c \
arm-bsd-tdep.c \
arm-get-next-pcs.c \
arm-linux.c \
diff --git a/gdb/arm-3ds-tdep.c b/gdb/arm-3ds-tdep.c
new file mode 100644
index 0000000000..ad014e28db
--- /dev/null
+++ b/gdb/arm-3ds-tdep.c
@@ -0,0 +1,197 @@
+/* Target-dependent code for 3DS. */ +/* Target-dependent code for 3DS. */
+ +
+/* This uses code from GDB, which license is: */ +/* This uses code from GDB, which license is: */
@@ -95,48 +73,11 @@ index 0000000000..ad014e28db
+ return next_pc; + return next_pc;
+} +}
+ +
+static VEC (CORE_ADDR) *
+arm_3ds_software_single_step (struct regcache *regcache)
+{
+ struct gdbarch *gdbarch = get_regcache_arch (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 NULL;
+
+ 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++)
+ {
+ pc = gdbarch_addr_bits_remove (gdbarch, pc);
+ VEC_replace (CORE_ADDR, next_pcs, i, pc);
+ }
+
+ discard_cleanups (old_chain);
+
+ return next_pcs;
+}
+
+static LONGEST +static LONGEST
+arm_3ds_get_syscall_number (struct gdbarch *gdbarch, +arm_3ds_get_syscall_number (struct gdbarch *gdbarch,
+ ptid_t ptid) + thread_info *thread)
+{ +{
+ struct regcache *regs = get_thread_regcache (ptid); + struct regcache *regs = get_thread_regcache (thread);
+ +
+ ULONGEST pc; + ULONGEST pc;
+ ULONGEST cpsr; + ULONGEST cpsr;
@@ -205,42 +146,35 @@ index 0000000000..ad014e28db
+ tdep->fp_model = ARM_FLOAT_VFP; + tdep->fp_model = ARM_FLOAT_VFP;
+ +
+ /* Single stepping. */ + /* Single stepping. */
+ set_gdbarch_software_single_step (gdbarch, arm_3ds_software_single_step); + set_gdbarch_software_single_step (gdbarch, arm_software_single_step);
+ +
+ /* `catch syscall' */ + /* `catch syscall' */
+ set_xml_syscall_file_name (gdbarch, "syscalls/arm-3ds.xml"); + set_xml_syscall_file_name (gdbarch, "syscalls/arm-3ds.xml");
+ set_gdbarch_get_syscall_number (gdbarch, arm_3ds_get_syscall_number); + 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 +void
+_initialize_arm_3ds_tdep (void) +_initialize_arm_3ds_tdep (void)
+{ +{
+ gdbarch_register_osabi (bfd_arch_arm, 0, GDB_OSABI_3DS, + gdbarch_register_osabi (bfd_arch_arm, 0, GDB_OSABI_3DS,
+ arm_3ds_init_abi); + arm_3ds_init_abi);
+} +}
diff --git a/gdb/configure.tgt b/gdb/configure.tgt diff -NBaur gdb-8.2/gdb/configure.tgt gdb-8.2-3ds/gdb/configure.tgt
index fdcb7b1d69..d8fd1622b8 100644 --- gdb-8.2/gdb/configure.tgt 2018-09-05 08:44:28.000000000 +0100
--- a/gdb/configure.tgt +++ gdb-8.2-3ds/gdb/configure.tgt 2018-11-15 22:47:17.337689978 +0000
+++ b/gdb/configure.tgt @@ -61,7 +61,7 @@
@@ -119,8 +119,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 arm*-*-*)
index 304d4b05c0..2cf8986d3a 100644 - cpu_obs="arch/arm.o arch/arm-get-next-pcs.o arm-tdep.o";;
--- a/gdb/data-directory/Makefile.in + cpu_obs="arch/arm.o arch/arm-get-next-pcs.o arm-tdep.o arm-3ds-tdep.o";;
+++ b/gdb/data-directory/Makefile.in
@@ -63,7 +63,7 @@ GEN_SYSCALLS_FILES = \ hppa*-*-*)
# Target: HP PA-RISC
diff -NBaur gdb-8.2/gdb/data-directory/Makefile.in gdb-8.2-3ds/gdb/data-directory/Makefile.in
--- gdb-8.2/gdb/data-directory/Makefile.in 2018-01-05 04:07:23.000000000 +0000
+++ gdb-8.2-3ds/gdb/data-directory/Makefile.in 2018-11-15 22:42:36.840956065 +0000
@@ -63,7 +63,7 @@
sparc-linux.xml \ sparc-linux.xml \
sparc64-linux.xml sparc64-linux.xml
@@ -249,11 +183,10 @@ index 304d4b05c0..2cf8986d3a 100644
PYTHON_DIR = python PYTHON_DIR = python
PYTHON_INSTALL_DIR = $(DESTDIR)$(GDB_DATADIR)/$(PYTHON_DIR) PYTHON_INSTALL_DIR = $(DESTDIR)$(GDB_DATADIR)/$(PYTHON_DIR)
diff --git a/gdb/defs.h b/gdb/defs.h diff -NBaur gdb-8.2/gdb/defs.h gdb-8.2-3ds/gdb/defs.h
index a0b586f401..a1508fd5b3 100644 --- gdb-8.2/gdb/defs.h 2018-09-05 08:27:32.000000000 +0100
--- a/gdb/defs.h +++ gdb-8.2-3ds/gdb/defs.h 2018-11-15 22:42:36.840956065 +0000
+++ b/gdb/defs.h @@ -495,6 +495,7 @@
@@ -604,6 +604,7 @@ enum gdb_osabi
GDB_OSABI_LYNXOS178, GDB_OSABI_LYNXOS178,
GDB_OSABI_NEWLIB, GDB_OSABI_NEWLIB,
GDB_OSABI_SDE, GDB_OSABI_SDE,
@@ -261,11 +194,29 @@ index a0b586f401..a1508fd5b3 100644
GDB_OSABI_INVALID /* keep this last */ GDB_OSABI_INVALID /* keep this last */
}; };
diff --git a/gdb/osabi.c b/gdb/osabi.c diff -NBaur gdb-8.2/gdb/Makefile.in gdb-8.2-3ds/gdb/Makefile.in
index 84fa9c0273..c1c4bb1672 100644 --- gdb-8.2/gdb/Makefile.in 2018-09-05 08:44:28.000000000 +0100
--- a/gdb/osabi.c +++ gdb-8.2-3ds/gdb/Makefile.in 2018-11-15 22:45:01.628931262 +0000
+++ b/gdb/osabi.c @@ -684,6 +684,7 @@
@@ -79,6 +79,7 @@ static const struct osabi_names gdb_osabi_names[] = arch/arm-linux.o \
arch/i386.o \
arch/ppc-linux-common.o \
+ arm-3ds-tdep.o \
arm-bsd-tdep.o \
arm-fbsd-tdep.o \
arm-linux-tdep.o \
@@ -2213,6 +2214,7 @@
amd64-tdep.c \
arc-tdep.c \
arm.c \
+ arm-3ds-tdep.c \
arm-bsd-tdep.c \
arm-fbsd-nat.c \
arm-fbsd-tdep.c \
diff -NBaur gdb-8.2/gdb/osabi.c gdb-8.2-3ds/gdb/osabi.c
--- gdb-8.2/gdb/osabi.c 2018-09-05 08:27:13.000000000 +0100
+++ gdb-8.2-3ds/gdb/osabi.c 2018-11-15 22:42:36.840956065 +0000
@@ -80,6 +80,7 @@
{ "LynxOS178", NULL }, { "LynxOS178", NULL },
{ "Newlib", NULL }, { "Newlib", NULL },
{ "SDE", NULL }, { "SDE", NULL },
@@ -273,11 +224,9 @@ index 84fa9c0273..c1c4bb1672 100644
{ "<invalid>", NULL } { "<invalid>", NULL }
}; };
diff --git a/gdb/syscalls/arm-3ds.xml b/gdb/syscalls/arm-3ds.xml diff -NBaur gdb-8.2/gdb/syscalls/arm-3ds.xml gdb-8.2-3ds/gdb/syscalls/arm-3ds.xml
new file mode 100644 --- gdb-8.2/gdb/syscalls/arm-3ds.xml 1970-01-01 01:00:00.000000000 +0100
index 0000000000..48780b7bd5 +++ gdb-8.2-3ds/gdb/syscalls/arm-3ds.xml 2018-11-15 22:42:36.840956065 +0000
--- /dev/null
+++ b/gdb/syscalls/arm-3ds.xml
@@ -0,0 +1,159 @@ @@ -0,0 +1,159 @@
+<?xml version="1.0"?> +<?xml version="1.0"?>
+<!DOCTYPE syscalls_info SYSTEM "gdb-syscalls.dtd"> +<!DOCTYPE syscalls_info SYSTEM "gdb-syscalls.dtd">
@@ -438,4 +387,3 @@ index 0000000000..48780b7bd5
+ <syscall name="TranslateHandle" number="178" groups="custom,synchronization,ipc,thread,process,debug"/> + <syscall name="TranslateHandle" number="178" groups="custom,synchronization,ipc,thread,process,debug"/>
+ +
+</syscalls_info> +</syscalls_info>

View File

@@ -7531,7 +7531,7 @@ index 2900b332f..6efb54eb3 100644
#ifdef __rtems__ #ifdef __rtems__
diff --git a/newlib/libc/include/sys/iosupport.h b/newlib/libc/include/sys/iosupport.h diff --git a/newlib/libc/include/sys/iosupport.h b/newlib/libc/include/sys/iosupport.h
new file mode 100644 new file mode 100644
index 000000000..ee14d2610 index 000000000..dfed4107e
--- /dev/null --- /dev/null
+++ b/newlib/libc/include/sys/iosupport.h +++ b/newlib/libc/include/sys/iosupport.h
@@ -0,0 +1,112 @@ @@ -0,0 +1,112 @@
@@ -7553,7 +7553,7 @@ index 000000000..ee14d2610
+ STD_IN, + STD_IN,
+ STD_OUT, + STD_OUT,
+ STD_ERR, + STD_ERR,
+ STD_MAX = 16 + STD_MAX = 35
+}; +};
+ +
+ +

View File

@@ -104,8 +104,8 @@ export PORTLIBS_PATH := $(DEVKITPRO)/portlibs
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
define bin2o define bin2o
bin2s $< | $(AS) -o $(@) bin2s $< | $(AS) -o $(@)
echo "extern const u8" `(echo $(<F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"_end[];" > `(echo $(<F) | tr . _)`.h echo "extern const u8" `(echo $(<F) | sed -e 's/^\([0-9]\)/_\1/' -e 's/[^A-Za-z0-9_]/_/g')`"_end[];" > `(echo $(<F) | tr . _)`.h
echo "extern const u8" `(echo $(<F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"[];" >> `(echo $(<F) | tr . _)`.h echo "extern const u8" `(echo $(<F) | sed -e 's/^\([0-9]\)/_\1/' -e 's/[^A-Za-z0-9_]/_/g')`"[];" >> `(echo $(<F) | tr . _)`.h
echo "extern const u32" `(echo $(<F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`_size";" >> `(echo $(<F) | tr . _)`.h echo "extern const u32" `(echo $(<F) | sed -e 's/^\([0-9]\)/_\1/' -e 's/[^A-Za-z0-9_]/_/g')`_size";" >> `(echo $(<F) | tr . _)`.h
endef endef

View File

@@ -12,7 +12,7 @@ if [ ! -f configured-binutils ]
then then
CPPFLAGS="$cppflags $CPPFLAGS" LDFLAGS=$ldflags ../../binutils-$BINUTILS_VER/configure \ CPPFLAGS="$cppflags $CPPFLAGS" LDFLAGS=$ldflags ../../binutils-$BINUTILS_VER/configure \
--prefix=$prefix --target=$target --disable-nls --disable-werror \ --prefix=$prefix --target=$target --disable-nls --disable-werror \
--enable-lto --enable-plugins --enable-gold \ --enable-lto --enable-plugins \
--enable-poison-system-directories \ --enable-poison-system-directories \
$CROSS_PARAMS \ $CROSS_PARAMS \
|| { echo "Error configuring binutils"; exit 1; } || { echo "Error configuring binutils"; exit 1; }
@@ -64,7 +64,7 @@ then
--prefix=$prefix \ --prefix=$prefix \
--enable-lto\ --enable-lto\
--with-system-zlib \ --with-system-zlib \
--with-bugurl="http://wiki.devkitpro.org/index.php/Bug_Reports" --with-pkgversion="devkitARM release 49" \ --with-bugurl="http://wiki.devkitpro.org/index.php/Bug_Reports" --with-pkgversion="devkitARM release 50" \
$CROSS_PARAMS \ $CROSS_PARAMS \
$CROSS_GCC_PARAMS \ $CROSS_GCC_PARAMS \
|| { echo "Error configuring gcc"; exit 1; } || { echo "Error configuring gcc"; exit 1; }

View File

@@ -1,257 +0,0 @@
/*
* Linkscript for Wii U
*/
OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", "elf32-powerpc");
OUTPUT_ARCH(powerpc:common);
EXTERN(_start);
ENTRY(_start);
PHDRS
{
stub PT_LOAD FLAGS(5);
text PT_LOAD FLAGS(5);
data PT_LOAD FLAGS(6);
bss1 PT_LOAD;
bss2 PT_LOAD;
}
SECTIONS
{
/* default base address */
/* use -Wl,--section-start,.init=0xADDRESS to change */
. = 0x00802000;
/* Program */
.init :
{
KEEP (*crt0.o(*.init))
KEEP (*(.init))
} :text = 0
.plt : { *(.plt) }
.interp : { *(.interp) }
.hash : { *(.hash) }
.dynsym : { *(.dynsym) }
.dynstr : { *(.dynstr) }
.gnu.version : { *(.gnu.version) }
.gnu.version_d : { *(.gnu.version_d) }
.gnu.version_r : { *(.gnu.version_r) }
.rel.init : { *(.rel.init) }
.rela.init : { *(.rela.init) }
.rel.text : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) }
.rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) }
.rel.fini : { *(.rel.fini) }
.rela.fini : { *(.rela.fini) }
.rel.rodata : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) }
.rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) }
.rel.data : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) }
.rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) }
.rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) }
.rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) }
.rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) }
.rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) }
.rel.ctors : { *(.rel.ctors) }
.rela.ctors : { *(.rela.ctors) }
.rel.dtors : { *(.rel.dtors) }
.rela.dtors : { *(.rela.dtors) }
.rel.got : { *(.rel.got) }
.rela.got : { *(.rela.got) }
.rela.got1 : { *(.rela.got1) }
.rela.got2 : { *(.rela.got2) }
.rel.sdata : { *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*) }
.rela.sdata : { *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*) }
.rel.sbss : { *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*) }
.rela.sbss : { *(.rela.sbss .rela.sbss.* .rel.gnu.linkonce.sb.*) }
.rel.sdata2 : { *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*) }
.rela.sdata2 : { *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*) }
.rel.sbss2 : { *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*) }
.rela.sbss2 : { *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*) }
.rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) }
.rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) }
.rel.plt : { *(.rel.plt) }
.rela.plt : { *(.rela.plt) }
.text :
{
*(.text)
*(.text.*)
/* .gnu.warning sections are handled specially by elf32.em. */
*(.gnu.warning)
*(.gnu.linkonce.t.*)
. = ALIGN(32); /* REQUIRED. LD is flaky without it. */
} = 0
.fini :
{
KEEP (*(.fini))
. = ALIGN(32); /* REQUIRED. LD is flaky without it. */
} = 0
PROVIDE (__etext = .);
PROVIDE (_etext = .);
PROVIDE (etext = .);
.rodata : { *(.rodata) *(.rodata.*) *(.gnu.linkonce.r.*) } :data
.rodata1 : { *(.rodata1) }
.sdata2 : { *(.sdata2) *(.sdata2.*) *(.gnu.linkonce.s2.*) }
.sbss2 : { *(.sbss2) *(.sbss2.*) *(.gnu.linkonce.sb2.*) }
/* Adjust the address for the data segment. We want to adjust up to
the same address within the page on the next page up. */
/* Ensure the __preinit_array_start label is properly aligned. We
could instead move the label definition inside the section, but
the linker would then create the section even if it turns out to
be empty, which isn't pretty. */
. = ALIGN(32 / 8);
PROVIDE (__preinit_array_start = .);
.preinit_array : { *(.preinit_array) }
PROVIDE (__preinit_array_end = .);
PROVIDE (__init_array_start = .);
.init_array : { *(.init_array) }
PROVIDE (__init_array_end = .);
PROVIDE (__fini_array_start = .);
.fini_array : { *(.fini_array) }
PROVIDE (__fini_array_end = .);
.data :
{
*(.data)
*(.data.*)
*(.gnu.linkonce.d.*)
SORT(CONSTRUCTORS)
. = ALIGN(32); /* REQUIRED. LD is flaky without it. */
}
.data1 : { *(.data1) }
.tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
.tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
.eh_frame : { KEEP (*(.eh_frame)) }
.gcc_except_table : { *(.gcc_except_table) }
.fixup : { *(.fixup) }
.got1 : { *(.got1) }
.got2 : { *(.got2) }
.dynamic : { *(.dynamic) }
.ctors :
{
/* gcc uses crtbegin.o to find the start of
the constructors, so we make sure it is
first. Because this is a wildcard, it
doesn't matter if the user does not
actually link against crtbegin.o; the
linker won't look for a file to match a
wildcard. The wildcard also means that it
doesn't matter which directory crtbegin.o
is in. */
KEEP (*crtbegin.o(.ctors))
/* We don't want to include the .ctor section from
from the crtend.o file until after the sorted ctors.
The .ctor section from the crtend file contains the
end of ctors marker and it must be last */
KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors))
KEEP (*(SORT(.ctors.*)))
KEEP (*(.ctors))
. = ALIGN(32); /* REQUIRED. LD is flaky without it. */
}
.dtors :
{
KEEP (*crtbegin.o(.dtors))
KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors))
KEEP (*(SORT(.dtors.*)))
KEEP (*(.dtors))
. = ALIGN(32); /* REQUIRED. LD is flaky without it. */
}
.jcr : { KEEP (*(.jcr)) }
.got : { *(.got.plt) *(.got) }
/* We want the small data sections together, so single-instruction offsets
can access them all, and initialized data all before uninitialized, so
we can shorten the on-disk segment size. */
.sdata :
{
*(.sdata)
*(.sdata.*)
*(.gnu.linkonce.s.*)
. = ALIGN(32); /* REQUIRED. LD is flaky without it. */
}
_edata = .;
PROVIDE (edata = .);
.sbss :
{
__sbss_start = .;
PROVIDE (__sbss_start = .);
PROVIDE (___sbss_start = .);
*(.dynsbss)
*(.sbss)
*(.sbss.*)
*(.gnu.linkonce.sb.*)
*(.scommon)
PROVIDE (__sbss_end = .);
PROVIDE (___sbss_end = .);
. = ALIGN(32); /* REQUIRED. LD is flaky without it. */
__sbss_end = .;
} :bss1
.bss :
{
__bss_start = .;
PROVIDE (__bss_start = .);
*(.dynbss)
*(.bss)
*(.bss.*)
*(.gnu.linkonce.b.*)
*(COMMON)
/* Align here to ensure that the .bss section occupies space up to
_end. Align after .bss to ensure correct alignment even if the
.bss section disappears because there are no input sections. */
. = ALIGN(32);
PROVIDE (__bss_end = .);
__bss_end = .;
} :bss2
_end = .;
PROVIDE(end = .);
/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) }
.stab.exclstr 0 : { *(.stab.exclstr) }
.stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
.comment 0 : { *(.comment) }
/* DWARF debug sections.
Symbols in the DWARF debugging sections are relative to the beginning
of the section so we begin them at 0. */
/* DWARF 1 */
.debug 0 : { *(.debug) }
.line 0 : { *(.line) }
/* GNU DWARF 1 extensions */
.debug_srcinfo 0 : { *(.debug_srcinfo) }
.debug_sfnames 0 : { *(.debug_sfnames) }
/* DWARF 1.1 and DWARF 2 */
.debug_aranges 0 : { *(.debug_aranges) }
.debug_pubnames 0 : { *(.debug_pubnames) }
/* DWARF 2 */
.debug_info 0 : { *(.debug_info) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
.debug_macinfo 0 : { *(.debug_macinfo) }
/* SGI/MIPS DWARF 2 extensions */
.debug_weaknames 0 : { *(.debug_weaknames) }
.debug_funcnames 0 : { *(.debug_funcnames) }
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) }
/* These must appear regardless of . */
}

View File

@@ -1,7 +1,7 @@
diff -NBaur binutils-2.30/opcodes/ppc-opc.c binutils-2.30-ppc/opcodes/ppc-opc.c diff -NBaur binutils-2.31.1/opcodes/ppc-opc.c binutils-2.31.1-ppc/opcodes/ppc-opc.c
--- binutils-2.30/opcodes/ppc-opc.c 2018-01-13 13:31:16.000000000 +0000 --- binutils-2.31.1/opcodes/ppc-opc.c 2018-06-24 19:38:58.000000000 +0100
+++ binutils-2.30-ppc/opcodes/ppc-opc.c 2018-05-27 22:33:42.302025484 +0100 +++ binutils-2.31.1-ppc/opcodes/ppc-opc.c 2018-11-01 10:59:42.814553627 +0000
@@ -3488,7 +3488,7 @@ @@ -3501,7 +3501,7 @@
#define MFDEC2 (PPC_OPCODE_PPC | PPC_OPCODE_601 | PPC_OPCODE_BOOKE \ #define MFDEC2 (PPC_OPCODE_PPC | PPC_OPCODE_601 | PPC_OPCODE_BOOKE \
| PPC_OPCODE_TITAN) | PPC_OPCODE_TITAN)
#define BOOKE PPC_OPCODE_BOOKE #define BOOKE PPC_OPCODE_BOOKE

View File

@@ -1,5 +1,5 @@
diff --git a/config/gthr.m4 b/config/gthr.m4 diff --git a/config/gthr.m4 b/config/gthr.m4
index 7b29f1f..814104f 100644 index 7b29f1f3327..814104f32a2 100644
--- a/config/gthr.m4 --- a/config/gthr.m4
+++ b/config/gthr.m4 +++ b/config/gthr.m4
@@ -12,6 +12,7 @@ AC_DEFUN([GCC_AC_THREAD_HEADER], @@ -12,6 +12,7 @@ AC_DEFUN([GCC_AC_THREAD_HEADER],
@@ -11,10 +11,10 @@ index 7b29f1f..814104f 100644
lynx) thread_header=config/gthr-lynx.h ;; lynx) thread_header=config/gthr-lynx.h ;;
mipssde) thread_header=config/mips/gthr-mipssde.h ;; mipssde) thread_header=config/mips/gthr-mipssde.h ;;
diff --git a/gcc/config.gcc b/gcc/config.gcc diff --git a/gcc/config.gcc b/gcc/config.gcc
index a5defb0..d714072 100644 index 532c33f4c2b..bb87330bbbe 100644
--- a/gcc/config.gcc --- a/gcc/config.gcc
+++ b/gcc/config.gcc +++ b/gcc/config.gcc
@@ -2459,7 +2459,7 @@ powerpc-xilinx-eabi*) @@ -2461,7 +2461,7 @@ powerpc-xilinx-eabi*)
use_gcc_stdint=wrap use_gcc_stdint=wrap
;; ;;
powerpc-*-eabi*) powerpc-*-eabi*)
@@ -23,11 +23,24 @@ index a5defb0..d714072 100644
extra_options="${extra_options} rs6000/sysv4.opt" extra_options="${extra_options} rs6000/sysv4.opt"
tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm" tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
use_gcc_stdint=wrap use_gcc_stdint=wrap
diff --git a/gcc/config/newlib-stdint.h b/gcc/config/newlib-stdint.h
index f46e797d610..fd39e64c38d 100644
--- a/gcc/config/newlib-stdint.h
+++ b/gcc/config/newlib-stdint.h
@@ -25,7 +25,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
/* newlib uses 32-bit long in certain cases for all non-SPU
targets. */
#ifndef STDINT_LONG32
-#define STDINT_LONG32 (LONG_TYPE_SIZE == 32)
+#define STDINT_LONG32 0
#endif
#define SIG_ATOMIC_TYPE "int"
diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h
index b9b58a8..7c86ac6 100644 index b83b304e3eb..b85359edcfc 100644
--- a/gcc/config/rs6000/rs6000.h --- a/gcc/config/rs6000/rs6000.h
+++ b/gcc/config/rs6000/rs6000.h +++ b/gcc/config/rs6000/rs6000.h
@@ -205,6 +205,7 @@ @@ -212,6 +212,7 @@
{ "asm_cpu_476", ASM_CPU_476_SPEC }, \ { "asm_cpu_476", ASM_CPU_476_SPEC }, \
SUBTARGET_EXTRA_SPECS SUBTARGET_EXTRA_SPECS
@@ -35,7 +48,7 @@ index b9b58a8..7c86ac6 100644
/* -mcpu=native handling only makes sense with compiler running on /* -mcpu=native handling only makes sense with compiler running on
an PowerPC chip. If changing this condition, also change an PowerPC chip. If changing this condition, also change
the condition in driver-rs6000.c. */ the condition in driver-rs6000.c. */
@@ -219,6 +220,8 @@ extern const char *host_detect_local_cpu (int argc, const char **argv); @@ -226,6 +227,8 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
#else #else
#define ASM_CPU_NATIVE_SPEC "%(asm_default)" #define ASM_CPU_NATIVE_SPEC "%(asm_default)"
#endif #endif
@@ -45,10 +58,10 @@ index b9b58a8..7c86ac6 100644
#ifndef CC1_CPU_SPEC #ifndef CC1_CPU_SPEC
#ifdef HAVE_LOCAL_CPU_DETECT #ifdef HAVE_LOCAL_CPU_DETECT
diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
index bb19d0d..ff5f80b 100644 index bb19d0dcd41..74d1e474432 100644
--- a/gcc/config/rs6000/sysv4.h --- a/gcc/config/rs6000/sysv4.h
+++ b/gcc/config/rs6000/sysv4.h +++ b/gcc/config/rs6000/sysv4.h
@@ -565,7 +565,12 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN) @@ -565,7 +565,11 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN)
/* Default starting address if specified. */ /* Default starting address if specified. */
#define LINK_START_SPEC "\ #define LINK_START_SPEC "\
@@ -57,23 +70,21 @@ index bb19d0d..ff5f80b 100644
+ mvgc : %(link_start_vgc) ; \ + mvgc : %(link_start_vgc) ; \
+ mgcbios : %(link_start_gcb) ; \ + mgcbios : %(link_start_gcb) ; \
+ mrvl : %(link_start_rvl) ; \ + mrvl : %(link_start_rvl) ; \
+ mwup : %(link_start_wup) ; \
+ mads : %(link_start_ads) ; \ + mads : %(link_start_ads) ; \
myellowknife : %(link_start_yellowknife) ; \ myellowknife : %(link_start_yellowknife) ; \
mmvme : %(link_start_mvme) ; \ mmvme : %(link_start_mvme) ; \
msim : %(link_start_sim) ; \ msim : %(link_start_sim) ; \
@@ -596,7 +601,9 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN) @@ -596,7 +600,8 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN)
/* Any specific OS flags. */ /* Any specific OS flags. */
#define LINK_OS_SPEC "\ #define LINK_OS_SPEC "\
-%{mads : %(link_os_ads) ; \ -%{mads : %(link_os_ads) ; \
+%{mgcn|mogc|mvgc|mgcbios|mrvl : %(link_os_ogc) ; \ +%{mgcn|mogc|mvgc|mgcbios|mrvl : %(link_os_ogc) ; \
+ mwup : %(link_os_wup) ; \
+ mads : %(link_os_ads) ; \ + mads : %(link_os_ads) ; \
myellowknife : %(link_os_yellowknife) ; \ myellowknife : %(link_os_yellowknife) ; \
mmvme : %(link_os_mvme) ; \ mmvme : %(link_os_mvme) ; \
msim : %(link_os_sim) ; \ msim : %(link_os_sim) ; \
@@ -614,7 +621,11 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN) @@ -614,7 +619,10 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN)
/* Override rs6000.h definition. */ /* Override rs6000.h definition. */
#undef CPP_SPEC #undef CPP_SPEC
#define CPP_SPEC "%{posix: -D_POSIX_SOURCE} \ #define CPP_SPEC "%{posix: -D_POSIX_SOURCE} \
@@ -81,12 +92,11 @@ index bb19d0d..ff5f80b 100644
+%{mgcn : %(cpp_os_gcn) ; \ +%{mgcn : %(cpp_os_gcn) ; \
+ mogc|mvgc|mgcbios : %(cpp_os_ogc) ; \ + mogc|mvgc|mgcbios : %(cpp_os_ogc) ; \
+ mrvl : %(cpp_os_rvl) ; \ + mrvl : %(cpp_os_rvl) ; \
+ mwup : %(cpp_os_wup) ; \
+ mads : %(cpp_os_ads) ; \ + mads : %(cpp_os_ads) ; \
myellowknife : %(cpp_os_yellowknife) ; \ myellowknife : %(cpp_os_yellowknife) ; \
mmvme : %(cpp_os_mvme) ; \ mmvme : %(cpp_os_mvme) ; \
msim : %(cpp_os_sim) ; \ msim : %(cpp_os_sim) ; \
@@ -628,7 +639,11 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN) @@ -628,7 +636,10 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN)
#undef STARTFILE_SPEC #undef STARTFILE_SPEC
#define STARTFILE_SPEC "\ #define STARTFILE_SPEC "\
@@ -94,23 +104,21 @@ index bb19d0d..ff5f80b 100644
+%{mgcn : %(startfile_gcn) ; \ +%{mgcn : %(startfile_gcn) ; \
+ mogc|mvgc|mgcbios : %(startfile_ogc) ; \ + mogc|mvgc|mgcbios : %(startfile_ogc) ; \
+ mrvl : %(startfile_ogc) ; \ + mrvl : %(startfile_ogc) ; \
+ mwup : %(startfile_wup) ; \
+ mads : %(startfile_ads) ; \ + mads : %(startfile_ads) ; \
myellowknife : %(startfile_yellowknife) ; \ myellowknife : %(startfile_yellowknife) ; \
mmvme : %(startfile_mvme) ; \ mmvme : %(startfile_mvme) ; \
msim : %(startfile_sim) ; \ msim : %(startfile_sim) ; \
@@ -642,7 +657,9 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN) @@ -642,7 +653,8 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN)
#undef LIB_SPEC #undef LIB_SPEC
#define LIB_SPEC "\ #define LIB_SPEC "\
-%{mads : %(lib_ads) ; \ -%{mads : %(lib_ads) ; \
+%{mgcn|mogc|mvgc|mgcbios|mrvl : %(lib_ogc) ; \ +%{mgcn|mogc|mvgc|mgcbios|mrvl : %(lib_ogc) ; \
+ mwup : %(lib_wup) ; \
+ mads : %(lib_ads) ; \ + mads : %(lib_ads) ; \
myellowknife : %(lib_yellowknife) ; \ myellowknife : %(lib_yellowknife) ; \
mmvme : %(lib_mvme) ; \ mmvme : %(lib_mvme) ; \
msim : %(lib_sim) ; \ msim : %(lib_sim) ; \
@@ -652,11 +669,13 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN) @@ -652,11 +664,12 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN)
mcall-openbsd: %(lib_openbsd) ; \ mcall-openbsd: %(lib_openbsd) ; \
: %(lib_default) }" : %(lib_default) }"
@@ -121,110 +129,97 @@ index bb19d0d..ff5f80b 100644
#define ENDFILE_SPEC "\ #define ENDFILE_SPEC "\
-%{mads : %(endfile_ads) ; \ -%{mads : %(endfile_ads) ; \
+%{mgcn|mogc|mvgc|mgcbios|mrvl : %(endfile_ogc) ; \ +%{mgcn|mogc|mvgc|mgcbios|mrvl : %(endfile_ogc) ; \
+ mwup : %(endfile_wup) ; \
+ mads : %(endfile_ads) ; \ + mads : %(endfile_ads) ; \
myellowknife : %(endfile_yellowknife) ; \ myellowknife : %(endfile_yellowknife) ; \
mmvme : %(endfile_mvme) ; \ mmvme : %(endfile_mvme) ; \
msim : %(endfile_sim) ; \ msim : %(endfile_sim) ; \
@@ -672,16 +691,33 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN) @@ -672,16 +685,27 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN)
/* Motorola ADS support. */ /* Motorola ADS support. */
#define LIB_ADS_SPEC "--start-group -lads -lc --end-group" #define LIB_ADS_SPEC "--start-group -lads -lc --end-group"
+#define LIB_OGC_SPEC "--start-group -lsysbase -lc --end-group" +#define LIB_OGC_SPEC "--start-group -lsysbase -lc --end-group"
+#define LIB_WUP_SPEC "--start-group -lsysbase -lc --end-group"
#define STARTFILE_ADS_SPEC "ecrti.o%s crt0.o%s crtbegin.o%s" #define STARTFILE_ADS_SPEC "ecrti.o%s crt0.o%s crtbegin.o%s"
+#define STARTFILE_OGC_SPEC "ecrti.o%s crtbegin.o%s crtmain.o%s" +#define STARTFILE_OGC_SPEC "ecrti.o%s crtbegin.o%s crtmain.o%s"
+#define STARTFILE_WUP_SPEC "ecrti.o%s crtbegin.o%s crtmain.o%s"
#define ENDFILE_ADS_SPEC "crtend.o%s ecrtn.o%s" #define ENDFILE_ADS_SPEC "crtend.o%s ecrtn.o%s"
+#define ENDFILE_OGC_SPEC "crtend.o%s ecrtn.o%s" +#define ENDFILE_OGC_SPEC "crtend.o%s ecrtn.o%s"
+#define ENDFILE_WUP_SPEC "crtend.o%s ecrtn.o%s"
#define LINK_START_ADS_SPEC "-T ads.ld%s" #define LINK_START_ADS_SPEC "-T ads.ld%s"
+#define LINK_START_OGC_SPEC "-T ogc.ld%s" +#define LINK_START_OGC_SPEC "-T ogc.ld%s"
+#define LINK_START_RVL_SPEC "-T rvl.ld%s" +#define LINK_START_RVL_SPEC "-T rvl.ld%s"
+#define LINK_START_WUP_SPEC "-T wup.ld%s"
+#define LINK_START_VGC_SPEC "-T vgcogc.ld%s" +#define LINK_START_VGC_SPEC "-T vgcogc.ld%s"
+#define LINK_START_GCB_SPEC "-T gcbogc.ld%s" +#define LINK_START_GCB_SPEC "-T gcbogc.ld%s"
#define LINK_OS_ADS_SPEC "" #define LINK_OS_ADS_SPEC ""
+#define LINK_OS_OGC_SPEC "--gc-sections" +#define LINK_OS_OGC_SPEC "--gc-sections"
+#define LINK_OS_WUP_SPEC "--gc-sections"
#define CPP_OS_ADS_SPEC "" #define CPP_OS_ADS_SPEC ""
+#define CPP_OS_GCN_SPEC "-D__gamecube__ -ffunction-sections -fdata-sections" +#define CPP_OS_GCN_SPEC "-D__gamecube__ -ffunction-sections -fdata-sections"
+#define CPP_OS_OGC_SPEC "-D__gamecube__ -DHW_DOL -ffunction-sections -fdata-sections" +#define CPP_OS_OGC_SPEC "-D__gamecube__ -DHW_DOL -ffunction-sections -fdata-sections"
+#define CPP_OS_RVL_SPEC "-D__wii__ -DHW_RVL -ffunction-sections -fdata-sections" +#define CPP_OS_RVL_SPEC "-D__wii__ -DHW_RVL -ffunction-sections -fdata-sections"
+#define CPP_OS_WUP_SPEC "-D__wiiu__ -DHW_WUP -ffunction-sections -fdata-sections"
/* Motorola Yellowknife support. */ /* Motorola Yellowknife support. */
#define LIB_YELLOWKNIFE_SPEC "--start-group -lyk -lc --end-group" #define LIB_YELLOWKNIFE_SPEC "--start-group -lyk -lc --end-group"
@@ -882,6 +918,8 @@ ncrtn.o%s" @@ -882,6 +906,7 @@ ncrtn.o%s"
#undef SUBTARGET_EXTRA_SPECS #undef SUBTARGET_EXTRA_SPECS
#define SUBTARGET_EXTRA_SPECS \ #define SUBTARGET_EXTRA_SPECS \
{ "crtsavres_default", CRTSAVRES_DEFAULT_SPEC }, \ { "crtsavres_default", CRTSAVRES_DEFAULT_SPEC }, \
+ { "lib_ogc", LIB_OGC_SPEC }, \ + { "lib_ogc", LIB_OGC_SPEC }, \
+ { "lib_wup", LIB_WUP_SPEC }, \
{ "lib_ads", LIB_ADS_SPEC }, \ { "lib_ads", LIB_ADS_SPEC }, \
{ "lib_yellowknife", LIB_YELLOWKNIFE_SPEC }, \ { "lib_yellowknife", LIB_YELLOWKNIFE_SPEC }, \
{ "lib_mvme", LIB_MVME_SPEC }, \ { "lib_mvme", LIB_MVME_SPEC }, \
@@ -891,6 +929,8 @@ ncrtn.o%s" @@ -891,6 +916,7 @@ ncrtn.o%s"
{ "lib_netbsd", LIB_NETBSD_SPEC }, \ { "lib_netbsd", LIB_NETBSD_SPEC }, \
{ "lib_openbsd", LIB_OPENBSD_SPEC }, \ { "lib_openbsd", LIB_OPENBSD_SPEC }, \
{ "lib_default", LIB_DEFAULT_SPEC }, \ { "lib_default", LIB_DEFAULT_SPEC }, \
+ { "startfile_ogc", STARTFILE_OGC_SPEC }, \ + { "startfile_ogc", STARTFILE_OGC_SPEC }, \
+ { "startfile_wup", STARTFILE_WUP_SPEC }, \
{ "startfile_ads", STARTFILE_ADS_SPEC }, \ { "startfile_ads", STARTFILE_ADS_SPEC }, \
{ "startfile_yellowknife", STARTFILE_YELLOWKNIFE_SPEC }, \ { "startfile_yellowknife", STARTFILE_YELLOWKNIFE_SPEC }, \
{ "startfile_mvme", STARTFILE_MVME_SPEC }, \ { "startfile_mvme", STARTFILE_MVME_SPEC }, \
@@ -900,6 +940,8 @@ ncrtn.o%s" @@ -900,6 +926,7 @@ ncrtn.o%s"
{ "startfile_netbsd", STARTFILE_NETBSD_SPEC }, \ { "startfile_netbsd", STARTFILE_NETBSD_SPEC }, \
{ "startfile_openbsd", STARTFILE_OPENBSD_SPEC }, \ { "startfile_openbsd", STARTFILE_OPENBSD_SPEC }, \
{ "startfile_default", STARTFILE_DEFAULT_SPEC }, \ { "startfile_default", STARTFILE_DEFAULT_SPEC }, \
+ { "endfile_ogc", ENDFILE_OGC_SPEC }, \ + { "endfile_ogc", ENDFILE_OGC_SPEC }, \
+ { "endfile_wup", ENDFILE_WUP_SPEC }, \
{ "endfile_ads", ENDFILE_ADS_SPEC }, \ { "endfile_ads", ENDFILE_ADS_SPEC }, \
{ "endfile_yellowknife", ENDFILE_YELLOWKNIFE_SPEC }, \ { "endfile_yellowknife", ENDFILE_YELLOWKNIFE_SPEC }, \
{ "endfile_mvme", ENDFILE_MVME_SPEC }, \ { "endfile_mvme", ENDFILE_MVME_SPEC }, \
@@ -911,7 +953,12 @@ ncrtn.o%s" @@ -911,7 +938,11 @@ ncrtn.o%s"
{ "endfile_default", ENDFILE_DEFAULT_SPEC }, \ { "endfile_default", ENDFILE_DEFAULT_SPEC }, \
{ "link_shlib", LINK_SHLIB_SPEC }, \ { "link_shlib", LINK_SHLIB_SPEC }, \
{ "link_start", LINK_START_SPEC }, \ { "link_start", LINK_START_SPEC }, \
+ { "link_start_vgc", LINK_START_VGC_SPEC }, \ + { "link_start_vgc", LINK_START_VGC_SPEC }, \
+ { "link_start_gcb", LINK_START_GCB_SPEC }, \ + { "link_start_gcb", LINK_START_GCB_SPEC }, \
+ { "link_start_rvl", LINK_START_RVL_SPEC }, \ + { "link_start_rvl", LINK_START_RVL_SPEC }, \
+ { "link_start_wup", LINK_START_WUP_SPEC }, \
{ "link_start_ads", LINK_START_ADS_SPEC }, \ { "link_start_ads", LINK_START_ADS_SPEC }, \
+ { "link_start_ogc", LINK_START_OGC_SPEC }, \ + { "link_start_ogc", LINK_START_OGC_SPEC }, \
{ "link_start_yellowknife", LINK_START_YELLOWKNIFE_SPEC }, \ { "link_start_yellowknife", LINK_START_YELLOWKNIFE_SPEC }, \
{ "link_start_mvme", LINK_START_MVME_SPEC }, \ { "link_start_mvme", LINK_START_MVME_SPEC }, \
{ "link_start_sim", LINK_START_SIM_SPEC }, \ { "link_start_sim", LINK_START_SIM_SPEC }, \
@@ -921,6 +968,8 @@ ncrtn.o%s" @@ -921,6 +952,7 @@ ncrtn.o%s"
{ "link_start_openbsd", LINK_START_OPENBSD_SPEC }, \ { "link_start_openbsd", LINK_START_OPENBSD_SPEC }, \
{ "link_start_default", LINK_START_DEFAULT_SPEC }, \ { "link_start_default", LINK_START_DEFAULT_SPEC }, \
{ "link_os", LINK_OS_SPEC }, \ { "link_os", LINK_OS_SPEC }, \
+ { "link_os_ogc", LINK_OS_OGC_SPEC }, \ + { "link_os_ogc", LINK_OS_OGC_SPEC }, \
+ { "link_os_wup", LINK_OS_WUP_SPEC }, \
{ "link_os_ads", LINK_OS_ADS_SPEC }, \ { "link_os_ads", LINK_OS_ADS_SPEC }, \
{ "link_os_yellowknife", LINK_OS_YELLOWKNIFE_SPEC }, \ { "link_os_yellowknife", LINK_OS_YELLOWKNIFE_SPEC }, \
{ "link_os_mvme", LINK_OS_MVME_SPEC }, \ { "link_os_mvme", LINK_OS_MVME_SPEC }, \
@@ -932,6 +981,10 @@ ncrtn.o%s" @@ -932,6 +964,9 @@ ncrtn.o%s"
{ "link_os_default", LINK_OS_DEFAULT_SPEC }, \ { "link_os_default", LINK_OS_DEFAULT_SPEC }, \
{ "cc1_secure_plt_default", CC1_SECURE_PLT_DEFAULT_SPEC }, \ { "cc1_secure_plt_default", CC1_SECURE_PLT_DEFAULT_SPEC }, \
{ "link_secure_plt", LINK_SECURE_PLT_SPEC }, \ { "link_secure_plt", LINK_SECURE_PLT_SPEC }, \
+ { "cpp_os_gcn", CPP_OS_GCN_SPEC }, \ + { "cpp_os_gcn", CPP_OS_GCN_SPEC }, \
+ { "cpp_os_ogc", CPP_OS_OGC_SPEC }, \ + { "cpp_os_ogc", CPP_OS_OGC_SPEC }, \
+ { "cpp_os_rvl", CPP_OS_RVL_SPEC }, \ + { "cpp_os_rvl", CPP_OS_RVL_SPEC }, \
+ { "cpp_os_wup", CPP_OS_WUP_SPEC }, \
{ "cpp_os_ads", CPP_OS_ADS_SPEC }, \ { "cpp_os_ads", CPP_OS_ADS_SPEC }, \
{ "cpp_os_yellowknife", CPP_OS_YELLOWKNIFE_SPEC }, \ { "cpp_os_yellowknife", CPP_OS_YELLOWKNIFE_SPEC }, \
{ "cpp_os_mvme", CPP_OS_MVME_SPEC }, \ { "cpp_os_mvme", CPP_OS_MVME_SPEC }, \
diff --git a/gcc/config/rs6000/sysv4.opt b/gcc/config/rs6000/sysv4.opt diff --git a/gcc/config/rs6000/sysv4.opt b/gcc/config/rs6000/sysv4.opt
index 34fea0d..9451447 100644 index 34fea0ddd08..084a8ae435e 100644
--- a/gcc/config/rs6000/sysv4.opt --- a/gcc/config/rs6000/sysv4.opt
+++ b/gcc/config/rs6000/sysv4.opt +++ b/gcc/config/rs6000/sysv4.opt
@@ -124,6 +124,30 @@ mads @@ -124,6 +124,26 @@ mads
Target RejectNegative Target RejectNegative
Link with libads.a, libc.a and crt0.o. Link with libads.a, libc.a and crt0.o.
@@ -247,16 +242,12 @@ index 34fea0d..9451447 100644
+mrvl +mrvl
+Target RejectNegative +Target RejectNegative
+Link with libsysbase.a and libc.a, use rvl linker script +Link with libsysbase.a and libc.a, use rvl linker script
+
+mwup
+Target RejectNegative
+Link with libsysbase.a and libc.a, use wup linker script
+ +
myellowknife myellowknife
Target RejectNegative Target RejectNegative
Link with libyk.a, libc.a and crt0.o. Link with libyk.a, libc.a and crt0.o.
diff --git a/gcc/configure b/gcc/configure diff --git a/gcc/configure b/gcc/configure
index 6121e16..6584112 100755 index 6121e163259..6584112e6a1 100755
--- a/gcc/configure --- a/gcc/configure
+++ b/gcc/configure +++ b/gcc/configure
@@ -11692,7 +11692,7 @@ case ${enable_threads} in @@ -11692,7 +11692,7 @@ case ${enable_threads} in
@@ -269,7 +260,7 @@ index 6121e16..6584112 100755
target_thread_file=${enable_threads} target_thread_file=${enable_threads}
;; ;;
diff --git a/gcc/configure.ac b/gcc/configure.ac diff --git a/gcc/configure.ac b/gcc/configure.ac
index b066cc6..c42b3ef 100644 index b066cc609e1..c42b3ef5fc6 100644
--- a/gcc/configure.ac --- a/gcc/configure.ac
+++ b/gcc/configure.ac +++ b/gcc/configure.ac
@@ -1611,7 +1611,7 @@ case ${enable_threads} in @@ -1611,7 +1611,7 @@ case ${enable_threads} in
@@ -282,7 +273,7 @@ index b066cc6..c42b3ef 100644
target_thread_file=${enable_threads} target_thread_file=${enable_threads}
;; ;;
diff --git a/libgcc/config/rs6000/crtrestvr.S b/libgcc/config/rs6000/crtrestvr.S diff --git a/libgcc/config/rs6000/crtrestvr.S b/libgcc/config/rs6000/crtrestvr.S
index ba2b262..8d86610 100644 index ba2b2623301..8d866107142 100644
--- a/libgcc/config/rs6000/crtrestvr.S --- a/libgcc/config/rs6000/crtrestvr.S
+++ b/libgcc/config/rs6000/crtrestvr.S +++ b/libgcc/config/rs6000/crtrestvr.S
@@ -24,7 +24,7 @@ @@ -24,7 +24,7 @@
@@ -300,7 +291,7 @@ index ba2b262..8d86610 100644
#endif #endif
+#endif +#endif
diff --git a/libgcc/config/rs6000/crtsavevr.S b/libgcc/config/rs6000/crtsavevr.S diff --git a/libgcc/config/rs6000/crtsavevr.S b/libgcc/config/rs6000/crtsavevr.S
index 077e33f..b7be68b 100644 index 077e33f34d5..b7be68b710f 100644
--- a/libgcc/config/rs6000/crtsavevr.S --- a/libgcc/config/rs6000/crtsavevr.S
+++ b/libgcc/config/rs6000/crtsavevr.S +++ b/libgcc/config/rs6000/crtsavevr.S
@@ -24,7 +24,7 @@ @@ -24,7 +24,7 @@
@@ -319,7 +310,7 @@ index 077e33f..b7be68b 100644
+#endif +#endif
diff --git a/libgcc/config/rs6000/gthr-dkp.c b/libgcc/config/rs6000/gthr-dkp.c diff --git a/libgcc/config/rs6000/gthr-dkp.c b/libgcc/config/rs6000/gthr-dkp.c
new file mode 100644 new file mode 100644
index 0000000..94d6ba9 index 00000000000..94d6ba94ec0
--- /dev/null --- /dev/null
+++ b/libgcc/config/rs6000/gthr-dkp.c +++ b/libgcc/config/rs6000/gthr-dkp.c
@@ -0,0 +1,349 @@ @@ -0,0 +1,349 @@
@@ -674,7 +665,7 @@ index 0000000..94d6ba9
+} +}
diff --git a/libgcc/config/rs6000/gthr-dkp.h b/libgcc/config/rs6000/gthr-dkp.h diff --git a/libgcc/config/rs6000/gthr-dkp.h b/libgcc/config/rs6000/gthr-dkp.h
new file mode 100644 new file mode 100644
index 0000000..281c19d index 00000000000..281c19d2a60
--- /dev/null --- /dev/null
+++ b/libgcc/config/rs6000/gthr-dkp.h +++ b/libgcc/config/rs6000/gthr-dkp.h
@@ -0,0 +1,185 @@ @@ -0,0 +1,185 @@
@@ -864,7 +855,7 @@ index 0000000..281c19d
+ +
+#endif /* ! _GLIBCXX_GCC_GTHR_DKP_H */ +#endif /* ! _GLIBCXX_GCC_GTHR_DKP_H */
diff --git a/libgcc/config/rs6000/t-ppccomm b/libgcc/config/rs6000/t-ppccomm diff --git a/libgcc/config/rs6000/t-ppccomm b/libgcc/config/rs6000/t-ppccomm
index fb812d3..7f6669d 100644 index fb812d3801f..7f6669d530f 100644
--- a/libgcc/config/rs6000/t-ppccomm --- a/libgcc/config/rs6000/t-ppccomm
+++ b/libgcc/config/rs6000/t-ppccomm +++ b/libgcc/config/rs6000/t-ppccomm
@@ -1,4 +1,5 @@ @@ -1,4 +1,5 @@
@@ -874,7 +865,7 @@ index fb812d3..7f6669d 100644
# This can't end up in shared libgcc # This can't end up in shared libgcc
diff --git a/libgcc/configure b/libgcc/configure diff --git a/libgcc/configure b/libgcc/configure
index b2f3f87..c6f93f8 100644 index b2f3f870844..c6f93f8b3ac 100644
--- a/libgcc/configure --- a/libgcc/configure
+++ b/libgcc/configure +++ b/libgcc/configure
@@ -5442,6 +5442,7 @@ tm_file="${tm_file_}" @@ -5442,6 +5442,7 @@ tm_file="${tm_file_}"
@@ -886,7 +877,7 @@ index b2f3f87..c6f93f8 100644
lynx) thread_header=config/gthr-lynx.h ;; lynx) thread_header=config/gthr-lynx.h ;;
mipssde) thread_header=config/mips/gthr-mipssde.h ;; mipssde) thread_header=config/mips/gthr-mipssde.h ;;
diff --git a/libgcc/crtstuff.c b/libgcc/crtstuff.c diff --git a/libgcc/crtstuff.c b/libgcc/crtstuff.c
index 5e89445..f234745 100644 index 5e894455e16..f2347455de0 100644
--- a/libgcc/crtstuff.c --- a/libgcc/crtstuff.c
+++ b/libgcc/crtstuff.c +++ b/libgcc/crtstuff.c
@@ -47,6 +47,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see @@ -47,6 +47,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
@@ -898,7 +889,7 @@ index 5e89445..f234745 100644
/* FIXME: Including auto-host is incorrect, but until we have /* FIXME: Including auto-host is incorrect, but until we have
identified the set of defines that need to go into auto-target.h, identified the set of defines that need to go into auto-target.h,
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index ba094be..ac53ee6 100755 index fbc9daeb195..90c15adda62 100755
--- a/libstdc++-v3/configure --- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure +++ b/libstdc++-v3/configure
@@ -15178,6 +15178,7 @@ $as_echo "$target_thread_file" >&6; } @@ -15178,6 +15178,7 @@ $as_echo "$target_thread_file" >&6; }

View File

@@ -7407,7 +7407,7 @@ index eb645868b..b9a006453 100644
powerpc*-*-linux* | \ powerpc*-*-linux* | \
powerpc*-*-rtem* | \ powerpc*-*-rtem* | \
diff --git a/newlib/libc/include/sys/dirent.h b/newlib/libc/include/sys/dirent.h diff --git a/newlib/libc/include/sys/dirent.h b/newlib/libc/include/sys/dirent.h
index a3fb5c02c..8ddd10867 100644 index a3fb5c02c..adb8e1083 100644
--- a/newlib/libc/include/sys/dirent.h --- a/newlib/libc/include/sys/dirent.h
+++ b/newlib/libc/include/sys/dirent.h +++ b/newlib/libc/include/sys/dirent.h
@@ -4,10 +4,57 @@ @@ -4,10 +4,57 @@
@@ -7417,9 +7417,9 @@ index a3fb5c02c..8ddd10867 100644
+#ifndef _dirent_h_ +#ifndef _dirent_h_
+#define _dirent_h_ +#define _dirent_h_
+ +
+#include <sys/iosupport.h>
+#include <sys/types.h> +#include <sys/types.h>
+#include <sys/syslimits.h> +#include <sys/syslimits.h>
+#include <sys/iosupport.h>
+ +
+#define _DIRENT_HAVE_D_TYPE +#define _DIRENT_HAVE_D_TYPE
+ +
@@ -7446,7 +7446,7 @@ index a3fb5c02c..8ddd10867 100644
+ +
+ typedef struct { + typedef struct {
+ long int position; + long int position;
+ DIR_ITER* dirData; + DIR_ITER* dirData;
+ struct dirent fileData; + struct dirent fileData;
+ } DIR; + } DIR;
+ +
@@ -7485,7 +7485,7 @@ index 2900b332f..6efb54eb3 100644
#ifdef __rtems__ #ifdef __rtems__
diff --git a/newlib/libc/include/sys/iosupport.h b/newlib/libc/include/sys/iosupport.h diff --git a/newlib/libc/include/sys/iosupport.h b/newlib/libc/include/sys/iosupport.h
new file mode 100644 new file mode 100644
index 000000000..649fc2630 index 000000000..8b6d8da30
--- /dev/null --- /dev/null
+++ b/newlib/libc/include/sys/iosupport.h +++ b/newlib/libc/include/sys/iosupport.h
@@ -0,0 +1,108 @@ @@ -0,0 +1,108 @@
@@ -7501,7 +7501,7 @@ index 000000000..649fc2630
+#include <reent.h> +#include <reent.h>
+#include <sys/stat.h> +#include <sys/stat.h>
+#include <sys/statvfs.h> +#include <sys/statvfs.h>
+#include <time.h> +#include <sys/time.h>
+ +
+enum { +enum {
+ STD_IN, + STD_IN,

View File

@@ -37,9 +37,9 @@ include $(DEVKITPPC)/base_tools
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
define bin2o define bin2o
bin2s -a 32 $< | $(AS) -o $(@) bin2s -a 32 $< | $(AS) -o $(@)
echo "extern const u8" `(echo $(<F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"_end[];" > `(echo $(<F) | tr . _)`.h echo "extern const u8" `(echo $(<F) | sed -e 's/^\([0-9]\)/_\1/' -e 's/[^A-Za-z0-9_]/_/g')`"_end[];" > `(echo $(<F) | tr . _)`.h
echo "extern const u8" `(echo $(<F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"[];" >> `(echo $(<F) | tr . _)`.h echo "extern const u8" `(echo $(<F) | sed -e 's/^\([0-9]\)/_\1/' -e 's/[^A-Za-z0-9_]/_/g')`"[];" >> `(echo $(<F) | tr . _)`.h
echo "extern const u32" `(echo $(<F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`_size";" >> `(echo $(<F) | tr . _)`.h echo "extern const u32" `(echo $(<F) | sed -e 's/^\([0-9]\)/_\1/' -e 's/[^A-Za-z0-9_]/_/g')`_size";" >> `(echo $(<F) | tr . _)`.h
endef endef

View File

@@ -97,7 +97,7 @@ then
--with-headers=../../newlib-$NEWLIB_VER/newlib/libc/include \ --with-headers=../../newlib-$NEWLIB_VER/newlib/libc/include \
--prefix=$prefix\ --prefix=$prefix\
--with-system-zlib\ --with-system-zlib\
--with-bugurl="https://github.com/devkitpro/buildscripts/issues" --with-pkgversion="devkitPPC release 31" \ --with-bugurl="https://github.com/devkitpro/buildscripts/issues" --with-pkgversion="devkitPPC release 34" \
$CROSS_PARAMS \ $CROSS_PARAMS \
$CROSS_GCC_PARAMS \ $CROSS_GCC_PARAMS \
CFLAGS_FOR_TARGET="-O2 -ffunction-sections -fdata-sections" \ CFLAGS_FOR_TARGET="-O2 -ffunction-sections -fdata-sections" \
@@ -139,7 +139,6 @@ then
--target=$target \ --target=$target \
--prefix=$prefix \ --prefix=$prefix \
--enable-newlib-mb \ --enable-newlib-mb \
--enable-newlib-hw-fp \
|| { echo "Error configuring newlib"; exit 1; } || { echo "Error configuring newlib"; exit 1; }
touch configured-newlib touch configured-newlib
fi fi
@@ -186,10 +185,6 @@ rm -fr $prefix/$target/sys-include
echo "installing linkscripts ..." echo "installing linkscripts ..."
cp $BUILDSCRIPTDIR/dkppc/crtls/*.ld $prefix/$target/lib/ cp $BUILDSCRIPTDIR/dkppc/crtls/*.ld $prefix/$target/lib/
#---------------------------------------------------------------------------------
# copy base rulesets
#---------------------------------------------------------------------------------
cp $BUILDSCRIPTDIR/dkppc/rules/* $prefix
cd $BUILDDIR cd $BUILDDIR
@@ -203,7 +198,8 @@ if [ ! -f configured-gdb ]
then then
CFLAGS="$cflags" LDFLAGS="$ldflags" ../../gdb-$GDB_VER/configure \ CFLAGS="$cflags" LDFLAGS="$ldflags" ../../gdb-$GDB_VER/configure \
--disable-nls --prefix=$prefix --target=$target --disable-werror \ --disable-nls --prefix=$prefix --target=$target --disable-werror \
$CROSS_PARAMS || { echo "Error configuring gdb"; exit 1; } $CROSS_PARAMS \
$CROSS_GCC_PARAMS || { echo "Error configuring gdb"; exit 1; }
touch configured-gdb touch configured-gdb
fi fi

View File

@@ -3,6 +3,12 @@
export DEVKITPPC=$TOOLPATH/devkitPPC export DEVKITPPC=$TOOLPATH/devkitPPC
export DEVKITPRO=$TOOLPATH export DEVKITPRO=$TOOLPATH
cd $BUILDDIR
mkdir -p rules
cd rules
tar -xvf $SRCDIR/devkitppc-rules-$DKPPC_RULES_VER.tar.xz
make install
cd $BUILDDIR/libogc-$LIBOGC_VER cd $BUILDDIR/libogc-$LIBOGC_VER
if [ ! -f installed ]; then if [ ! -f installed ]; then

View File

@@ -30,29 +30,29 @@ done
case "$VERSION" in case "$VERSION" in
"1" ) "1" )
GCC_VER=8.1.0 GCC_VER=8.2.0
BINUTILS_VER=2.30 BINUTILS_VER=2.31.1
NEWLIB_VER=3.0.0 NEWLIB_VER=3.0.0
GDB_VER=8.0 GDB_VER=8.2
basedir='dkarm-eabi' basedir='dkarm-eabi'
package=devkitARM package=devkitARM
target=arm-none-eabi target=arm-none-eabi
toolchain=DEVKITARM toolchain=DEVKITARM
;; ;;
"2" ) "2" )
GCC_VER=8.1.0 GCC_VER=8.2.0
BINUTILS_VER=2.30 BINUTILS_VER=2.32
MN_BINUTILS_VER=2.17 MN_BINUTILS_VER=2.17
NEWLIB_VER=3.0.0 NEWLIB_VER=3.0.0
GDB_VER=8.0.1 GDB_VER=8.2
basedir='dkppc' basedir='dkppc'
package=devkitPPC package=devkitPPC
target=powerpc-eabi target=powerpc-eabi
toolchain=DEVKITPPC toolchain=DEVKITPPC
;; ;;
"3" ) "3" )
GCC_VER=8.1.0 GCC_VER=8.2.0
BINUTILS_VER=2.30 BINUTILS_VER=2.31.1
NEWLIB_VER=3.0.0 NEWLIB_VER=3.0.0
GDB_VER=8.0 GDB_VER=8.0
basedir='dka64' basedir='dka64'

View File

@@ -27,5 +27,5 @@ fi
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
TOOLPATH=$(echo $INSTALLDIR | sed -e 's/^\([a-zA-Z]\):/\/\1/') TOOLPATH=$(echo $INSTALLDIR | sed -e 's/^\([a-zA-Z]\):/\/\1/')
export PATH=$PATH:$TOOLPATH/$package/bin export PATH=$PATH:$TOOLPATH/$package/bin
export prefix=$INSTALLDIR/$CROSSBUILD/$package
. ./strip_bins.sh . ./strip_bins.sh