Upgrades. Lots of 'em.

Signed-off-by: Alexey Neyman <stilor@att.net>
This commit is contained in:
Alexey Neyman 2018-09-23 13:58:16 -07:00
parent eb65ba65ba
commit 98834458f1
159 changed files with 1061 additions and 730 deletions

View File

@ -0,0 +1,4 @@
md5 android-ndk-r17c-linux-x86_64.zip a4b6b8281e7d101efd994d31e64af746
sha1 android-ndk-r17c-linux-x86_64.zip 12cacc70c3fd2f40574015631c00f41fb8a39048
sha256 android-ndk-r17c-linux-x86_64.zip 3f541adbd0330a9205ba12697f6d04ec90752c53d6b622101a2a8a856e816589
sha512 android-ndk-r17c-linux-x86_64.zip b8ad2aae0ea8caa7043c390c94c638c9499db22050c46b5e4f4b005fef6b47b7abdfb76c340c5a7e6024d8e6be926e07ab5556002c02919ba88f8b9469ed831e

View File

@ -0,0 +1,4 @@
md5 android-ndk-r18-linux-x86_64.zip 41a86d61b2c003db139f2c8ba139086c
sha1 android-ndk-r18-linux-x86_64.zip 2ac2e8e1ef73ed551cac3a1479bb28bd49369212
sha256 android-ndk-r18-linux-x86_64.zip c413dd014edc37f822d0dc88fabc05b64232d07d5c6e9345224e47073fdf140b
sha512 android-ndk-r18-linux-x86_64.zip 7a8b372be53a7d5a008b6cafda451096623af33aea910edd8e98ee4b15682da5d2ad641727ab12eca522ba965073a3eb247cd3cd850c9b602e2c7b1cd6eec708

View File

@ -0,0 +1,34 @@
r10231 | lethal | 2005-05-02 09:58:00 -0400 (Mon, 02 May 2005) | 13 lines
Likewise, binutils has no idea about any of these new targets either, so we
fix that up too.. now we're able to actually build a real toolchain for
sh2a_nofpu- and other more ineptly named toolchains (and yes, there are more
inept targets than that one, really. Go look, I promise).
---
configure | 2 +-
configure.ac | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--- a/configure
+++ b/configure
@@ -3855,7 +3855,7 @@
nvptx*-*-*)
noconfigdirs="$noconfigdirs target-libssp target-libstdc++-v3 target-libobjc"
;;
- sh-*-*)
+ sh*-*-*)
case "${target}" in
sh*-*-elf)
;;
--- a/configure.ac
+++ b/configure.ac
@@ -1152,7 +1152,7 @@
nvptx*-*-*)
noconfigdirs="$noconfigdirs target-libssp target-libstdc++-v3 target-libobjc"
;;
- sh-*-*)
+ sh*-*-*)
case "${target}" in
sh*-*-elf)
;;

View File

@ -0,0 +1,27 @@
---
ld/Makefile.am | 2 +-
ld/Makefile.in | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--- a/ld/Makefile.am
+++ b/ld/Makefile.am
@@ -57,7 +57,7 @@
# We put the scripts in the directory $(scriptdir)/ldscripts.
# We can't put the scripts in $(datadir) because the SEARCH_DIR
# directives need to be different for native and cross linkers.
-scriptdir = $(tooldir)/lib
+scriptdir = $(libdir)
EMUL = @EMUL@
EMULATION_OFILES = @EMULATION_OFILES@
--- a/ld/Makefile.in
+++ b/ld/Makefile.in
@@ -563,7 +563,7 @@
# We put the scripts in the directory $(scriptdir)/ldscripts.
# We can't put the scripts in $(datadir) because the SEARCH_DIR
# directives need to be different for native and cross linkers.
-scriptdir = $(tooldir)/lib
+scriptdir = $(libdir)
BASEDIR = $(srcdir)/..
BFDDIR = $(BASEDIR)/bfd
INCDIR = $(BASEDIR)/include

View File

@ -0,0 +1,24 @@
---
ld/emultempl/elf32.em | 4 ++++
1 file changed, 4 insertions(+)
--- a/ld/emultempl/elf32.em
+++ b/ld/emultempl/elf32.em
@@ -1471,6 +1471,8 @@
&& command_line.rpath == NULL)
{
path = (const char *) getenv ("LD_RUN_PATH");
+ if ((path) && (strlen (path) == 0))
+ path = NULL;
if (path
&& gld${EMULATION_NAME}_search_needed (path, &n, force))
break;
@@ -1751,6 +1753,8 @@
rpath = command_line.rpath;
if (rpath == NULL)
rpath = (const char *) getenv ("LD_RUN_PATH");
+ if ((rpath) && (*rpath == '\0'))
+ rpath = NULL;
for (abfd = link_info.input_bfds; abfd; abfd = abfd->link.next)
if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)

View File

@ -0,0 +1,15 @@
---
gold/gold-threads.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/gold/gold-threads.cc
+++ b/gold/gold-threads.cc
@@ -101,7 +101,7 @@
int err = pthread_mutexattr_init(&attr);
if (err != 0)
gold_fatal(_("pthead_mutexattr_init failed: %s"), strerror(err));
-#ifdef PTHREAD_MUTEX_ADAPTIVE_NP
+#if defined(PTHREAD_MUTEX_ADAPTIVE_NP) && !defined(_WIN32)
err = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ADAPTIVE_NP);
if (err != 0)
gold_fatal(_("pthread_mutexattr_settype failed: %s"), strerror(err));

View File

@ -0,0 +1,105 @@
---
binutils/configure | 3 +++
binutils/configure.ac | 3 +++
gas/configure | 3 +++
gas/configure.ac | 3 +++
ld/configure | 3 +++
ld/configure.ac | 3 +++
6 files changed, 18 insertions(+)
--- a/binutils/configure
+++ b/binutils/configure
@@ -12445,6 +12445,7 @@
done
test -n "$YACC" || YACC="yacc"
+save_LIBS=$LIBS
for ac_prog in flex lex
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -12608,6 +12609,8 @@
if test "$LEX" = :; then
LEX=${am_missing_run}flex
fi
+LIBS=$save_LIBS
+LEXLIB=
ALL_LINGUAS="bg ca da es fi fr hr id it ja pt ro ru rw sk sr sv tr uk vi zh_CN zh_TW"
# If we haven't got the data from the intl directory,
--- a/binutils/configure.ac
+++ b/binutils/configure.ac
@@ -86,7 +86,10 @@
fi
AC_PROG_YACC
+save_LIBS=$LIBS
AM_PROG_LEX
+LIBS=$save_LIBS
+LEXLIB=
ALL_LINGUAS="bg ca da es fi fr hr id it ja pt ro ru rw sk sr sv tr uk vi zh_CN zh_TW"
ZW_GNU_GETTEXT_SISTER_DIR
--- a/gas/configure
+++ b/gas/configure
@@ -13344,6 +13344,7 @@
done
test -n "$YACC" || YACC="yacc"
+save_LIBS=$LIBS
for ac_prog in flex lex
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -13507,6 +13508,8 @@
if test "$LEX" = :; then
LEX=${am_missing_run}flex
fi
+LIBS=$save_LIBS
+LEXLIB=
ALL_LINGUAS="es fi fr id ja ru rw sv tr uk zh_CN"
# If we haven't got the data from the intl directory,
--- a/gas/configure.ac
+++ b/gas/configure.ac
@@ -795,7 +795,10 @@
AC_DEFINE_UNQUOTED(TARGET_OS, "${target_os}", [Target OS.])
AC_PROG_YACC
+save_LIBS=$LIBS
AM_PROG_LEX
+LIBS=$save_LIBS
+LEXLIB=
ALL_LINGUAS="es fi fr id ja ru rw sv tr uk zh_CN"
ZW_GNU_GETTEXT_SISTER_DIR
--- a/ld/configure
+++ b/ld/configure
@@ -16536,6 +16536,7 @@
done
test -n "$YACC" || YACC="yacc"
+save_LIBS=$LIBS
for ac_prog in flex lex
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -16699,6 +16700,8 @@
if test "$LEX" = :; then
LEX=${am_missing_run}flex
fi
+LIBS=$save_LIBS
+LEXLIB=
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
--- a/ld/configure.ac
+++ b/ld/configure.ac
@@ -243,7 +243,10 @@
AC_EXEEXT
AC_PROG_YACC
+save_LIBS=$LIBS
AM_PROG_LEX
+LIBS=$save_LIBS
+LEXLIB=
AM_MAINTAINER_MODE
AM_CONDITIONAL(GENINSRC_NEVER, false)

View File

@ -0,0 +1,15 @@
---
gold/binary.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/gold/binary.cc
+++ b/gold/binary.cc
@@ -23,7 +23,7 @@
#include "gold.h"
#include <cerrno>
-#include <cstring>
+#include <string>
#include "elfcpp.h"
#include "stringpool.h"

View File

@ -0,0 +1,70 @@
From c39479f4ab4d372b518957871e1f205a03e7c3d6 Mon Sep 17 00:00:00 2001
From: Andrew Hsieh <andrewhsieh@google.com>
Date: Wed, 18 Mar 2015 10:57:24 +0800
Subject: [PATCH] Fix darwin build
1. In Drawin PTHREAD_ONCE_INIT is {0x30B1BCBA, {0}} and the GCC < 4.4
doesn't support ended initializer list
2. wcsncasecmp doesn't exist in MacSDK10.6.x
Change-Id: I69204a72f853f5263dffedc448379d75ed4eca2e
---
bfd/peXXigen.c | 22 ++++++++++++++++++++++
gold/gold-threads.cc | 15 ++++++++++++---
2 files changed, 34 insertions(+), 3 deletions(-)
--- a/bfd/peXXigen.c
+++ b/bfd/peXXigen.c
@@ -3621,6 +3621,28 @@
}
#endif /* HAVE_WCHAR_H and not Cygwin/Mingw */
+#if defined __APPLE__ && __DARWIN_C_LEVEL < 200809L
+/* wcsncasecmp isn't always defined in Mac SDK */
+static int
+wcsncasecmp(const wchar_t *s1, const wchar_t *s2, size_t n)
+{
+ wchar_t c1, c2;
+
+ if (n == 0)
+ return (0);
+ for (; *s1; s1++, s2++)
+ {
+ c1 = towlower(*s1);
+ c2 = towlower(*s2);
+ if (c1 != c2)
+ return ((int)c1 - c2);
+ if (--n == 0)
+ return (0);
+ }
+ return (-*s2);
+}
+#endif
+
/* Perform a comparison of two entries. */
static signed int
rsrc_cmp (bfd_boolean is_name, rsrc_entry * a, rsrc_entry * b)
--- a/gold/gold-threads.cc
+++ b/gold/gold-threads.cc
@@ -284,9 +284,18 @@
class Once_initialize
{
public:
- Once_initialize()
- : once_(PTHREAD_ONCE_INIT)
- { }
+ Once_initialize()
+#if !defined(__APPLE__)
+ : once_(PTHREAD_ONCE_INIT)
+ { }
+#else
+// In Drawin PTHREAD_ONCE_INIT is {0x30B1BCBA, {0}} and the GCC < 4.4 doesn't support
+// extended initializer list as above */
+ {
+ pthread_once_t once_2 = PTHREAD_ONCE_INIT;
+ once_ = once_2;
+ }
+#endif
// Return a pointer to the pthread_once_t variable.
pthread_once_t*

View File

@ -0,0 +1,41 @@
Signed-off-by: Sven Rebhan <odinshorse@googlemail.com>
Always try to prepend the sysroot prefix to absolute filenames first.
http://bugs.gentoo.org/275666
http://sourceware.org/bugzilla/show_bug.cgi?id=10340
---
ld/ldfile.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
--- a/ld/ldfile.c
+++ b/ld/ldfile.c
@@ -338,18 +338,25 @@
directory first. */
if (!entry->flags.maybe_archive)
{
- if (entry->flags.sysrooted && IS_ABSOLUTE_PATH (entry->filename))
+ /* For absolute pathnames, try to always open the file in the
+ sysroot first. If this fails, try to open the file at the
+ given location. */
+ entry->flags.sysrooted = is_sysrooted_pathname (entry->filename);
+ if (!entry->flags.sysrooted && IS_ABSOLUTE_PATH (entry->filename)
+ && ld_sysroot)
{
char *name = concat (ld_sysroot, entry->filename,
(const char *) NULL);
if (ldfile_try_open_bfd (name, entry))
{
entry->filename = name;
+ entry->flags.sysrooted = TRUE;
return TRUE;
}
free (name);
}
- else if (ldfile_try_open_bfd (entry->filename, entry))
+
+ if (ldfile_try_open_bfd (entry->filename, entry))
return TRUE;
if (IS_ABSOLUTE_PATH (entry->filename))

View File

@ -0,0 +1,279 @@
Patch adapted to binutils 2.23.2 and extended to use
BR_COMPILER_PARANOID_UNSAFE_PATH by Thomas Petazzoni.
[Gustavo: adapt to binutils 2.25]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Upstream-Status: Inappropriate [distribution: codesourcery]
Patch originally created by Mark Hatle, forward-ported to
binutils 2.21 by Scott Garman.
purpose: warn for uses of system directories when cross linking
Code Merged from Sourcery G++ binutils 2.19 - 4.4-277
2008-07-02 Joseph Myers <joseph@codesourcery.com>
ld/
* ld.h (args_type): Add error_poison_system_directories.
* ld.texinfo (--error-poison-system-directories): Document.
* ldfile.c (ldfile_add_library_path): Check
command_line.error_poison_system_directories.
* ldmain.c (main): Initialize
command_line.error_poison_system_directories.
* lexsup.c (enum option_values): Add
OPTION_ERROR_POISON_SYSTEM_DIRECTORIES.
(ld_options): Add --error-poison-system-directories.
(parse_args): Handle new option.
2007-06-13 Joseph Myers <joseph@codesourcery.com>
ld/
* config.in: Regenerate.
* ld.h (args_type): Add poison_system_directories.
* ld.texinfo (--no-poison-system-directories): Document.
* ldfile.c (ldfile_add_library_path): Check
command_line.poison_system_directories.
* ldmain.c (main): Initialize
command_line.poison_system_directories.
* lexsup.c (enum option_values): Add
OPTION_NO_POISON_SYSTEM_DIRECTORIES.
(ld_options): Add --no-poison-system-directories.
(parse_args): Handle new option.
2007-04-20 Joseph Myers <joseph@codesourcery.com>
Merge from Sourcery G++ binutils 2.17:
2007-03-20 Joseph Myers <joseph@codesourcery.com>
Based on patch by Mark Hatle <mark.hatle@windriver.com>.
ld/
* configure.ac (--enable-poison-system-directories): New option.
* configure, config.in: Regenerate.
* ldfile.c (ldfile_add_library_path): If
ENABLE_POISON_SYSTEM_DIRECTORIES defined, warn for use of /lib,
/usr/lib, /usr/local/lib or /usr/X11R6/lib.
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Scott Garman <scott.a.garman@intel.com>
---
ld/config.in | 3 +++
ld/configure | 14 ++++++++++++++
ld/configure.ac | 10 ++++++++++
ld/ld.h | 8 ++++++++
ld/ld.texi | 12 ++++++++++++
ld/ldfile.c | 17 +++++++++++++++++
ld/ldlex.h | 2 ++
ld/ldmain.c | 2 ++
ld/lexsup.c | 21 +++++++++++++++++++++
9 files changed, 89 insertions(+)
--- a/ld/config.in
+++ b/ld/config.in
@@ -31,6 +31,9 @@
language is requested. */
#undef ENABLE_NLS
+/* Define to warn for use of native system library directories */
+#undef ENABLE_POISON_SYSTEM_DIRECTORIES
+
/* Additional extension a shared object might have. */
#undef EXTRA_SHLIB_EXTENSION
--- a/ld/configure
+++ b/ld/configure
@@ -822,6 +822,7 @@
enable_targets
enable_64_bit_bfd
with_sysroot
+enable_poison_system_directories
enable_gold
enable_got
enable_compressed_debug_sections
@@ -1486,6 +1487,8 @@
--disable-largefile omit support for large files
--enable-targets alternative target configurations
--enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
+ --enable-poison-system-directories
+ warn for use of native system library directories
--enable-gold[=ARG] build gold [ARG={default,yes,no}]
--enable-got=<type> GOT handling scheme (target, single, negative,
multigot)
@@ -15803,7 +15806,18 @@
fi
+# Check whether --enable-poison-system-directories was given.
+if test "${enable_poison_system_directories+set}" = set; then :
+ enableval=$enable_poison_system_directories;
+else
+ enable_poison_system_directories=no
+fi
+
+if test "x${enable_poison_system_directories}" = "xyes"; then
+$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h
+
+fi
# Check whether --enable-got was given.
if test "${enable_got+set}" = set; then :
--- a/ld/configure.ac
+++ b/ld/configure.ac
@@ -94,6 +94,16 @@
AC_SUBST(TARGET_SYSTEM_ROOT)
AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE)
+AC_ARG_ENABLE([poison-system-directories],
+ AS_HELP_STRING([--enable-poison-system-directories],
+ [warn for use of native system library directories]),,
+ [enable_poison_system_directories=no])
+if test "x${enable_poison_system_directories}" = "xyes"; then
+ AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES],
+ [1],
+ [Define to warn for use of native system library directories])
+fi
+
dnl Use --enable-gold to decide if this linker should be the default.
dnl "install_as_default" is set to false if gold is the default linker.
dnl "installed_linker" is the installed BFD linker name.
--- a/ld/ld.h
+++ b/ld/ld.h
@@ -175,6 +175,14 @@
/* If set, display the target memory usage (per memory region). */
bfd_boolean print_memory_usage;
+ /* If TRUE (the default) warn for uses of system directories when
+ cross linking. */
+ bfd_boolean poison_system_directories;
+
+ /* If TRUE (default FALSE) give an error for uses of system
+ directories when cross linking instead of a warning. */
+ bfd_boolean error_poison_system_directories;
+
/* Should we force section groups to be resolved? Controlled with
--force-group-allocation on the command line or FORCE_GROUP_ALLOCATION
in the linker script. */
--- a/ld/ld.texi
+++ b/ld/ld.texi
@@ -2479,6 +2479,18 @@
Passing @code{none} for @var{style} disables the setting from any
@code{--build-id} options earlier on the command line.
+
+@kindex --no-poison-system-directories
+@item --no-poison-system-directories
+Do not warn for @option{-L} options using system directories such as
+@file{/usr/lib} when cross linking. This option is intended for use
+in chroot environments when such directories contain the correct
+libraries for the target system rather than the host.
+
+@kindex --error-poison-system-directories
+@item --error-poison-system-directories
+Give an error instead of a warning for @option{-L} options using
+system directories when cross linking.
@end table
@c man end
--- a/ld/ldfile.c
+++ b/ld/ldfile.c
@@ -116,6 +116,23 @@
new_dirs->name = concat (ld_sysroot, name + strlen ("$SYSROOT"), (const char *) NULL);
else
new_dirs->name = xstrdup (name);
+
+#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES
+ if (command_line.poison_system_directories
+ && ((!strncmp (name, "/lib", 4))
+ || (!strncmp (name, "/usr/lib", 8))
+ || (!strncmp (name, "/usr/local/lib", 14))
+ || (!strncmp (name, "/usr/X11R6/lib", 14))))
+ {
+ if (command_line.error_poison_system_directories)
+ einfo (_("%X%P: error: library search path \"%s\" is unsafe for "
+ "cross-compilation\n"), name);
+ else
+ einfo (_("%P: warning: library search path \"%s\" is unsafe for "
+ "cross-compilation\n"), name);
+ }
+#endif
+
}
/* Try to open a BFD for a lang_input_statement. */
--- a/ld/ldlex.h
+++ b/ld/ldlex.h
@@ -148,6 +148,8 @@
OPTION_REQUIRE_DEFINED_SYMBOL,
OPTION_ORPHAN_HANDLING,
OPTION_FORCE_GROUP_ALLOCATION,
+ OPTION_NO_POISON_SYSTEM_DIRECTORIES,
+ OPTION_ERROR_POISON_SYSTEM_DIRECTORIES,
};
/* The initial parser states. */
--- a/ld/ldmain.c
+++ b/ld/ldmain.c
@@ -268,6 +268,8 @@
command_line.warn_mismatch = TRUE;
command_line.warn_search_mismatch = TRUE;
command_line.check_section_addresses = -1;
+ command_line.poison_system_directories = TRUE;
+ command_line.error_poison_system_directories = FALSE;
/* We initialize DEMANGLING based on the environment variable
COLLECT_NO_DEMANGLE. The gcc collect2 program will demangle the
--- a/ld/lexsup.c
+++ b/ld/lexsup.c
@@ -543,6 +543,14 @@
{ {"orphan-handling", required_argument, NULL, OPTION_ORPHAN_HANDLING},
'\0', N_("=MODE"), N_("Control how orphan sections are handled."),
TWO_DASHES },
+ { {"no-poison-system-directories", no_argument, NULL,
+ OPTION_NO_POISON_SYSTEM_DIRECTORIES},
+ '\0', NULL, N_("Do not warn for -L options using system directories"),
+ TWO_DASHES },
+ { {"error-poison-system-directories", no_argument, NULL,
+ OPTION_ERROR_POISON_SYSTEM_DIRECTORIES},
+ '\0', NULL, N_("Give an error for -L options using system directories"),
+ TWO_DASHES },
};
#define OPTION_COUNT ARRAY_SIZE (ld_options)
@@ -555,6 +563,7 @@
int ingroup = 0;
char *default_dirlist = NULL;
char *shortopts;
+ char *BR_paranoid_env;
struct option *longopts;
struct option *really_longopts;
int last_optind;
@@ -1543,6 +1552,14 @@
}
break;
+ case OPTION_NO_POISON_SYSTEM_DIRECTORIES:
+ command_line.poison_system_directories = FALSE;
+ break;
+
+ case OPTION_ERROR_POISON_SYSTEM_DIRECTORIES:
+ command_line.error_poison_system_directories = TRUE;
+ break;
+
case OPTION_PUSH_STATE:
input_flags.pushed = xmemdup (&input_flags,
sizeof (input_flags),
@@ -1586,6 +1603,10 @@
command_line.soname = NULL;
}
+ BR_paranoid_env = getenv("BR_COMPILER_PARANOID_UNSAFE_PATH");
+ if (BR_paranoid_env && strlen(BR_paranoid_env) > 0)
+ command_line.error_poison_system_directories = TRUE;
+
while (ingroup)
{
lang_leave_group ();

12
packages/binutils/2.31.1/chksum vendored Normal file
View File

@ -0,0 +1,12 @@
md5 binutils-2.31.1.tar.xz 5b7c9d4ce96f507d95c1b9a255e52418
sha1 binutils-2.31.1.tar.xz 3b031410897fe224412f3a6a1b052402d2fbcc6a
sha256 binutils-2.31.1.tar.xz 5d20086ecf5752cc7d9134246e9588fa201740d540f7eb84d795b1f7a93bca86
sha512 binutils-2.31.1.tar.xz 0fca326feb1d5f5fe505a827b20237fe3ec9c13eaf7ec7e35847fd71184f605ba1cefe1314b1b8f8a29c0aa9d88162849ee1c1a3e70c2f7407d88339b17edb30
md5 binutils-2.31.1.tar.bz2 84edf97113788f106d6ee027f10b046a
sha1 binutils-2.31.1.tar.bz2 1c5b0801b4857031d5626d917808cbd5c6401a4b
sha256 binutils-2.31.1.tar.bz2 ffcc382695bf947da6135e7436b8ed52d991cf270db897190f19d6f9838564d0
sha512 binutils-2.31.1.tar.bz2 b42954e6f49a0adcd2676bdd77dfb59bfc25cec8184b007521d1e2b1d5d0593b58639e3d9448d5a40fe024c3cea386a37743627d6bb16d502f52a4a32b9573bd
md5 binutils-2.31.1.tar.gz b88812a18c7d850e015235c1cea75a23
sha1 binutils-2.31.1.tar.gz 1c18b9375eb1d3a1ee118ddbd9ab08bfd7dc7b27
sha256 binutils-2.31.1.tar.gz e88f8d36bd0a75d3765a4ad088d819e35f8d7ac6288049780e2fefcad18dde88
sha512 binutils-2.31.1.tar.gz 6e8867cacf58a6f79122ccee00afbb894c1709375580afc14b523dc7d123029bf2532f9f71e4c6c7072b2d708cc97a370c922d80fa17b3ee3ddeb49110cd749b

View File

@ -1,4 +0,0 @@
md5 expat-2.2.5.tar.bz2 789e297f547980fc9ecc036f9a070d49
sha1 expat-2.2.5.tar.bz2 490659abd7d6c6d4cb4e60c945a15fbf081564f6
sha256 expat-2.2.5.tar.bz2 d9dc32efba7e74f788fcc4f212a43216fc37cf5f23f4c2339664d473353aedf6
sha512 expat-2.2.5.tar.bz2 8226970a7e5d2b8d7818081758ca59bb6ce2d655feaa9d3a92481629000b73fde4782f50343d58ec4e1cebe75649e1980f636775a731d8aa4b55ceb843d9f637

4
packages/expat/2.2.6/chksum vendored Normal file
View File

@ -0,0 +1,4 @@
md5 expat-2.2.6.tar.bz2 ca047ae951b40020ac831c28859161b2
sha1 expat-2.2.6.tar.bz2 c8947fc3119a797b55485f2f7bdaaeb49cc9df01
sha256 expat-2.2.6.tar.bz2 17b43c2716d521369f82fc2dc70f359860e90fa440bea65b3b85f0b246ea81f2
sha512 expat-2.2.6.tar.bz2 dbfb635a5fe7b190722664263a0dd437b512fdf519bc53bd4905567f4bfb4b1e89a021562da63df8cacd48b706d1dea60ccde47f279e57400ad3c846b6e9c4e6

View File

@ -1,4 +0,0 @@
md5 gcc-linaro-6.4-2017.11.tar.xz 0620b19d8f58828b64c67513fb7c3476
sha1 gcc-linaro-6.4-2017.11.tar.xz 2f4a43b52e61215a4f4b608dc6a26dcd9fb61796
sha256 gcc-linaro-6.4-2017.11.tar.xz 3c17387177f15b855070ca42ed7f4f16b6b151b9216a445fd64a4463653492b3
sha512 gcc-linaro-6.4-2017.11.tar.xz f5f7803f16d4c3ca3f55b4dd8c89f9e2609eb2421ffa520c0adedc657b5bf47a9b1b80be627b7cf052817ffd913ad32423fe2091adcc7975d72149d443da9d01

View File

@ -53,7 +53,7 @@
if test x"$have_pic_shared" != x"yes" -o x"$ac_cv_search_dlopen" = x"no"; then
--- a/gcc/configure
+++ b/gcc/configure
@@ -29200,6 +29200,9 @@
@@ -29239,6 +29239,9 @@
pluginlibs=
@ -63,7 +63,7 @@
case "${host}" in
*-*-darwin*)
if test x$build = x$host; then
@@ -29210,6 +29213,11 @@
@@ -29249,6 +29252,11 @@
export_sym_check=
fi
;;
@ -75,7 +75,7 @@
*)
if test x$build = x$host; then
export_sym_check="objdump${exeext} -T"
@@ -29322,23 +29330,23 @@
@@ -29361,23 +29369,23 @@
case "${host}" in
*-*-darwin*)
CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g`

View File

@ -152,7 +152,7 @@ Date: Wed Jul 29 11:28:29 2015 +0300
#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
--- a/gcc/config/arm/arm.h
+++ b/gcc/config/arm/arm.h
@@ -1922,10 +1922,11 @@
@@ -1923,10 +1923,11 @@
#define CASE_VECTOR_PC_RELATIVE (TARGET_THUMB2 \
|| (TARGET_THUMB1 \
@ -167,7 +167,7 @@ Date: Wed Jul 29 11:28:29 2015 +0300
: min >= -256 && max < 256 \
--- a/gcc/config/arm/arm.md
+++ b/gcc/config/arm/arm.md
@@ -8657,7 +8657,7 @@
@@ -8654,7 +8654,7 @@
(match_operand:SI 2 "const_int_operand" "") ; total range
(match_operand:SI 3 "" "") ; table label
(match_operand:SI 4 "" "")] ; Out of range label
@ -446,7 +446,7 @@ Date: Wed Jul 29 11:28:29 2015 +0300
#if ((defined(_LIBOBJC) || defined(_LIBOBJC_WEAK)) \
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -78389,6 +78389,12 @@
@@ -78391,6 +78391,12 @@
/* end confdefs.h. */
#include <sys/syscall.h>
int lk;
@ -459,7 +459,7 @@ Date: Wed Jul 29 11:28:29 2015 +0300
int
main ()
{
@@ -78447,6 +78453,12 @@
@@ -78449,6 +78455,12 @@
/* end confdefs.h. */
#include <sys/syscall.h>
int lk;

View File

@ -26,7 +26,7 @@ Date: Mon Apr 14 15:59:47 2014 -0700
--- a/gcc/config.in
+++ b/gcc/config.in
@@ -2144,6 +2144,12 @@
@@ -2150,6 +2150,12 @@
#endif
@ -145,7 +145,7 @@ Date: Mon Apr 14 15:59:47 2014 -0700
--enable-linker-build-id
compiler will always pass --build-id to linker
--enable-default-ssp enable Stack Smashing Protection as default
@@ -27786,6 +27790,38 @@
@@ -27825,6 +27829,38 @@
$as_echo "#define HAVE_LD_EH_FRAME_HDR 1" >>confdefs.h
@ -186,7 +186,7 @@ Date: Mon Apr 14 15:59:47 2014 -0700
$as_echo "$gcc_cv_ld_eh_frame_hdr" >&6; }
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -4861,6 +4861,35 @@
@@ -4874,6 +4874,35 @@
if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
AC_DEFINE(HAVE_LD_EH_FRAME_HDR, 1,
[Define if your linker supports .eh_frame_hdr.])

View File

@ -12,7 +12,7 @@ Date: Thu Aug 20 19:11:07 2015 +0300
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -14690,6 +14690,7 @@
@@ -15020,6 +15020,7 @@
else if (!SYMBOL_REF_FAR_ADDR_P (op0)
&& (SYMBOL_REF_LOCAL_P (op0)
|| (HAVE_LD_PIE_COPYRELOC

View File

@ -15,7 +15,7 @@ Date: Mon Apr 14 21:05:51 2014 -0700
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -22178,9 +22178,13 @@
@@ -22205,9 +22205,13 @@
memsize = MEM_SIZE (x);
/* Only certain alignment specifiers are supported by the hardware. */

View File

@ -0,0 +1,4 @@
md5 gcc-linaro-6.4-2018.05.tar.xz a58a8b7166db4a01964d8f21b0f636e9
sha1 gcc-linaro-6.4-2018.05.tar.xz ef5ed3d31b356117162122fe450ca2bd91f9618f
sha256 gcc-linaro-6.4-2018.05.tar.xz c547014d687535ec2a72dae55edbf55621db220fffff257ea0beece83715ac2f
sha512 gcc-linaro-6.4-2018.05.tar.xz 91a1cc04efc72a1f5fda0a7a6797241eb218e6656eb7907f7a86210f452a3fc650815a5cd1bedfe9338b38d2609c17b1d4f09287495e485621dcb7458927a451

View File

@ -1,4 +0,0 @@
md5 gcc-linaro-7.2-2017.11.tar.xz 67f7ed9541b6117143a4b405529e984e
sha1 gcc-linaro-7.2-2017.11.tar.xz 7963644acea5208acac2f94f098c0dc90d0bfa51
sha256 gcc-linaro-7.2-2017.11.tar.xz 7b07095df50a10789f446cec421468f10c57fe8bb6a789a73dc758acf8475cb0
sha512 gcc-linaro-7.2-2017.11.tar.xz 9195cf66f312af286d63db1c07889b9bfed9ab44db2725c4cfb9a46cd7351961f4c5278b48a2bc35576719618ddf4239e2d84f386071fe1ca2171b76f109b564

View File

@ -53,7 +53,7 @@
if test x"$have_pic_shared" != x"yes" -o x"$ac_cv_search_dlopen" = x"no"; then
--- a/gcc/configure
+++ b/gcc/configure
@@ -29479,6 +29479,9 @@
@@ -29519,6 +29519,9 @@
pluginlibs=
@ -63,7 +63,7 @@
case "${host}" in
*-*-darwin*)
if test x$build = x$host; then
@@ -29489,6 +29492,11 @@
@@ -29529,6 +29532,11 @@
export_sym_check=
fi
;;
@ -75,7 +75,7 @@
*)
if test x$build = x$host; then
export_sym_check="objdump${exeext} -T"
@@ -29601,23 +29609,23 @@
@@ -29641,23 +29649,23 @@
case "${host}" in
*-*-darwin*)
CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g`

View File

@ -52,7 +52,7 @@ Date: Wed Jul 29 11:28:29 2015 +0300
esac
aarch64_multilibs="${with_multilib_list}"
if test "$aarch64_multilibs" = "default"; then
@@ -2084,6 +2088,17 @@
@@ -2092,6 +2096,17 @@
tm_file="dbxelf.h elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h ${tm_file} mips/gnu-user.h mips/linux.h mips/linux-common.h"
extra_options="${extra_options} linux-android.opt"
case ${target} in
@ -152,7 +152,7 @@ Date: Wed Jul 29 11:28:29 2015 +0300
#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
--- a/gcc/config/arm/arm.h
+++ b/gcc/config/arm/arm.h
@@ -1878,10 +1878,11 @@
@@ -1885,10 +1885,11 @@
#define CASE_VECTOR_PC_RELATIVE (TARGET_THUMB2 \
|| (TARGET_THUMB1 \
@ -167,7 +167,7 @@ Date: Wed Jul 29 11:28:29 2015 +0300
: min >= -256 && max < 256 \
--- a/gcc/config/arm/arm.md
+++ b/gcc/config/arm/arm.md
@@ -8741,7 +8741,7 @@
@@ -8738,7 +8738,7 @@
(match_operand:SI 2 "const_int_operand" "") ; total range
(match_operand:SI 3 "" "") ; table label
(match_operand:SI 4 "" "")] ; Out of range label
@ -445,7 +445,7 @@ Date: Wed Jul 29 11:28:29 2015 +0300
#if ((defined(_LIBOBJC) || defined(_LIBOBJC_WEAK)) \
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -78536,6 +78536,12 @@
@@ -78564,6 +78564,12 @@
/* end confdefs.h. */
#include <sys/syscall.h>
int lk;
@ -458,7 +458,7 @@ Date: Wed Jul 29 11:28:29 2015 +0300
int
main ()
{
@@ -78594,6 +78600,12 @@
@@ -78622,6 +78628,12 @@
/* end confdefs.h. */
#include <sys/syscall.h>
int lk;

View File

@ -26,7 +26,7 @@ Date: Mon Apr 14 15:59:47 2014 -0700
--- a/gcc/config.in
+++ b/gcc/config.in
@@ -2180,6 +2180,12 @@
@@ -2186,6 +2186,12 @@
#endif
@ -145,7 +145,7 @@ Date: Mon Apr 14 15:59:47 2014 -0700
--enable-linker-build-id
compiler will always pass --build-id to linker
--enable-default-ssp enable Stack Smashing Protection as default
@@ -28051,6 +28055,38 @@
@@ -28091,6 +28095,38 @@
$as_echo "#define HAVE_LD_EH_FRAME_HDR 1" >>confdefs.h
@ -186,7 +186,7 @@ Date: Mon Apr 14 15:59:47 2014 -0700
$as_echo "$gcc_cv_ld_eh_frame_hdr" >&6; }
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -4981,6 +4981,35 @@
@@ -4994,6 +4994,35 @@
if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
AC_DEFINE(HAVE_LD_EH_FRAME_HDR, 1,
[Define if your linker supports .eh_frame_hdr.])

View File

@ -12,7 +12,7 @@ Date: Thu Aug 20 19:11:07 2015 +0300
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -15763,6 +15763,7 @@
@@ -16103,6 +16103,7 @@
else if (!SYMBOL_REF_FAR_ADDR_P (op0)
&& (SYMBOL_REF_LOCAL_P (op0)
|| (HAVE_LD_PIE_COPYRELOC

View File

@ -15,7 +15,7 @@ Date: Mon Apr 14 21:05:51 2014 -0700
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -22293,9 +22293,13 @@
@@ -22325,9 +22325,13 @@
memsize = MEM_SIZE (x);
/* Only certain alignment specifiers are supported by the hardware. */

View File

@ -0,0 +1,4 @@
md5 gcc-linaro-7.3-2018.05.tar.xz bc996f77c8c893f227f5b6057cc3765c
sha1 gcc-linaro-7.3-2018.05.tar.xz 9e74ddeaa3576a60fc6927bcf8f0a748754d3839
sha256 gcc-linaro-7.3-2018.05.tar.xz 5864b46120e120949413ab698a5104cfd43b82246254cc4928a2d9e8cc1884e7
sha512 gcc-linaro-7.3-2018.05.tar.xz 8cdb7603c305299b1fa2e4f109a727857e13f5440e2662b982871bb096eb7c9a71804b3c68dc6c0f27cb0491dc77dec766497c7bf98d08d2b71bc91ecaa35377

View File

@ -1,402 +0,0 @@
From cc11539ff23bd2c3136f826a18d8010ac34dc518 Mon Sep 17 00:00:00 2001
From: Claudiu Zissulescu <claziss@synopsys.com>
Date: Fri, 24 Mar 2017 11:55:54 +0100
Subject: [PATCH] [ARC] Reimplement return padding operation for ARC700.
For ARC700, adding padding if necessary to avoid a mispredict. A
return could happen immediately after the function start. A
call/return and return/return must be 6 bytes apart to avoid
mispredict.
The old implementation was doing this operation very late in the
compilation process, and the additional nop instructions and/or
forcing some other instruction to take their long form was not taken
into account when generating brcc instructions. Thus, wrong code could
be generated.
gcc/
2017-03-24 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc-protos.h (arc_pad_return): Remove.
* config/arc/arc.c (machine_function): Remove force_short_suffix
and size_reason.
(arc_print_operand): Adjust printing of '&'.
(arc_verify_short): Remove conditional printing of short suffix.
(arc_final_prescan_insn): Remove reference to size_reason.
(pad_return): New function.
(arc_reorg): Call pad_return.
(arc_pad_return): Remove.
(arc_init_machine_status): Remove reference to force_short_suffix.
* config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
(attr length): When attribute iscompact is true force to 2
regardless; in the case of maybe check if we want to force the
instruction to have 4 bytes length.
(nopv): Change it to generate 4 byte long nop as well.
(blockage): New pattern.
(simple_return): Remove call to arc_pad_return.
(p_return_i): Likewise.
gcc/testsuite/
2017-03-24 Claudiu Zissulescu <claziss@synopsys.com>
* gcc.target/arc/pr9001107555.c: New file.
---
gcc/config/arc/arc-protos.h | 1 -
gcc/config/arc/arc.c | 156 +++++++++-----------
gcc/config/arc/arc.md | 26 +++-
gcc/testsuite/gcc.target/arc/pr9001107555.c | 38 +++++
4 files changed, 128 insertions(+), 93 deletions(-)
create mode 100644 gcc/testsuite/gcc.target/arc/pr9001107555.c
diff --git a/gcc/config/arc/arc-protos.h b/gcc/config/arc/arc-protos.h
index 0ba6871628ad..cb5909564eac 100644
--- a/gcc/config/arc/arc-protos.h
+++ b/gcc/config/arc/arc-protos.h
@@ -93,7 +93,6 @@ extern void arc_clear_unalign (void);
extern void arc_toggle_unalign (void);
extern void split_addsi (rtx *);
extern void split_subsi (rtx *);
-extern void arc_pad_return (void);
extern void arc_split_move (rtx *);
extern const char *arc_short_long (rtx_insn *insn, const char *, const char *);
extern rtx arc_regno_use_in (unsigned int, rtx);
diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c
index 2e6fbcb70c6c..79c2d72b4cb3 100644
--- a/gcc/config/arc/arc.c
+++ b/gcc/config/arc/arc.c
@@ -2564,8 +2564,6 @@ typedef struct GTY (()) machine_function
struct arc_frame_info frame_info;
/* To keep track of unalignment caused by short insns. */
int unalign;
- int force_short_suffix; /* Used when disgorging return delay slot insns. */
- const char *size_reason;
struct arc_ccfsm ccfsm_current;
/* Map from uid to ccfsm state during branch shortening. */
rtx ccfsm_current_insn;
@@ -4220,7 +4218,7 @@ arc_print_operand (FILE *file, rtx x, int code)
}
break;
case '&':
- if (TARGET_ANNOTATE_ALIGN && cfun->machine->size_reason)
+ if (TARGET_ANNOTATE_ALIGN)
fprintf (file, "; unalign: %d", cfun->machine->unalign);
return;
case '+':
@@ -4906,7 +4904,6 @@ static int
arc_verify_short (rtx_insn *insn, int, int check_attr)
{
enum attr_iscompact iscompact;
- struct machine_function *machine;
if (check_attr > 0)
{
@@ -4914,10 +4911,6 @@ arc_verify_short (rtx_insn *insn, int, int check_attr)
if (iscompact == ISCOMPACT_FALSE)
return 0;
}
- machine = cfun->machine;
-
- if (machine->force_short_suffix >= 0)
- return machine->force_short_suffix;
return (get_attr_length (insn) & 2) != 0;
}
@@ -4956,8 +4949,6 @@ arc_final_prescan_insn (rtx_insn *insn, rtx *opvec ATTRIBUTE_UNUSED,
cfun->machine->prescan_initialized = 1;
}
arc_ccfsm_advance (insn, &arc_ccfsm_current);
-
- cfun->machine->size_reason = 0;
}
/* Given FROM and TO register numbers, say whether this elimination is allowed.
@@ -7599,6 +7590,76 @@ jli_call_scan (void)
}
}
+/* Add padding if necessary to avoid a mispredict. A return could
+ happen immediately after the function start. A call/return and
+ return/return must be 6 bytes apart to avoid mispredict. */
+
+static void
+pad_return (void)
+{
+ rtx_insn *insn;
+ long offset;
+
+ if (!TARGET_PAD_RETURN)
+ return;
+
+ for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
+ {
+ rtx_insn *prev0 = prev_active_insn (insn);
+ bool wantlong = false;
+
+ if (!INSN_P (insn) || GET_CODE (PATTERN (insn)) != SIMPLE_RETURN)
+ continue;
+
+ if (!prev0)
+ {
+ prev0 = emit_insn_before (gen_nopv (), insn);
+ /* REG_SAVE_NOTE is used by Haifa scheduler, we are in reorg
+ so it is safe to reuse it for forcing a particular length
+ for an instruction. */
+ add_reg_note (prev0, REG_SAVE_NOTE, GEN_INT (1));
+ emit_insn_before (gen_nopv (), insn);
+ continue;
+ }
+ offset = get_attr_length (prev0);
+
+ if (get_attr_length (prev0) == 2
+ && get_attr_iscompact (prev0) != ISCOMPACT_TRUE)
+ {
+ /* Force long version of the insn. */
+ wantlong = true;
+ offset += 2;
+ }
+
+ rtx_insn *prev = prev_active_insn (prev0);
+ if (prev)
+ offset += get_attr_length (prev);
+
+ prev = prev_active_insn (prev);
+ if (prev)
+ offset += get_attr_length (prev);
+
+ switch (offset)
+ {
+ case 2:
+ prev = emit_insn_before (gen_nopv (), insn);
+ add_reg_note (prev, REG_SAVE_NOTE, GEN_INT (1));
+ break;
+ case 4:
+ emit_insn_before (gen_nopv (), insn);
+ break;
+ default:
+ continue;
+ }
+
+ if (wantlong)
+ add_reg_note (prev0, REG_SAVE_NOTE, GEN_INT (1));
+
+ /* Emit a blockage to avoid delay slot scheduling. */
+ emit_insn_before (gen_blockage(), insn);
+ }
+}
+
static int arc_reorg_in_progress = 0;
/* ARC's machince specific reorg function. */
@@ -7624,6 +7685,7 @@ arc_reorg (void)
workaround_arc_anomaly ();
jli_call_scan ();
+ pad_return ();
/* FIXME: should anticipate ccfsm action, generate special patterns for
to-be-deleted branches that have no delay slot and have at least the
@@ -9332,79 +9394,6 @@ arc_branch_size_unknown_p (void)
return !optimize_size && arc_reorg_in_progress;
}
-/* We are about to output a return insn. Add padding if necessary to avoid
- a mispredict. A return could happen immediately after the function
- start, but after a call we know that there will be at least a blink
- restore. */
-
-void
-arc_pad_return (void)
-{
- rtx_insn *insn = current_output_insn;
- rtx_insn *prev = prev_active_insn (insn);
- int want_long;
-
- if (!prev)
- {
- fputs ("\tnop_s\n", asm_out_file);
- cfun->machine->unalign ^= 2;
- want_long = 1;
- }
- /* If PREV is a sequence, we know it must be a branch / jump or a tailcall,
- because after a call, we'd have to restore blink first. */
- else if (GET_CODE (PATTERN (prev)) == SEQUENCE)
- return;
- else
- {
- want_long = (get_attr_length (prev) == 2);
- prev = prev_active_insn (prev);
- }
- if (!prev
- || ((NONJUMP_INSN_P (prev) && GET_CODE (PATTERN (prev)) == SEQUENCE)
- ? CALL_ATTR (as_a <rtx_sequence *> (PATTERN (prev))->insn (0),
- NON_SIBCALL)
- : CALL_ATTR (prev, NON_SIBCALL)))
- {
- if (want_long)
- cfun->machine->size_reason
- = "call/return and return/return must be 6 bytes apart to avoid mispredict";
- else if (TARGET_UNALIGN_BRANCH && cfun->machine->unalign)
- {
- cfun->machine->size_reason
- = "Long unaligned jump avoids non-delay slot penalty";
- want_long = 1;
- }
- /* Disgorge delay insn, if there is any, and it may be moved. */
- if (final_sequence
- /* ??? Annulled would be OK if we can and do conditionalize
- the delay slot insn accordingly. */
- && !INSN_ANNULLED_BRANCH_P (insn)
- && (get_attr_cond (insn) != COND_USE
- || !reg_set_p (gen_rtx_REG (CCmode, CC_REG),
- XVECEXP (final_sequence, 0, 1))))
- {
- prev = as_a <rtx_insn *> (XVECEXP (final_sequence, 0, 1));
- gcc_assert (!prev_real_insn (insn)
- || !arc_hazard (prev_real_insn (insn), prev));
- cfun->machine->force_short_suffix = !want_long;
- rtx save_pred = current_insn_predicate;
- final_scan_insn (prev, asm_out_file, optimize, 1, NULL);
- cfun->machine->force_short_suffix = -1;
- prev->set_deleted ();
- current_output_insn = insn;
- current_insn_predicate = save_pred;
- }
- else if (want_long)
- fputs ("\tnop\n", asm_out_file);
- else
- {
- fputs ("\tnop_s\n", asm_out_file);
- cfun->machine->unalign ^= 2;
- }
- }
- return;
-}
-
/* The usual; we set up our machine_function data. */
static struct machine_function *
@@ -9413,7 +9402,6 @@ arc_init_machine_status (void)
struct machine_function *machine;
machine = ggc_cleared_alloc<machine_function> ();
machine->fn_type = ARC_FUNCTION_UNKNOWN;
- machine->force_short_suffix = -1;
return machine;
}
diff --git a/gcc/config/arc/arc.md b/gcc/config/arc/arc.md
index d19e99daca72..fcc6e0692dd1 100644
--- a/gcc/config/arc/arc.md
+++ b/gcc/config/arc/arc.md
@@ -161,6 +161,7 @@
VUNSPEC_ARC_CAS
VUNSPEC_ARC_SC
VUNSPEC_ARC_LL
+ VUNSPEC_ARC_BLOCKAGE
])
(define_constants
@@ -384,13 +385,18 @@
;; and insn lengths: insns with shimm values cannot be conditionally executed.
(define_attr "length" ""
(cond
- [(eq_attr "iscompact" "true,maybe")
+ [(eq_attr "iscompact" "true")
+ (const_int 2)
+
+ (eq_attr "iscompact" "maybe")
(cond
[(eq_attr "type" "sfunc")
(cond [(match_test "GET_CODE (PATTERN (insn)) == COND_EXEC")
(const_int 12)]
(const_int 10))
- (match_test "GET_CODE (PATTERN (insn)) == COND_EXEC") (const_int 4)]
+ (match_test "GET_CODE (PATTERN (insn)) == COND_EXEC") (const_int 4)
+ (match_test "find_reg_note (insn, REG_SAVE_NOTE, GEN_INT (1))")
+ (const_int 4)]
(const_int 2))
(eq_attr "iscompact" "true_limm")
@@ -4438,8 +4444,16 @@
""
"nop%?"
[(set_attr "type" "misc")
- (set_attr "iscompact" "true")
- (set_attr "length" "2")])
+ (set_attr "iscompact" "maybe")
+ (set_attr "length" "*")])
+
+(define_insn "blockage"
+ [(unspec_volatile [(const_int 0)] VUNSPEC_ARC_BLOCKAGE)]
+ ""
+ ""
+ [(set_attr "length" "0")
+ (set_attr "type" "block")]
+)
;; Split up troublesome insns for better scheduling.
@@ -4984,8 +4998,6 @@
{
return \"rtie\";
}
- if (TARGET_PAD_RETURN)
- arc_pad_return ();
output_asm_insn (\"j%!%* [%0]%&\", &reg);
return \"\";
}
@@ -5029,8 +5041,6 @@
arc_return_address_register (arc_compute_function_type
(cfun)));
- if (TARGET_PAD_RETURN)
- arc_pad_return ();
output_asm_insn (\"j%d0%!%# [%1]%&\", xop);
/* record the condition in case there is a delay insn. */
arc_ccfsm_record_condition (xop[0], false, insn, 0);
diff --git a/gcc/testsuite/gcc.target/arc/pr9001107555.c b/gcc/testsuite/gcc.target/arc/pr9001107555.c
new file mode 100644
index 000000000000..134426d33d93
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/pr9001107555.c
@@ -0,0 +1,38 @@
+/* { dg-do assemble } *
+/* { dg-skip-if "" { ! { clmcpu } } } */
+/* { dg-options "-O3 -w -funroll-loops -mno-sdata -mcpu=arc700" } */
+
+typedef a __attribute__((__mode__(__DI__)));
+typedef struct c c;
+struct b {
+ int d;
+ c *e
+};
+enum { f };
+typedef struct {
+ a g;
+ a h;
+ int i
+} j;
+struct c {
+ int count;
+ int current
+};
+k;
+l(struct b *demux, __builtin_va_list args) {
+ c m = *demux->e;
+ j *n;
+ switch (k)
+ case f: {
+ a o = __builtin_va_arg(args, a);
+ m.current = 0;
+ while (m.current < m.count) {
+ if (n[m.current].h > o) {
+ p(demux->d, 4 + 128LL * n[m.current].i);
+ break;
+ }
+ m.current++;
+ }
+ return 0;
+ }
+}
--
2.17.0

View File

@ -1,52 +0,0 @@
commit f18d79595db4ae88dbd40d73bb2d1ea191a756a1
Author: rearnsha <rearnsha@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Mon Jun 4 08:41:45 2018 +0000
[arm] PR target/86003 build failures with --with-cpu=xscale
The XScale cpu configuration in GCC has always been somewhat
non-conforming. Although XScale isn't an architecture (it's simply an
implementation of ARMv5te), we do by tradition emit a specific
pre-define for it. We achieve this effect by adding an additional
feature bit to the xscale CPU definition that isn't part of the base
architecture.
When I restructured the options last year I overlooked this oddity and
the result, of course, is that this configuration now fails to build
as intended.
What happens is that the driver (correctly) constructs an architecture
for the xscale cpu name (as armv5te) and passes it in addition to the
CPU name. The backend code, on finding both a cpu and an architecture
specifies attempts to correlate the two and finds a difference due to
the additional feature bit and reports an inconsistency (fatally if
-werror is specified).
I think the best fix to this is to treat the xscale feature bit using
the same mechanism that we use for other 'quirks' in CPU
implementations and simply filter it out before comparing the
capabilities. It has the additional benefit that it's also the
simplest fix.
PR target/86003
* config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
of bits to ignore when comparing architectures.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261140 138bc75d-0d04-0410-961f-82ee72b054a4
diff --git a/gcc/config/arm/arm-cpus.in b/gcc/config/arm/arm-cpus.in
index aec73b5cae0..661bf1a573c 100644
--- a/gcc/config/arm/arm-cpus.in
+++ b/gcc/config/arm/arm-cpus.in
@@ -254,7 +254,9 @@ define fgroup DOTPROD NEON dotprod
# List of all quirk bits to strip out when comparing CPU features with
# architectures.
-define fgroup ALL_QUIRKS quirk_no_volatile_ce quirk_armv6kz quirk_cm3_ldrd
+# xscale isn't really a 'quirk', but it isn't an architecture either and we
+# need to ignore it for matching purposes.
+define fgroup ALL_QUIRKS quirk_no_volatile_ce quirk_armv6kz quirk_cm3_ldrd xscale
# Architecture entries
# format:

View File

@ -1,35 +0,0 @@
From f191ab7e686b13f77ccb8de52674f7777dbaa0fc Mon Sep 17 00:00:00 2001
From: Alexey Brodkin <abrodkin@synopsys.com>
Date: Wed, 16 May 2018 15:06:53 +0300
Subject: [PATCH] ARC: Don't mention not yet supported hs4xy CPUs
hs4x and hs4xd were mistakenly mentioned in MULTILIB_OPTION/DIRNAMES
before real support of those CPUs was accepted in upstream.
That breaks multilib toolchains building becase we're trying to compile
for not yet known CPU.
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
---
gcc/config/arc/t-multilib | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/config/arc/t-multilib b/gcc/config/arc/t-multilib
index d9ab0ca1da3c..08add5492f0b 100644
--- a/gcc/config/arc/t-multilib
+++ b/gcc/config/arc/t-multilib
@@ -21,9 +21,9 @@
# along with GCC; see the file COPYING3. If not see
# <http://www.gnu.org/licenses/>.
-MULTILIB_OPTIONS = mcpu=em/mcpu=em_mini/mcpu=arcem/mcpu=em4/mcpu=em4_dmips/mcpu=em4_fpus/mcpu=em4_fpuda/mcpu=quarkse_em/mcpu=hs/mcpu=archs/mcpu=hs34/mcpu=hs38/mcpu=hs38_linux/mcpu=hs4x/mcpu=hs4xd/mcpu=arc600/mcpu=arc600_norm/mcpu=arc600_mul64/mcpu=arc600_mul32x16/mcpu=arc601/mcpu=arc601_norm/mcpu=arc601_mul64/mcpu=arc601_mul32x16/mcpu=arc700/mcpu=nps400
+MULTILIB_OPTIONS = mcpu=em/mcpu=em_mini/mcpu=arcem/mcpu=em4/mcpu=em4_dmips/mcpu=em4_fpus/mcpu=em4_fpuda/mcpu=quarkse_em/mcpu=hs/mcpu=archs/mcpu=hs34/mcpu=hs38/mcpu=hs38_linux/mcpu=arc600/mcpu=arc600_norm/mcpu=arc600_mul64/mcpu=arc600_mul32x16/mcpu=arc601/mcpu=arc601_norm/mcpu=arc601_mul64/mcpu=arc601_mul32x16/mcpu=arc700/mcpu=nps400
-MULTILIB_DIRNAMES = em em_mini arcem em4 em4_dmips em4_fpus em4_fpuda quarkse_em hs archs hs34 hs38 hs38_linux hs4x hs4xd arc600 arc600_norm arc600_mul64 arc600_mul32x16 arc601 arc601_norm arc601_mul64 arc601_mul32x16 arc700 nps400
+MULTILIB_DIRNAMES = em em_mini arcem em4 em4_dmips em4_fpus em4_fpuda quarkse_em hs archs hs34 hs38 hs38_linux arc600 arc600_norm arc600_mul64 arc600_mul32x16 arc601 arc601_norm arc601_mul64 arc601_mul32x16 arc700 nps400
# Aliases:
MULTILIB_MATCHES = mcpu?arc600=mcpu?ARC600
--
2.17.0

View File

@ -1,101 +0,0 @@
From 5a5636f22679a69c60519e14a0d3dae908ea1cca Mon Sep 17 00:00:00 2001
From: jcmvbkbc <jcmvbkbc@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Tue, 19 Jun 2018 18:26:07 +0000
Subject: [PATCH] xtensa: fix PR target/65416
The issue is caused by reordering of stack pointer update after stack
space allocation with instructions that write to the allocated stack
space. In windowed ABI register spill area for the previous call frame
is located just below the stack pointer and may be reloaded back into
the register file on movsp.
Implement allocate_stack pattern for windowed ABI configuration and
insert an instruction that prevents reordering of frame memory access
and stack pointer update.
gcc/
2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
* config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
constant.
(allocate_stack, frame_blockage, *frame_blockage): New patterns.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261755 138bc75d-0d04-0410-961f-82ee72b054a4
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
gcc/config/xtensa/xtensa.md | 46 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 46 insertions(+)
diff --git a/gcc/config/xtensa/xtensa.md b/gcc/config/xtensa/xtensa.md
index 84967dbedc08..209f839cfb0f 100644
--- a/gcc/config/xtensa/xtensa.md
+++ b/gcc/config/xtensa/xtensa.md
@@ -38,6 +38,7 @@
(UNSPEC_MEMW 11)
(UNSPEC_LSETUP_START 12)
(UNSPEC_LSETUP_END 13)
+ (UNSPEC_FRAME_BLOCKAGE 14)
(UNSPECV_SET_FP 1)
(UNSPECV_ENTRY 2)
@@ -1676,6 +1677,32 @@
;; Miscellaneous instructions.
+;; In windowed ABI stack pointer adjustment must happen before any access
+;; to the space allocated on stack is allowed, otherwise register spill
+;; area may be clobbered. That's what frame blockage is supposed to enforce.
+
+(define_expand "allocate_stack"
+ [(set (match_operand 0 "nonimmed_operand")
+ (minus (reg A1_REG) (match_operand 1 "add_operand")))
+ (set (reg A1_REG)
+ (minus (reg A1_REG) (match_dup 1)))]
+ "TARGET_WINDOWED_ABI"
+{
+ if (CONST_INT_P (operands[1]))
+ {
+ rtx neg_op0 = GEN_INT (-INTVAL (operands[1]));
+ emit_insn (gen_addsi3 (stack_pointer_rtx, stack_pointer_rtx, neg_op0));
+ }
+ else
+ {
+ emit_insn (gen_subsi3 (stack_pointer_rtx, stack_pointer_rtx,
+ operands[1]));
+ }
+ emit_move_insn (operands[0], virtual_stack_dynamic_rtx);
+ emit_insn (gen_frame_blockage ());
+ DONE;
+})
+
(define_expand "prologue"
[(const_int 0)]
""
@@ -1767,6 +1794,25 @@
[(set_attr "length" "0")
(set_attr "type" "nop")])
+;; Do not schedule instructions accessing memory before this point.
+
+(define_expand "frame_blockage"
+ [(set (match_dup 0)
+ (unspec:BLK [(match_dup 1)] UNSPEC_FRAME_BLOCKAGE))]
+ ""
+{
+ operands[0] = gen_rtx_MEM (BLKmode, gen_rtx_SCRATCH (Pmode));
+ MEM_VOLATILE_P (operands[0]) = 1;
+ operands[1] = stack_pointer_rtx;
+})
+
+(define_insn "*frame_blockage"
+ [(set (match_operand:BLK 0 "" "")
+ (unspec:BLK [(match_operand:SI 1 "" "")] UNSPEC_FRAME_BLOCKAGE))]
+ ""
+ ""
+ [(set_attr "length" "0")])
+
(define_insn "trap"
[(trap_if (const_int 1) (const_int 0))]
""
--
2.11.0

View File

@ -1,8 +0,0 @@
md5 gcc-8.1.0.tar.xz 65f7c65818dc540b3437605026d329fc
sha1 gcc-8.1.0.tar.xz b34031ba9ff3e248b2c62de0825e49a1e0e01998
sha256 gcc-8.1.0.tar.xz 1d1866f992626e61349a1ccd0b8d5253816222cdc13390dcfaa74b093aa2b153
sha512 gcc-8.1.0.tar.xz c96246f34a7aeb404c4525b754dc7f7708a18e06271aadb2b32fef00e6e0940f584e52430bfe2ab01e699c93e3cb418adc113d2622fa826facbec0ec8ce3eb2c
md5 gcc-8.1.0.tar.gz 6a1fabd167fe98c11857181c210fc743
sha1 gcc-8.1.0.tar.gz f6ec34a732f7c384a54afcb610a4861ccd6bde96
sha256 gcc-8.1.0.tar.gz af300723841062db6ae24e38e61aaf4fbf3f6e5d9fd3bf60ebbdbf95db4e9f09
sha512 gcc-8.1.0.tar.gz 4655d31c729e82888a5ee18dd99ef4573a6d4434885e358c9231c795373f16016ad89db3204e297add81995974aff8eb5de82efa1ad9f56827e67c9994a6dee1

View File

@ -53,7 +53,7 @@ Date: Wed Jul 29 11:28:29 2015 +0300
esac
aarch64_multilibs="${with_multilib_list}"
if test "$aarch64_multilibs" = "default"; then
@@ -2128,6 +2132,17 @@
@@ -2130,6 +2134,17 @@
tm_file="dbxelf.h elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h ${tm_file} mips/gnu-user.h mips/linux.h mips/linux-common.h"
extra_options="${extra_options} linux-android.opt"
case ${target} in
@ -446,7 +446,7 @@ Date: Wed Jul 29 11:28:29 2015 +0300
#if ((defined(_LIBOBJC) || defined(_LIBOBJC_WEAK)) \
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -78478,6 +78478,18 @@
@@ -78491,6 +78491,18 @@
/* end confdefs.h. */
#include <sys/syscall.h>
int lk;

View File

@ -12,7 +12,7 @@ Date: Thu Aug 20 19:11:07 2015 +0300
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -15913,6 +15913,7 @@
@@ -15916,6 +15916,7 @@
else if (!SYMBOL_REF_FAR_ADDR_P (op0)
&& (SYMBOL_REF_LOCAL_P (op0)
|| (HAVE_LD_PIE_COPYRELOC

View File

@ -22,16 +22,14 @@ gcc/
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@260434 138bc75d-0d04-0410-961f-82ee72b054a4
---
gcc/config.gcc | 2 +-
gcc/config/arc/t-multilib-linux | 25 +++++++++++++++++++++++++
gcc/config.gcc | 2 +-
gcc/config/arc/t-multilib-linux | 25 +++++++++++++++++++++++++
2 files changed, 26 insertions(+), 1 deletion(-)
create mode 100644 gcc/config/arc/t-multilib-linux
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 96ae6a88a0db..d73e2cbc99a1 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -1061,7 +1061,7 @@ arc*-*-elf*)
@@ -1063,7 +1063,7 @@
;;
arc*-*-linux*)
tm_file="arc/arc-arch.h dbxelf.h elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h arc/linux.h ${tm_file}"
@ -40,9 +38,6 @@ index 96ae6a88a0db..d73e2cbc99a1 100644
extra_gcc_objs="driver-arc.o"
if test "x$with_cpu" != x; then
tm_defines="${tm_defines} TARGET_CPU_BUILD=PROCESSOR_$with_cpu"
diff --git a/gcc/config/arc/t-multilib-linux b/gcc/config/arc/t-multilib-linux
new file mode 100644
index 000000000000..f357cfc3f926
--- /dev/null
+++ b/gcc/config/arc/t-multilib-linux
@@ -0,0 +1,25 @@
@ -71,6 +66,3 @@ index 000000000000..f357cfc3f926
+# Aliases:
+MULTILIB_MATCHES += mcpu?arc700=mA7
+MULTILIB_MATCHES += mcpu?arc700=mARC700
--
2.17.0

8
packages/gcc/8.2.0/chksum vendored Normal file
View File

@ -0,0 +1,8 @@
md5 gcc-8.2.0.tar.xz 4ab282f414676496483b3e1793d07862
sha1 gcc-8.2.0.tar.xz 19926bdb6c4b58891015929853d41aeff019d400
sha256 gcc-8.2.0.tar.xz 196c3c04ba2613f893283977e6011b2345d1cd1af9abeac58e916b1aab3e0080
sha512 gcc-8.2.0.tar.xz 64898a165f67e136d802a92e7633bf1b06c85266027e52127ea025bf5fc2291b5e858288aac0bdba246e6cdf7c6ec88bc8e0e7f3f6f1985f4297710cafde56ed
md5 gcc-8.2.0.tar.gz ee04f0c22a941f5f17d93809387f2729
sha1 gcc-8.2.0.tar.gz 3895bb765c2ceecccd6dee86467f6d1bb1994cbd
sha256 gcc-8.2.0.tar.gz 1b0f36be1045ff58cbb9c83743835367b860810f17f0195a4e093458b372020f
sha512 gcc-8.2.0.tar.gz 3182cd248a37ce4c36ad2a43f1910da13325452472ea80855afc21f134c4e4792c29887f5e070fe21c3ff8e5953e59f69343e1d3b968ee1eb2d8b5c8ae9f48fa

Some files were not shown because too many files have changed in this diff Show More