mirror of
https://github.com/devkitPro/buildscripts.git
synced 2026-08-21 18:04:06 -05:00
Compare commits
10 Commits
devkitA64_
...
devkitA64_
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b8c7c915bc | ||
|
|
c108162819 | ||
|
|
e952463476 | ||
|
|
1444dc91df | ||
|
|
4219405837 | ||
|
|
aacd4f8bf6 | ||
|
|
e4cb9e3b2f | ||
|
|
85ec801a13 | ||
|
|
0eb81ba063 | ||
|
|
5740d1d57d |
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# devkitARM release 55
|
# devkitARM release 56
|
||||||
# devkitPPC release 38
|
# devkitPPC release 38
|
||||||
# devkitA64 release 17
|
# devkitA64 release 17
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
@@ -59,13 +59,6 @@ if [ ! -z "$CROSSBUILD" ] ; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
|
||||||
# Sane defaults for building toolchain
|
|
||||||
#---------------------------------------------------------------------------------
|
|
||||||
export CFLAGS="-O2 -pipe"
|
|
||||||
export CXXFLAGS="$CFLAGS"
|
|
||||||
unset LDFLAGS
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# Look for automated configuration file to bypass prompts
|
# Look for automated configuration file to bypass prompts
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
@@ -162,7 +155,7 @@ case $PLATFORM in
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
MINGW32* )
|
MINGW32* )
|
||||||
cppflags="-D__USE_MINGW_ACCESS"
|
cppflags="-D__USE_MINGW_ACCESS -D__USE_MINGW_ANSI_STDIO=1"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@@ -238,8 +231,10 @@ fi
|
|||||||
|
|
||||||
cd $BUILDSCRIPTDIR
|
cd $BUILDSCRIPTDIR
|
||||||
|
|
||||||
echo "stripping installed binaries"
|
if [ "$BUILD_DKPRO_NO_STRIP_BINARIES" != "1" ]; then
|
||||||
. ./strip_bins.sh
|
echo "stripping installed binaries"
|
||||||
|
. ./strip_bins.sh
|
||||||
|
fi
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# Clean up temporary files and source directories
|
# Clean up temporary files and source directories
|
||||||
|
|||||||
@@ -62,8 +62,7 @@ then
|
|||||||
--with-newlib=yes \
|
--with-newlib=yes \
|
||||||
--with-headers=../../newlib-$NEWLIB_VER/newlib/libc/include \
|
--with-headers=../../newlib-$NEWLIB_VER/newlib/libc/include \
|
||||||
--prefix=$prefix \
|
--prefix=$prefix \
|
||||||
--enable-lto $plugin_ld\
|
--enable-lto \
|
||||||
--with-system-zlib \
|
|
||||||
--disable-tm-clone-registry \
|
--disable-tm-clone-registry \
|
||||||
--disable-__cxa_atexit \
|
--disable-__cxa_atexit \
|
||||||
--with-bugurl="https://github.com/devkitPro/buildscripts/issues" --with-pkgversion="devkitA64 release 17" \
|
--with-bugurl="https://github.com/devkitPro/buildscripts/issues" --with-pkgversion="devkitA64 release 17" \
|
||||||
|
|||||||
@@ -1,8 +1,70 @@
|
|||||||
|
diff --git a/gcc/config.host b/gcc/config.host
|
||||||
|
index 0a02c33cc80..38f7adc655e 100644
|
||||||
|
--- a/gcc/config.host
|
||||||
|
+++ b/gcc/config.host
|
||||||
|
@@ -251,6 +251,10 @@ case ${host} in
|
||||||
|
host_extra_gcc_objs="${host_extra_gcc_objs} driver-mingw32.o"
|
||||||
|
host_lto_plugin_soname=liblto_plugin.dll
|
||||||
|
;;
|
||||||
|
+ aarch64-*-darwin*)
|
||||||
|
+ out_host_hook_obj="${out_host_hook_obj} host-aarch64-darwin.o"
|
||||||
|
+ host_xmake_file="${host_xmake_file} aarch64/x-darwin"
|
||||||
|
+ ;;
|
||||||
|
i[34567]86-*-darwin* | x86_64-*-darwin*)
|
||||||
|
out_host_hook_obj="${out_host_hook_obj} host-i386-darwin.o"
|
||||||
|
host_xmake_file="${host_xmake_file} i386/x-darwin"
|
||||||
|
diff --git a/gcc/config/aarch64/host-aarch64-darwin.c b/gcc/config/aarch64/host-aarch64-darwin.c
|
||||||
|
new file mode 100644
|
||||||
|
index 00000000000..92c38b0b9db
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/gcc/config/aarch64/host-aarch64-darwin.c
|
||||||
|
@@ -0,0 +1,32 @@
|
||||||
|
+/* i386-darwin host-specific hook definitions.
|
||||||
|
+ Copyright (C) 2003-2021 Free Software Foundation, Inc.
|
||||||
|
+
|
||||||
|
+This file is part of GCC.
|
||||||
|
+
|
||||||
|
+GCC is free software; you can redistribute it and/or modify it under
|
||||||
|
+the terms of the GNU General Public License as published by the Free
|
||||||
|
+Software Foundation; either version 3, or (at your option) any later
|
||||||
|
+version.
|
||||||
|
+
|
||||||
|
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
+for more details.
|
||||||
|
+
|
||||||
|
+You should have received a copy of the GNU General Public License
|
||||||
|
+along with GCC; see the file COPYING3. If not see
|
||||||
|
+<http://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#define IN_TARGET_CODE 1
|
||||||
|
+
|
||||||
|
+#include "config.h"
|
||||||
|
+#include "system.h"
|
||||||
|
+#include "coretypes.h"
|
||||||
|
+#include "hosthooks.h"
|
||||||
|
+#include "hosthooks-def.h"
|
||||||
|
+#include "config/host-darwin.h"
|
||||||
|
+
|
||||||
|
+/* Darwin doesn't do anything special for aarch64 hosts; this file exists just
|
||||||
|
+ to include config/host-darwin.h. */
|
||||||
|
+
|
||||||
|
+const struct host_hooks host_hooks = HOST_HOOKS_INITIALIZER;
|
||||||
|
diff --git a/gcc/config/aarch64/x-darwin b/gcc/config/aarch64/x-darwin
|
||||||
|
new file mode 100644
|
||||||
|
index 00000000000..6d788d5e89c
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/gcc/config/aarch64/x-darwin
|
||||||
|
@@ -0,0 +1,3 @@
|
||||||
|
+host-aarch64-darwin.o : $(srcdir)/config/aarch64/host-aarch64-darwin.c
|
||||||
|
+ $(COMPILE) $<
|
||||||
|
+ $(POSTCOMPILE)
|
||||||
diff --git a/gcc/config/arm/arm-cpus.in b/gcc/config/arm/arm-cpus.in
|
diff --git a/gcc/config/arm/arm-cpus.in b/gcc/config/arm/arm-cpus.in
|
||||||
index 728be500b80..74c1abad635 100644
|
index 0becb4385b6..30bd4a24cd6 100644
|
||||||
--- a/gcc/config/arm/arm-cpus.in
|
--- a/gcc/config/arm/arm-cpus.in
|
||||||
+++ b/gcc/config/arm/arm-cpus.in
|
+++ b/gcc/config/arm/arm-cpus.in
|
||||||
@@ -392,7 +392,7 @@ begin arch armv6k
|
@@ -400,7 +400,7 @@ begin arch armv6k
|
||||||
tune for mpcore
|
tune for mpcore
|
||||||
tune flags CO_PROC
|
tune flags CO_PROC
|
||||||
base 6K
|
base 6K
|
||||||
@@ -12,7 +74,7 @@ index 728be500b80..74c1abad635 100644
|
|||||||
optalias vfpv2 fp
|
optalias vfpv2 fp
|
||||||
option nofp remove ALL_FP
|
option nofp remove ALL_FP
|
||||||
diff --git a/gcc/config/arm/t-arm-elf b/gcc/config/arm/t-arm-elf
|
diff --git a/gcc/config/arm/t-arm-elf b/gcc/config/arm/t-arm-elf
|
||||||
index 3d92bd23322..35cefcde676 100644
|
index d68def30867..d31f1e31ee6 100644
|
||||||
--- a/gcc/config/arm/t-arm-elf
|
--- a/gcc/config/arm/t-arm-elf
|
||||||
+++ b/gcc/config/arm/t-arm-elf
|
+++ b/gcc/config/arm/t-arm-elf
|
||||||
@@ -16,111 +16,14 @@
|
@@ -16,111 +16,14 @@
|
||||||
@@ -133,7 +195,7 @@ index 3d92bd23322..35cefcde676 100644
|
|||||||
-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
|
||||||
diff --git a/gcc/config/arm/unknown-elf.h b/gcc/config/arm/unknown-elf.h
|
diff --git a/gcc/config/arm/unknown-elf.h b/gcc/config/arm/unknown-elf.h
|
||||||
index 9ad2947505f..1790caa8e88 100644
|
index cca6f0ece54..8b78c28c7bb 100644
|
||||||
--- a/gcc/config/arm/unknown-elf.h
|
--- a/gcc/config/arm/unknown-elf.h
|
||||||
+++ b/gcc/config/arm/unknown-elf.h
|
+++ b/gcc/config/arm/unknown-elf.h
|
||||||
@@ -29,7 +29,7 @@
|
@@ -29,7 +29,7 @@
|
||||||
@@ -153,52 +215,26 @@ index 9ad2947505f..1790caa8e88 100644
|
|||||||
+#define LINK_GCC_C_SEQUENCE_SPEC "--start-group %G %L %(libgloss) --end-group"
|
+#define LINK_GCC_C_SEQUENCE_SPEC "--start-group %G %L %(libgloss) --end-group"
|
||||||
+
|
+
|
||||||
diff --git a/gcc/config/i386/host-mingw32.c b/gcc/config/i386/host-mingw32.c
|
diff --git a/gcc/config/i386/host-mingw32.c b/gcc/config/i386/host-mingw32.c
|
||||||
index 250fef59b55..36b2239aa5d 100644
|
index 360a280b23a..2c03947999a 100644
|
||||||
--- a/gcc/config/i386/host-mingw32.c
|
--- a/gcc/config/i386/host-mingw32.c
|
||||||
+++ b/gcc/config/i386/host-mingw32.c
|
+++ b/gcc/config/i386/host-mingw32.c
|
||||||
@@ -44,9 +44,6 @@ static size_t mingw32_gt_pch_alloc_granularity (void);
|
@@ -45,7 +45,11 @@ static size_t mingw32_gt_pch_alloc_granularity (void);
|
||||||
|
|
||||||
static inline void w32_error(const char*, const char*, int, const char*);
|
static inline void w32_error(const char*, const char*, int, const char*);
|
||||||
|
|
||||||
-/* FIXME: Is this big enough? */
|
/* FIXME: Is this big enough? */
|
||||||
-static const size_t pch_VA_max_size = 128 * 1024 * 1024;
|
+#if __MINGW64__
|
||||||
-
|
+static const size_t pch_VA_max_size = UINT64_C(64 * 1024 * 1024 * 1024);
|
||||||
|
+#else
|
||||||
|
static const size_t pch_VA_max_size = 128 * 1024 * 1024;
|
||||||
|
+#endif
|
||||||
|
|
||||||
/* Granularity for reserving address space. */
|
/* Granularity for reserving address space. */
|
||||||
static size_t va_granularity = 0x10000;
|
static size_t va_granularity = 0x10000;
|
||||||
|
|
||||||
@@ -88,9 +85,6 @@ static void *
|
|
||||||
mingw32_gt_pch_get_address (size_t size, int)
|
|
||||||
{
|
|
||||||
void* res;
|
|
||||||
- size = (size + va_granularity - 1) & ~(va_granularity - 1);
|
|
||||||
- if (size > pch_VA_max_size)
|
|
||||||
- return NULL;
|
|
||||||
|
|
||||||
/* FIXME: We let system determine base by setting first arg to NULL.
|
|
||||||
Allocating at top of available address space avoids unnecessary
|
|
||||||
@@ -100,7 +94,7 @@ mingw32_gt_pch_get_address (size_t size, int)
|
|
||||||
If we allocate at bottom we need to reserve the address as early
|
|
||||||
as possible and at the same point in each invocation. */
|
|
||||||
|
|
||||||
- res = VirtualAlloc (NULL, pch_VA_max_size,
|
|
||||||
+ res = VirtualAlloc (NULL, size,
|
|
||||||
MEM_RESERVE | MEM_TOP_DOWN,
|
|
||||||
PAGE_NOACCESS);
|
|
||||||
if (!res)
|
|
||||||
@@ -150,7 +144,7 @@ mingw32_gt_pch_use_address (void *addr, size_t size, int fd,
|
|
||||||
|
|
||||||
/* Offset must be also be a multiple of allocation granularity for
|
|
||||||
this to work. We can't change the offset. */
|
|
||||||
- if ((offset & (va_granularity - 1)) != 0 || size > pch_VA_max_size)
|
|
||||||
+ if ((offset & (va_granularity - 1)) != 0)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
|
|
||||||
diff --git a/gcc/gcc.c b/gcc/gcc.c
|
diff --git a/gcc/gcc.c b/gcc/gcc.c
|
||||||
index 9f790db0daf..97f52d0b893 100644
|
index 7837553958b..69d7a798e2e 100644
|
||||||
--- a/gcc/gcc.c
|
--- a/gcc/gcc.c
|
||||||
+++ b/gcc/gcc.c
|
+++ b/gcc/gcc.c
|
||||||
@@ -793,6 +793,11 @@ proper position among the other output files. */
|
@@ -853,6 +853,11 @@ proper position among the other output files. */
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -210,7 +246,7 @@ index 9f790db0daf..97f52d0b893 100644
|
|||||||
/* 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 \
|
||||||
@@ -1085,6 +1090,7 @@ static const char *link_spec = LINK_SPEC;
|
@@ -1197,6 +1202,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;
|
||||||
@@ -218,7 +254,7 @@ index 9f790db0daf..97f52d0b893 100644
|
|||||||
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;
|
||||||
@@ -1582,6 +1588,7 @@ static struct spec_list static_specs[] =
|
@@ -1702,6 +1708,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),
|
||||||
@@ -237,7 +273,7 @@ index dddddc7c444..c2502597953 100644
|
|||||||
-LIB2_DIVMOD_EXCEPTION_FLAGS := -fexceptions
|
-LIB2_DIVMOD_EXCEPTION_FLAGS := -fexceptions
|
||||||
+LIB2_DIVMOD_EXCEPTION_FLAGS := -fno-exceptions
|
+LIB2_DIVMOD_EXCEPTION_FLAGS := -fno-exceptions
|
||||||
diff --git a/libgcc/crtstuff.c b/libgcc/crtstuff.c
|
diff --git a/libgcc/crtstuff.c b/libgcc/crtstuff.c
|
||||||
index 3f769a1c660..e005d8304b7 100644
|
index 675930db043..bdfd6f6b0bb 100644
|
||||||
--- a/libgcc/crtstuff.c
|
--- a/libgcc/crtstuff.c
|
||||||
+++ b/libgcc/crtstuff.c
|
+++ b/libgcc/crtstuff.c
|
||||||
@@ -325,7 +325,7 @@ register_tm_clones (void)
|
@@ -325,7 +325,7 @@ register_tm_clones (void)
|
||||||
@@ -249,3 +285,43 @@ index 3f769a1c660..e005d8304b7 100644
|
|||||||
/* Declare the __dso_handle variable. It should have a unique value
|
/* Declare the __dso_handle variable. It should have a unique value
|
||||||
in every shared-object; in a main program its value is zero. The
|
in every shared-object; in a main program its value is zero. The
|
||||||
object should in any case be protected. This means the instance
|
object should in any case be protected. This means the instance
|
||||||
|
diff --git a/libstdc++-v3/include/c_compatibility/fenv.h b/libstdc++-v3/include/c_compatibility/fenv.h
|
||||||
|
index 0413e3b7c25..ff5f8bbe1a1 100644
|
||||||
|
--- a/libstdc++-v3/include/c_compatibility/fenv.h
|
||||||
|
+++ b/libstdc++-v3/include/c_compatibility/fenv.h
|
||||||
|
@@ -26,6 +26,10 @@
|
||||||
|
* This is a Standard C++ Library header.
|
||||||
|
*/
|
||||||
|
|
||||||
|
+#if !defined __cplusplus || defined _GLIBCXX_INCLUDE_NEXT_C_HEADERS
|
||||||
|
+# include_next <fenv.h>
|
||||||
|
+#else
|
||||||
|
+
|
||||||
|
#ifndef _GLIBCXX_FENV_H
|
||||||
|
#define _GLIBCXX_FENV_H 1
|
||||||
|
|
||||||
|
@@ -79,3 +83,5 @@ namespace std
|
||||||
|
#endif // C++11
|
||||||
|
|
||||||
|
#endif // _GLIBCXX_FENV_H
|
||||||
|
+
|
||||||
|
+#endif // __cplusplus
|
||||||
|
diff --git a/libstdc++-v3/include/c_global/cfenv b/libstdc++-v3/include/c_global/cfenv
|
||||||
|
index 0b0ec35a837..d24cb1a3c81 100644
|
||||||
|
--- a/libstdc++-v3/include/c_global/cfenv
|
||||||
|
+++ b/libstdc++-v3/include/c_global/cfenv
|
||||||
|
@@ -37,9 +37,11 @@
|
||||||
|
|
||||||
|
#include <bits/c++config.h>
|
||||||
|
|
||||||
|
-#if _GLIBCXX_HAVE_FENV_H
|
||||||
|
-# include <fenv.h>
|
||||||
|
-#endif
|
||||||
|
+// Need to ensure this finds the C library's <fenv.h> not a libstdc++
|
||||||
|
+// wrapper that might already be installed later in the include search path.
|
||||||
|
+#define _GLIBCXX_INCLUDE_NEXT_C_HEADERS
|
||||||
|
+#include_next <fenv.h>
|
||||||
|
+#undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS
|
||||||
|
|
||||||
|
#ifdef _GLIBCXX_USE_C99_FENV_TR1
|
||||||
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
diff --git a/libgloss/configure b/libgloss/configure
|
diff --git a/libgloss/configure b/libgloss/configure
|
||||||
index 0d2918cee..bccfb07b4 100755
|
index 816b9c4b8..b79edb6c8 100755
|
||||||
--- a/libgloss/configure
|
--- a/libgloss/configure
|
||||||
+++ b/libgloss/configure
|
+++ b/libgloss/configure
|
||||||
@@ -2604,6 +2604,8 @@ if test "${config_libnosys}" = "true"; then
|
@@ -2609,6 +2609,8 @@ if test "${config_libnosys}" = "true"; then
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -12,7 +12,7 @@ index 0d2918cee..bccfb07b4 100755
|
|||||||
|
|
||||||
ac_config_commands="$ac_config_commands depfiles"
|
ac_config_commands="$ac_config_commands depfiles"
|
||||||
diff --git a/libgloss/configure.in b/libgloss/configure.in
|
diff --git a/libgloss/configure.in b/libgloss/configure.in
|
||||||
index f38d5298e..509c31071 100644
|
index 4111724e1..0e44d885e 100644
|
||||||
--- a/libgloss/configure.in
|
--- a/libgloss/configure.in
|
||||||
+++ b/libgloss/configure.in
|
+++ b/libgloss/configure.in
|
||||||
@@ -2,6 +2,7 @@ dnl Process this file with autoconf to produce a configure script.
|
@@ -2,6 +2,7 @@ dnl Process this file with autoconf to produce a configure script.
|
||||||
@@ -23,7 +23,7 @@ index f38d5298e..509c31071 100644
|
|||||||
|
|
||||||
if test "${enable_shared}" = "yes" ; then
|
if test "${enable_shared}" = "yes" ; then
|
||||||
echo "Shared libraries not supported for cross compiling, ignored"
|
echo "Shared libraries not supported for cross compiling, ignored"
|
||||||
@@ -193,6 +194,7 @@ dnl fi
|
@@ -196,6 +197,7 @@ dnl fi
|
||||||
if test "${config_libnosys}" = "true"; then
|
if test "${config_libnosys}" = "true"; then
|
||||||
AC_CONFIG_SUBDIRS([libnosys])
|
AC_CONFIG_SUBDIRS([libnosys])
|
||||||
fi
|
fi
|
||||||
@@ -7408,10 +7408,10 @@ index 000000000..61de918bc
|
|||||||
+ return ret;
|
+ return ret;
|
||||||
+}
|
+}
|
||||||
diff --git a/newlib/configure.host b/newlib/configure.host
|
diff --git a/newlib/configure.host b/newlib/configure.host
|
||||||
index a84c0c80a..29fb7ed24 100644
|
index 1ddbb6c76..ed9999bea 100644
|
||||||
--- a/newlib/configure.host
|
--- a/newlib/configure.host
|
||||||
+++ b/newlib/configure.host
|
+++ b/newlib/configure.host
|
||||||
@@ -687,6 +687,14 @@ newlib_cflags="${newlib_cflags} -DCLOCK_PROVIDED -DMALLOC_PROVIDED -DEXIT_PROVID
|
@@ -694,6 +694,14 @@ newlib_cflags="${newlib_cflags} -DCLOCK_PROVIDED -DMALLOC_PROVIDED -DEXIT_PROVID
|
||||||
syscall_dir=syscalls
|
syscall_dir=syscalls
|
||||||
default_newlib_io_long_long="yes"
|
default_newlib_io_long_long="yes"
|
||||||
;;
|
;;
|
||||||
@@ -7426,8 +7426,34 @@ index a84c0c80a..29fb7ed24 100644
|
|||||||
arm*-*-pe)
|
arm*-*-pe)
|
||||||
syscall_dir=syscalls
|
syscall_dir=syscalls
|
||||||
;;
|
;;
|
||||||
|
diff --git a/newlib/libc/ctype/jp2uc.c b/newlib/libc/ctype/jp2uc.c
|
||||||
|
index 5e30f09be..1ea357f92 100644
|
||||||
|
--- a/newlib/libc/ctype/jp2uc.c
|
||||||
|
+++ b/newlib/libc/ctype/jp2uc.c
|
||||||
|
@@ -35,7 +35,7 @@
|
||||||
|
#ifdef _MB_CAPABLE
|
||||||
|
/* Under Cygwin, the incoming wide character is already given in UTF due
|
||||||
|
to the requirements of the underlying OS. */
|
||||||
|
-#ifndef __CYGWIN__
|
||||||
|
+#if !defined(__CYGWIN__) && !defined(__DEVKITA64__)
|
||||||
|
|
||||||
|
#include <_ansi.h>
|
||||||
|
#include <string.h>
|
||||||
|
diff --git a/newlib/libc/ctype/local.h b/newlib/libc/ctype/local.h
|
||||||
|
index 5c293c83d..75ccf89f5 100644
|
||||||
|
--- a/newlib/libc/ctype/local.h
|
||||||
|
+++ b/newlib/libc/ctype/local.h
|
||||||
|
@@ -32,7 +32,7 @@
|
||||||
|
* for towupper and towlower, the result must be back-transformed
|
||||||
|
into the respective locale encoding; currently NOT IMPLEMENTED
|
||||||
|
*/
|
||||||
|
-#ifdef __CYGWIN__
|
||||||
|
+#if defined(__CYGWIN__) || defined(__DEVKITA64__)
|
||||||
|
/* Under Cygwin, wchar_t (or its extension wint_t) is Unicode */
|
||||||
|
#define _jp2uc(c) (c)
|
||||||
|
#define _jp2uc_l(c, l) (c)
|
||||||
diff --git a/newlib/libc/include/stdio.h b/newlib/libc/include/stdio.h
|
diff --git a/newlib/libc/include/stdio.h b/newlib/libc/include/stdio.h
|
||||||
index 164d95bca..083e48758 100644
|
index ab18806e3..db77ebb2a 100644
|
||||||
--- a/newlib/libc/include/stdio.h
|
--- a/newlib/libc/include/stdio.h
|
||||||
+++ b/newlib/libc/include/stdio.h
|
+++ b/newlib/libc/include/stdio.h
|
||||||
@@ -233,7 +233,7 @@ int fsetpos (FILE *, const _fpos_t *);
|
@@ -233,7 +233,7 @@ int fsetpos (FILE *, const _fpos_t *);
|
||||||
@@ -7440,7 +7466,7 @@ index 164d95bca..083e48758 100644
|
|||||||
void clearerr (FILE *);
|
void clearerr (FILE *);
|
||||||
int feof (FILE *);
|
int feof (FILE *);
|
||||||
diff --git a/newlib/libc/include/sys/config.h b/newlib/libc/include/sys/config.h
|
diff --git a/newlib/libc/include/sys/config.h b/newlib/libc/include/sys/config.h
|
||||||
index d746b15fc..80169d9b7 100644
|
index 4bc8d29bf..35c05e6af 100644
|
||||||
--- a/newlib/libc/include/sys/config.h
|
--- a/newlib/libc/include/sys/config.h
|
||||||
+++ b/newlib/libc/include/sys/config.h
|
+++ b/newlib/libc/include/sys/config.h
|
||||||
@@ -4,6 +4,9 @@
|
@@ -4,6 +4,9 @@
|
||||||
@@ -7770,7 +7796,7 @@ index 5e937f103..635a7a6b8 100644
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
diff --git a/newlib/libc/locale/locale.c b/newlib/libc/locale/locale.c
|
diff --git a/newlib/libc/locale/locale.c b/newlib/libc/locale/locale.c
|
||||||
index 4c343e462..c04493460 100644
|
index 968642745..2ab1f9570 100644
|
||||||
--- a/newlib/libc/locale/locale.c
|
--- a/newlib/libc/locale/locale.c
|
||||||
+++ b/newlib/libc/locale/locale.c
|
+++ b/newlib/libc/locale/locale.c
|
||||||
@@ -92,7 +92,7 @@ beginning with <<"LC_">>.
|
@@ -92,7 +92,7 @@ beginning with <<"LC_">>.
|
||||||
@@ -7882,7 +7908,7 @@ index 4c343e462..c04493460 100644
|
|||||||
if (strcmp (locale, "POSIX") && strcmp (locale, "C")
|
if (strcmp (locale, "POSIX") && strcmp (locale, "C")
|
||||||
&& strcmp (locale, ""))
|
&& strcmp (locale, ""))
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -990,6 +1015,7 @@ __locale_ctype_ptr_l (struct __locale_t *locale)
|
@@ -991,6 +1016,7 @@ __locale_ctype_ptr_l (struct __locale_t *locale)
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
__locale_ctype_ptr (void)
|
__locale_ctype_ptr (void)
|
||||||
@@ -8031,7 +8057,7 @@ index 9b982a993..8c0aaac8c 100644
|
|||||||
+*/
|
+*/
|
||||||
#endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */
|
#endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */
|
||||||
diff --git a/newlib/libc/stdio/fread.c b/newlib/libc/stdio/fread.c
|
diff --git a/newlib/libc/stdio/fread.c b/newlib/libc/stdio/fread.c
|
||||||
index b358d2b4a..a3e597fd2 100644
|
index df8321461..9263e5829 100644
|
||||||
--- a/newlib/libc/stdio/fread.c
|
--- a/newlib/libc/stdio/fread.c
|
||||||
+++ b/newlib/libc/stdio/fread.c
|
+++ b/newlib/libc/stdio/fread.c
|
||||||
@@ -135,7 +135,7 @@ crlf_r (struct _reent * ptr,
|
@@ -135,7 +135,7 @@ crlf_r (struct _reent * ptr,
|
||||||
@@ -8060,7 +8086,7 @@ index b358d2b4a..a3e597fd2 100644
|
|||||||
resid -= fp->_r;
|
resid -= fp->_r;
|
||||||
p += fp->_r;
|
p += fp->_r;
|
||||||
fp->_r = 0;
|
fp->_r = 0;
|
||||||
@@ -225,7 +224,31 @@ _fread_r (struct _reent * ptr,
|
@@ -225,7 +224,30 @@ _fread_r (struct _reent * ptr,
|
||||||
/* fp->_r = 0 ... done in __srefill */
|
/* fp->_r = 0 ... done in __srefill */
|
||||||
p += r;
|
p += r;
|
||||||
resid -= r;
|
resid -= r;
|
||||||
@@ -8075,7 +8101,7 @@ index b358d2b4a..a3e597fd2 100644
|
|||||||
+ int old_size = fp->_bf._size;
|
+ int old_size = fp->_bf._size;
|
||||||
+ /* allow __refill to use user's buffer */
|
+ /* allow __refill to use user's buffer */
|
||||||
+ fp->_bf._base = (unsigned char *) p;
|
+ fp->_bf._base = (unsigned char *) p;
|
||||||
+ fp->_bf._size = resid;
|
+ fp->_bf._size = resid - old_size;
|
||||||
+ fp->_p = (unsigned char *) p;
|
+ fp->_p = (unsigned char *) p;
|
||||||
+ rc = __srefill_r (ptr, fp);
|
+ rc = __srefill_r (ptr, fp);
|
||||||
+ /* restore fp buffering back to original state */
|
+ /* restore fp buffering back to original state */
|
||||||
@@ -8084,20 +8110,19 @@ index b358d2b4a..a3e597fd2 100644
|
|||||||
+ fp->_p = old_base;
|
+ fp->_p = old_base;
|
||||||
+ resid -= fp->_r;
|
+ resid -= fp->_r;
|
||||||
+ p += fp->_r;
|
+ p += fp->_r;
|
||||||
+ fp->_r = 0;
|
+ //fp->_r = 0;
|
||||||
+
|
|
||||||
+ } else {
|
|
||||||
+ rc = __srefill_r (ptr, fp);
|
|
||||||
+ }
|
+ }
|
||||||
|
+ rc = __srefill_r (ptr, fp);
|
||||||
|
+
|
||||||
+ if (rc)
|
+ if (rc)
|
||||||
{
|
{
|
||||||
/* no more input: return partial result */
|
/* no more input: return partial result */
|
||||||
#ifdef __SCLE
|
#ifdef __SCLE
|
||||||
diff --git a/newlib/libc/stdio/vfprintf.c b/newlib/libc/stdio/vfprintf.c
|
diff --git a/newlib/libc/stdio/vfprintf.c b/newlib/libc/stdio/vfprintf.c
|
||||||
index c4bf2dbe3..d756df37d 100644
|
index 1aaf05aa4..b67182a79 100644
|
||||||
--- a/newlib/libc/stdio/vfprintf.c
|
--- a/newlib/libc/stdio/vfprintf.c
|
||||||
+++ b/newlib/libc/stdio/vfprintf.c
|
+++ b/newlib/libc/stdio/vfprintf.c
|
||||||
@@ -112,6 +112,8 @@ Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
|
@@ -108,6 +108,8 @@ Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
|
||||||
<<lseek>>, <<read>>, <<sbrk>>, <<write>>.
|
<<lseek>>, <<read>>, <<sbrk>>, <<write>>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -8106,7 +8131,7 @@ index c4bf2dbe3..d756df37d 100644
|
|||||||
#if defined(LIBC_SCCS) && !defined(lint)
|
#if defined(LIBC_SCCS) && !defined(lint)
|
||||||
/*static char *sccsid = "from: @(#)vfprintf.c 5.50 (Berkeley) 12/16/92";*/
|
/*static char *sccsid = "from: @(#)vfprintf.c 5.50 (Berkeley) 12/16/92";*/
|
||||||
static char *rcsid = "$Id$";
|
static char *rcsid = "$Id$";
|
||||||
@@ -1438,7 +1440,7 @@ reswitch: switch (ch) {
|
@@ -1434,7 +1436,7 @@ reswitch: switch (ch) {
|
||||||
string:
|
string:
|
||||||
#endif
|
#endif
|
||||||
sign = '\0';
|
sign = '\0';
|
||||||
@@ -8115,7 +8140,7 @@ index c4bf2dbe3..d756df37d 100644
|
|||||||
/* Behavior is undefined if the user passed a
|
/* Behavior is undefined if the user passed a
|
||||||
NULL string when precision is not 0.
|
NULL string when precision is not 0.
|
||||||
However, if we are not optimizing for size,
|
However, if we are not optimizing for size,
|
||||||
@@ -1448,7 +1450,7 @@ string:
|
@@ -1444,7 +1446,7 @@ string:
|
||||||
size = ((unsigned) prec > 6U) ? 6 : prec;
|
size = ((unsigned) prec > 6U) ? 6 : prec;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -8125,7 +8150,7 @@ index c4bf2dbe3..d756df37d 100644
|
|||||||
if (ch == 'S' || (flags & LONGINT)) {
|
if (ch == 'S' || (flags & LONGINT)) {
|
||||||
mbstate_t ps;
|
mbstate_t ps;
|
||||||
diff --git a/newlib/libc/stdio/vfscanf.c b/newlib/libc/stdio/vfscanf.c
|
diff --git a/newlib/libc/stdio/vfscanf.c b/newlib/libc/stdio/vfscanf.c
|
||||||
index 9c38eebf4..fbc8d877d 100644
|
index 994cee7fc..5d1d0a1cd 100644
|
||||||
--- a/newlib/libc/stdio/vfscanf.c
|
--- a/newlib/libc/stdio/vfscanf.c
|
||||||
+++ b/newlib/libc/stdio/vfscanf.c
|
+++ b/newlib/libc/stdio/vfscanf.c
|
||||||
@@ -74,6 +74,8 @@ These are GNU extensions.
|
@@ -74,6 +74,8 @@ These are GNU extensions.
|
||||||
@@ -8152,7 +8177,7 @@ index 980b31e3b..722be905e 100644
|
|||||||
|
|
||||||
#ifdef INTEGER_ONLY
|
#ifdef INTEGER_ONLY
|
||||||
diff --git a/newlib/libc/stdio/vfwscanf.c b/newlib/libc/stdio/vfwscanf.c
|
diff --git a/newlib/libc/stdio/vfwscanf.c b/newlib/libc/stdio/vfwscanf.c
|
||||||
index ffb6cc85b..db33d4f29 100644
|
index f00d41a09..7e290ee8d 100644
|
||||||
--- a/newlib/libc/stdio/vfwscanf.c
|
--- a/newlib/libc/stdio/vfwscanf.c
|
||||||
+++ b/newlib/libc/stdio/vfwscanf.c
|
+++ b/newlib/libc/stdio/vfwscanf.c
|
||||||
@@ -74,6 +74,9 @@ PORTABILITY
|
@@ -74,6 +74,9 @@ PORTABILITY
|
||||||
@@ -8166,37 +8191,18 @@ index ffb6cc85b..db33d4f29 100644
|
|||||||
#include <reent.h>
|
#include <reent.h>
|
||||||
#include <newlib.h>
|
#include <newlib.h>
|
||||||
diff --git a/newlib/libc/stdlib/aligned_alloc.c b/newlib/libc/stdlib/aligned_alloc.c
|
diff --git a/newlib/libc/stdlib/aligned_alloc.c b/newlib/libc/stdlib/aligned_alloc.c
|
||||||
index 88413ce86..24029a6f7 100644
|
index feb22c24b..3dae0c9a9 100644
|
||||||
--- a/newlib/libc/stdlib/aligned_alloc.c
|
--- a/newlib/libc/stdlib/aligned_alloc.c
|
||||||
+++ b/newlib/libc/stdlib/aligned_alloc.c
|
+++ b/newlib/libc/stdlib/aligned_alloc.c
|
||||||
@@ -1,5 +1,5 @@
|
@@ -28,6 +28,8 @@
|
||||||
/*-
|
|
||||||
- * Copyright (c) 2015 embedded brains GmbH
|
|
||||||
+ * Copyright (c) 2018 Dave Murphy
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
@@ -25,14 +25,15 @@
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
#include <reent.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
+#include <malloc.h>
|
+#include <malloc.h>
|
||||||
+#include <errno.h>
|
+#include <errno.h>
|
||||||
|
|
||||||
void *
|
void *
|
||||||
aligned_alloc(size_t alignment, size_t size)
|
aligned_alloc (size_t align, size_t size)
|
||||||
{
|
|
||||||
- void *p;
|
|
||||||
- int error;
|
|
||||||
+ if ((alignment !=0) && !(alignment & (alignment - 1 )) && !(size & (alignment - 1)))
|
|
||||||
+ return memalign(alignment,size);
|
|
||||||
|
|
||||||
- error = posix_memalign(&p, alignment, size);
|
|
||||||
-
|
|
||||||
- return (error == 0 ? p : NULL);
|
|
||||||
+ errno = EINVAL;
|
|
||||||
+ return (void*)NULL;
|
|
||||||
}
|
|
||||||
diff --git a/newlib/libc/stdlib/mbtowc_r.c b/newlib/libc/stdlib/mbtowc_r.c
|
diff --git a/newlib/libc/stdlib/mbtowc_r.c b/newlib/libc/stdlib/mbtowc_r.c
|
||||||
index 920a7ea3c..ba5ee7652 100644
|
index 920a7ea3c..ba5ee7652 100644
|
||||||
--- a/newlib/libc/stdlib/mbtowc_r.c
|
--- a/newlib/libc/stdlib/mbtowc_r.c
|
||||||
@@ -66,9 +66,10 @@ then
|
|||||||
--with-system-zlib \
|
--with-system-zlib \
|
||||||
--disable-tm-clone-registry \
|
--disable-tm-clone-registry \
|
||||||
--disable-__cxa_atexit \
|
--disable-__cxa_atexit \
|
||||||
--with-bugurl="http://wiki.devkitpro.org/index.php/Bug_Reports" --with-pkgversion="devkitARM release 55" \
|
--with-bugurl="http://wiki.devkitpro.org/index.php/Bug_Reports" --with-pkgversion="devkitARM release 56" \
|
||||||
$CROSS_PARAMS \
|
$CROSS_PARAMS \
|
||||||
$CROSS_GCC_PARAMS \
|
$CROSS_GCC_PARAMS \
|
||||||
|
$EXTRA_GCC_PARAMS \
|
||||||
|| { echo "Error configuring gcc"; exit 1; }
|
|| { echo "Error configuring gcc"; exit 1; }
|
||||||
touch configured-gcc
|
touch configured-gcc
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -30,9 +30,9 @@ done
|
|||||||
|
|
||||||
case "$VERSION" in
|
case "$VERSION" in
|
||||||
"1" )
|
"1" )
|
||||||
GCC_VER=10.2.0
|
GCC_VER=11.1.0
|
||||||
BINUTILS_VER=2.34
|
BINUTILS_VER=2.36.1
|
||||||
NEWLIB_VER=3.3.0
|
NEWLIB_VER=4.1.0
|
||||||
basedir='dkarm-eabi'
|
basedir='dkarm-eabi'
|
||||||
package=devkitARM
|
package=devkitARM
|
||||||
target=arm-none-eabi
|
target=arm-none-eabi
|
||||||
|
|||||||
Reference in New Issue
Block a user