From: Alexey Brodkin Date: Wed, 18 May 2016 21:26:46 +0000 (+0300) Subject: toolchain: bump ARC tools to arc-2016.03 release X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=09439560b9f959e4477155eb1b2963e33c43db73;p=buildroot.git toolchain: bump ARC tools to arc-2016.03 release This change switches ARC tools to the most recent arc-2016.03 version. ARC GNU tools of version arc-2016.03 bring some quite significant changes like: * Binutils v2.26+ (upstream commit id 202ac19 with additional ARC * patches) * GCC v4.8.5 * GDB 7.10 More about changes, improvements and fixes could be found here: https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases/tag/arc-2016.03 Note in this change we're adding sha512 checksums for both binutils and gcc tarballs fetched from GitHub. Build and run-tested in nSIM for both ARC700 and ARC HS38. Signed-off-by: Alexey Brodkin Cc: Thomas Petazzoni Cc: Peter Korsgaard Signed-off-by: Peter Korsgaard --- diff --git a/package/binutils/Config.in.host b/package/binutils/Config.in.host index 33159ca4ab..efdc840663 100644 --- a/package/binutils/Config.in.host +++ b/package/binutils/Config.in.host @@ -26,7 +26,7 @@ endchoice config BR2_BINUTILS_VERSION string - default "arc-2016.03-rc2" if BR2_arc + default "arc-2016.03" if BR2_arc default "2.24" if BR2_BINUTILS_VERSION_2_24_X default "2.25.1" if BR2_BINUTILS_VERSION_2_25_X default "2.26" if BR2_BINUTILS_VERSION_2_26_X diff --git a/package/binutils/arc-2016.03-rc2/0300-ld-makefile.patch b/package/binutils/arc-2016.03-rc2/0300-ld-makefile.patch deleted file mode 100644 index 73cc098024..0000000000 --- a/package/binutils/arc-2016.03-rc2/0300-ld-makefile.patch +++ /dev/null @@ -1,41 +0,0 @@ -From d76a7549b43974fe8564971a3f40459bc495a8a7 Mon Sep 17 00:00:00 2001 -From: Romain Naour -Date: Fri, 25 Dec 2015 11:40:53 +0100 -Subject: [PATCH] ld-makefile - -[Romain: rebase on top of 2.26] -Signed-off-by: Romain Naour ---- - ld/Makefile.am | 2 +- - ld/Makefile.in | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/ld/Makefile.am b/ld/Makefile.am -index 0b3b049..3871c74 100644 ---- a/ld/Makefile.am -+++ b/ld/Makefile.am -@@ -57,7 +57,7 @@ endif - # 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@ -diff --git a/ld/Makefile.in b/ld/Makefile.in -index ed98f87..530e4c9 100644 ---- a/ld/Makefile.in -+++ b/ld/Makefile.in -@@ -413,7 +413,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS) - # 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 --- -2.4.3 - diff --git a/package/binutils/arc-2016.03-rc2/0301-check-ldrunpath-length.patch b/package/binutils/arc-2016.03-rc2/0301-check-ldrunpath-length.patch deleted file mode 100644 index 3b4c204c7f..0000000000 --- a/package/binutils/arc-2016.03-rc2/0301-check-ldrunpath-length.patch +++ /dev/null @@ -1,36 +0,0 @@ -From ebe1cba46df52d7bf86def3d681271fd05fb453b Mon Sep 17 00:00:00 2001 -From: Romain Naour -Date: Fri, 25 Dec 2015 11:41:47 +0100 -Subject: [PATCH] check-ldrunpath-length - -[Romain: rebase on top of 2.26] -Signed-off-by: Romain Naour ---- - ld/emultempl/elf32.em | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em -index 0405d4f..efd3300 100644 ---- a/ld/emultempl/elf32.em -+++ b/ld/emultempl/elf32.em -@@ -1242,6 +1242,8 @@ fragment <link.next) - if (bfd_get_flavour (abfd) == bfd_target_elf_flavour) --- -2.4.3 - diff --git a/package/binutils/arc-2016.03-rc2/0500-add-sysroot-fix-from-bug-3049.patch b/package/binutils/arc-2016.03-rc2/0500-add-sysroot-fix-from-bug-3049.patch deleted file mode 100644 index f67a43efdf..0000000000 --- a/package/binutils/arc-2016.03-rc2/0500-add-sysroot-fix-from-bug-3049.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 30628870e583375f8927c04398c7219c6e9f703c Mon Sep 17 00:00:00 2001 -From: Romain Naour -Date: Fri, 25 Dec 2015 11:42:48 +0100 -Subject: [PATCH] add sysroot fix from bug #3049 - -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 - -Signed-off-by: Sven Rebhan -[Romain: rebase on top of 2.26] -Signed-off-by: Romain Naour ---- - ld/ldfile.c | 11 +++++++++-- - 1 file changed, 9 insertions(+), 2 deletions(-) - -diff --git a/ld/ldfile.c b/ld/ldfile.c -index 96f9ecc..1439309 100644 ---- a/ld/ldfile.c -+++ b/ld/ldfile.c -@@ -335,18 +335,25 @@ ldfile_open_file_search (const char *arch, - 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)) --- -2.4.3 - diff --git a/package/binutils/arc-2016.03-rc2/0600-poison-system-directories.patch b/package/binutils/arc-2016.03-rc2/0600-poison-system-directories.patch deleted file mode 100644 index d16994ec0c..0000000000 --- a/package/binutils/arc-2016.03-rc2/0600-poison-system-directories.patch +++ /dev/null @@ -1,306 +0,0 @@ -From be366461dd49e760440fb28eaee5164eb281adcc Mon Sep 17 00:00:00 2001 -From: Romain Naour -Date: Fri, 25 Dec 2015 11:45:38 +0100 -Subject: [PATCH] poison-system-directories - -Patch adapted to binutils 2.23.2 and extended to use -BR_COMPILER_PARANOID_UNSAFE_PATH by Thomas Petazzoni. - -[Romain: rebase on top of 2.26] -Signed-off-by: Romain Naour -[Gustavo: adapt to binutils 2.25] -Signed-off-by: Thomas Petazzoni -Signed-off-by: Gustavo Zacarias - -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 - - 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 - - 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 - - Merge from Sourcery G++ binutils 2.17: - - 2007-03-20 Joseph Myers - Based on patch by Mark Hatle . - 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 -Signed-off-by: Scott Garman ---- - ld/config.in | 3 +++ - ld/configure | 14 ++++++++++++++ - ld/configure.ac | 10 ++++++++++ - ld/ld.h | 8 ++++++++ - ld/ld.texinfo | 12 ++++++++++++ - ld/ldfile.c | 17 +++++++++++++++++ - ld/ldlex.h | 2 ++ - ld/ldmain.c | 2 ++ - ld/lexsup.c | 21 +++++++++++++++++++++ - 9 files changed, 89 insertions(+) - -diff --git a/ld/config.in b/ld/config.in -index 276fb77..35c58eb 100644 ---- a/ld/config.in -+++ b/ld/config.in -@@ -14,6 +14,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 - -diff --git a/ld/configure b/ld/configure -index a446283..d1f9504 100755 ---- a/ld/configure -+++ b/ld/configure -@@ -786,6 +786,7 @@ with_lib_path - enable_targets - enable_64_bit_bfd - with_sysroot -+enable_poison_system_directories - enable_gold - enable_got - enable_compressed_debug_sections -@@ -1442,6 +1443,8 @@ Optional Features: - --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= GOT handling scheme (target, single, negative, - multigot) -@@ -15491,7 +15494,18 @@ else - 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 : -diff --git a/ld/configure.ac b/ld/configure.ac -index 188172d..2cd8443 100644 ---- a/ld/configure.ac -+++ b/ld/configure.ac -@@ -95,6 +95,16 @@ AC_SUBST(use_sysroot) - 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. -diff --git a/ld/ld.h b/ld/ld.h -index d84ec4e..3476b26 100644 ---- a/ld/ld.h -+++ b/ld/ld.h -@@ -164,6 +164,14 @@ typedef struct { - /* 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; -+ - /* Big or little endian as set on command line. */ - enum endian_enum endian; - -diff --git a/ld/ld.texinfo b/ld/ld.texinfo -index 1dd7492..fb1438e 100644 ---- a/ld/ld.texinfo -+++ b/ld/ld.texinfo -@@ -2332,6 +2332,18 @@ string identifying the original linked file does not change. - - 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 -diff --git a/ld/ldfile.c b/ld/ldfile.c -index 1439309..086b354 100644 ---- a/ld/ldfile.c -+++ b/ld/ldfile.c -@@ -114,6 +114,23 @@ ldfile_add_library_path (const char *name, bfd_boolean cmdline) - new_dirs->name = concat (ld_sysroot, name + 1, (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. */ -diff --git a/ld/ldlex.h b/ld/ldlex.h -index 6f11e7b..0ca3110 100644 ---- a/ld/ldlex.h -+++ b/ld/ldlex.h -@@ -144,6 +144,8 @@ enum option_values - OPTION_PRINT_MEMORY_USAGE, - OPTION_REQUIRE_DEFINED_SYMBOL, - OPTION_ORPHAN_HANDLING, -+ OPTION_NO_POISON_SYSTEM_DIRECTORIES, -+ OPTION_ERROR_POISON_SYSTEM_DIRECTORIES, - }; - - /* The initial parser states. */ -diff --git a/ld/ldmain.c b/ld/ldmain.c -index bb0b9cc..a23c56c 100644 ---- a/ld/ldmain.c -+++ b/ld/ldmain.c -@@ -257,6 +257,8 @@ main (int argc, char **argv) - 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 -diff --git a/ld/lexsup.c b/ld/lexsup.c -index 4cad209..be7d584 100644 ---- a/ld/lexsup.c -+++ b/ld/lexsup.c -@@ -530,6 +530,14 @@ static const struct ld_option ld_options[] = - { {"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) -@@ -542,6 +550,7 @@ parse_args (unsigned argc, char **argv) - int ingroup = 0; - char *default_dirlist = NULL; - char *shortopts; -+ char *BR_paranoid_env; - struct option *longopts; - struct option *really_longopts; - int last_optind; -@@ -1516,6 +1525,14 @@ parse_args (unsigned argc, char **argv) - } - 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), -@@ -1559,6 +1576,10 @@ parse_args (unsigned argc, char **argv) - 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 (); --- -2.4.3 - diff --git a/package/binutils/arc-2016.03/0300-ld-makefile.patch b/package/binutils/arc-2016.03/0300-ld-makefile.patch new file mode 100644 index 0000000000..73cc098024 --- /dev/null +++ b/package/binutils/arc-2016.03/0300-ld-makefile.patch @@ -0,0 +1,41 @@ +From d76a7549b43974fe8564971a3f40459bc495a8a7 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Fri, 25 Dec 2015 11:40:53 +0100 +Subject: [PATCH] ld-makefile + +[Romain: rebase on top of 2.26] +Signed-off-by: Romain Naour +--- + ld/Makefile.am | 2 +- + ld/Makefile.in | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/ld/Makefile.am b/ld/Makefile.am +index 0b3b049..3871c74 100644 +--- a/ld/Makefile.am ++++ b/ld/Makefile.am +@@ -57,7 +57,7 @@ endif + # 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@ +diff --git a/ld/Makefile.in b/ld/Makefile.in +index ed98f87..530e4c9 100644 +--- a/ld/Makefile.in ++++ b/ld/Makefile.in +@@ -413,7 +413,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS) + # 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 +-- +2.4.3 + diff --git a/package/binutils/arc-2016.03/0301-check-ldrunpath-length.patch b/package/binutils/arc-2016.03/0301-check-ldrunpath-length.patch new file mode 100644 index 0000000000..3b4c204c7f --- /dev/null +++ b/package/binutils/arc-2016.03/0301-check-ldrunpath-length.patch @@ -0,0 +1,36 @@ +From ebe1cba46df52d7bf86def3d681271fd05fb453b Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Fri, 25 Dec 2015 11:41:47 +0100 +Subject: [PATCH] check-ldrunpath-length + +[Romain: rebase on top of 2.26] +Signed-off-by: Romain Naour +--- + ld/emultempl/elf32.em | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em +index 0405d4f..efd3300 100644 +--- a/ld/emultempl/elf32.em ++++ b/ld/emultempl/elf32.em +@@ -1242,6 +1242,8 @@ fragment <link.next) + if (bfd_get_flavour (abfd) == bfd_target_elf_flavour) +-- +2.4.3 + diff --git a/package/binutils/arc-2016.03/0500-add-sysroot-fix-from-bug-3049.patch b/package/binutils/arc-2016.03/0500-add-sysroot-fix-from-bug-3049.patch new file mode 100644 index 0000000000..f67a43efdf --- /dev/null +++ b/package/binutils/arc-2016.03/0500-add-sysroot-fix-from-bug-3049.patch @@ -0,0 +1,52 @@ +From 30628870e583375f8927c04398c7219c6e9f703c Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Fri, 25 Dec 2015 11:42:48 +0100 +Subject: [PATCH] add sysroot fix from bug #3049 + +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 + +Signed-off-by: Sven Rebhan +[Romain: rebase on top of 2.26] +Signed-off-by: Romain Naour +--- + ld/ldfile.c | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +diff --git a/ld/ldfile.c b/ld/ldfile.c +index 96f9ecc..1439309 100644 +--- a/ld/ldfile.c ++++ b/ld/ldfile.c +@@ -335,18 +335,25 @@ ldfile_open_file_search (const char *arch, + 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)) +-- +2.4.3 + diff --git a/package/binutils/arc-2016.03/0600-poison-system-directories.patch b/package/binutils/arc-2016.03/0600-poison-system-directories.patch new file mode 100644 index 0000000000..d16994ec0c --- /dev/null +++ b/package/binutils/arc-2016.03/0600-poison-system-directories.patch @@ -0,0 +1,306 @@ +From be366461dd49e760440fb28eaee5164eb281adcc Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Fri, 25 Dec 2015 11:45:38 +0100 +Subject: [PATCH] poison-system-directories + +Patch adapted to binutils 2.23.2 and extended to use +BR_COMPILER_PARANOID_UNSAFE_PATH by Thomas Petazzoni. + +[Romain: rebase on top of 2.26] +Signed-off-by: Romain Naour +[Gustavo: adapt to binutils 2.25] +Signed-off-by: Thomas Petazzoni +Signed-off-by: Gustavo Zacarias + +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 + + 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 + + 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 + + Merge from Sourcery G++ binutils 2.17: + + 2007-03-20 Joseph Myers + Based on patch by Mark Hatle . + 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 +Signed-off-by: Scott Garman +--- + ld/config.in | 3 +++ + ld/configure | 14 ++++++++++++++ + ld/configure.ac | 10 ++++++++++ + ld/ld.h | 8 ++++++++ + ld/ld.texinfo | 12 ++++++++++++ + ld/ldfile.c | 17 +++++++++++++++++ + ld/ldlex.h | 2 ++ + ld/ldmain.c | 2 ++ + ld/lexsup.c | 21 +++++++++++++++++++++ + 9 files changed, 89 insertions(+) + +diff --git a/ld/config.in b/ld/config.in +index 276fb77..35c58eb 100644 +--- a/ld/config.in ++++ b/ld/config.in +@@ -14,6 +14,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 + +diff --git a/ld/configure b/ld/configure +index a446283..d1f9504 100755 +--- a/ld/configure ++++ b/ld/configure +@@ -786,6 +786,7 @@ with_lib_path + enable_targets + enable_64_bit_bfd + with_sysroot ++enable_poison_system_directories + enable_gold + enable_got + enable_compressed_debug_sections +@@ -1442,6 +1443,8 @@ Optional Features: + --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= GOT handling scheme (target, single, negative, + multigot) +@@ -15491,7 +15494,18 @@ else + 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 : +diff --git a/ld/configure.ac b/ld/configure.ac +index 188172d..2cd8443 100644 +--- a/ld/configure.ac ++++ b/ld/configure.ac +@@ -95,6 +95,16 @@ AC_SUBST(use_sysroot) + 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. +diff --git a/ld/ld.h b/ld/ld.h +index d84ec4e..3476b26 100644 +--- a/ld/ld.h ++++ b/ld/ld.h +@@ -164,6 +164,14 @@ typedef struct { + /* 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; ++ + /* Big or little endian as set on command line. */ + enum endian_enum endian; + +diff --git a/ld/ld.texinfo b/ld/ld.texinfo +index 1dd7492..fb1438e 100644 +--- a/ld/ld.texinfo ++++ b/ld/ld.texinfo +@@ -2332,6 +2332,18 @@ string identifying the original linked file does not change. + + 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 +diff --git a/ld/ldfile.c b/ld/ldfile.c +index 1439309..086b354 100644 +--- a/ld/ldfile.c ++++ b/ld/ldfile.c +@@ -114,6 +114,23 @@ ldfile_add_library_path (const char *name, bfd_boolean cmdline) + new_dirs->name = concat (ld_sysroot, name + 1, (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. */ +diff --git a/ld/ldlex.h b/ld/ldlex.h +index 6f11e7b..0ca3110 100644 +--- a/ld/ldlex.h ++++ b/ld/ldlex.h +@@ -144,6 +144,8 @@ enum option_values + OPTION_PRINT_MEMORY_USAGE, + OPTION_REQUIRE_DEFINED_SYMBOL, + OPTION_ORPHAN_HANDLING, ++ OPTION_NO_POISON_SYSTEM_DIRECTORIES, ++ OPTION_ERROR_POISON_SYSTEM_DIRECTORIES, + }; + + /* The initial parser states. */ +diff --git a/ld/ldmain.c b/ld/ldmain.c +index bb0b9cc..a23c56c 100644 +--- a/ld/ldmain.c ++++ b/ld/ldmain.c +@@ -257,6 +257,8 @@ main (int argc, char **argv) + 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 +diff --git a/ld/lexsup.c b/ld/lexsup.c +index 4cad209..be7d584 100644 +--- a/ld/lexsup.c ++++ b/ld/lexsup.c +@@ -530,6 +530,14 @@ static const struct ld_option ld_options[] = + { {"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) +@@ -542,6 +550,7 @@ parse_args (unsigned argc, char **argv) + int ingroup = 0; + char *default_dirlist = NULL; + char *shortopts; ++ char *BR_paranoid_env; + struct option *longopts; + struct option *really_longopts; + int last_optind; +@@ -1516,6 +1525,14 @@ parse_args (unsigned argc, char **argv) + } + 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), +@@ -1559,6 +1576,10 @@ parse_args (unsigned argc, char **argv) + 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 (); +-- +2.4.3 + diff --git a/package/binutils/binutils.hash b/package/binutils/binutils.hash index 7e77b6b539..338bb8da77 100644 --- a/package/binutils/binutils.hash +++ b/package/binutils/binutils.hash @@ -2,5 +2,6 @@ sha512 5ec95ad47d49b12c4558a8db0ca2109d3ee1955e3776057f3330c4506f8f4d1cf5e505fbf8a16b98403a0fcdeaaf986fe0a22be6456247dbdace63ce1f776b12 binutils-2.24.tar.bz2 sha512 0b36dda0e6d32cd25613c0e64b56b28312515c54d6a159efd3db9a86717f114ab0a0a1f69d08975084d55713ebaeab64e4085c9b3d1c3fa86712869f80eb954d binutils-2.25.1.tar.bz2 sha512 e77e1b8dbbcbaf9ac2fae95c4403615808af3be03b2e1d32448cd3a7d32c43273f8bcace3f2de84ec120a982879295673029da306e2885dbf5f990584932cfc7 binutils-2.26.tar.bz2 -# No hash for the ARC variant, comes from the github-helper: -none xxx binutils-arc-2016.03-rc2.tar.gz + +# Locally calculated (fetched from Github) +sha512 566312760ef564902fd85e281ef1370426c1451a16eb1d3e2faea7ec62100ae70ac9a5f33a7a5f87cdc744e82dd03203378fa4db1652c6b7856d865404dd19f8 binutils-arc-2016.03.tar.gz diff --git a/package/binutils/binutils.mk b/package/binutils/binutils.mk index 340846defd..9ed7262eb0 100644 --- a/package/binutils/binutils.mk +++ b/package/binutils/binutils.mk @@ -9,7 +9,7 @@ BINUTILS_VERSION = $(call qstrip,$(BR2_BINUTILS_VERSION)) ifeq ($(BINUTILS_VERSION),) ifeq ($(BR2_arc),y) -BINUTILS_VERSION = arc-2016.03-rc2 +BINUTILS_VERSION = arc-2016.03 else BINUTILS_VERSION = 2.25.1 endif diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host index 6c2732d20f..61d3dbea32 100644 --- a/package/gcc/Config.in.host +++ b/package/gcc/Config.in.host @@ -100,7 +100,7 @@ config BR2_GCC_VERSION default "4.9.3" if BR2_GCC_VERSION_4_9_X default "5.3.0" if BR2_GCC_VERSION_5_X default "6.1.0" if BR2_GCC_VERSION_6_X - default "arc-2016.03-rc2" if BR2_GCC_VERSION_4_8_ARC + default "arc-2016.03" if BR2_GCC_VERSION_4_8_ARC config BR2_EXTRA_GCC_CONFIG_OPTIONS string "Additional gcc options" diff --git a/package/gcc/arc-2016.03-rc2/130-pr43538.patch b/package/gcc/arc-2016.03-rc2/130-pr43538.patch deleted file mode 100644 index 19e57bb059..0000000000 --- a/package/gcc/arc-2016.03-rc2/130-pr43538.patch +++ /dev/null @@ -1,25 +0,0 @@ -From c037df1be41f8daf4d581d7ffa4ec8cfa640bccf Mon Sep 17 00:00:00 2001 -From: glisse -Date: Fri, 25 Apr 2014 08:03:08 +0000 -Subject: [PATCH] 2014-04-25 Marc Glisse - - PR target/43538 - * mt-gnu: Don't reset CXXFLAGS_FOR_TARGET. - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209784 138bc75d-0d04-0410-961f-82ee72b054a4 -Signed-off-by: Max Filippov ---- - config/mt-gnu | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/config/mt-gnu b/config/mt-gnu -index 15bf417..5c696f5 100644 ---- a/config/mt-gnu -+++ b/config/mt-gnu -@@ -1 +1 @@ --CXXFLAGS_FOR_TARGET = $(CXXFLAGS) -D_GNU_SOURCE -+CXXFLAGS_FOR_TARGET += -D_GNU_SOURCE --- -2.1.4 - diff --git a/package/gcc/arc-2016.03-rc2/301-missing-execinfo_h.patch b/package/gcc/arc-2016.03-rc2/301-missing-execinfo_h.patch deleted file mode 100644 index 00efda24aa..0000000000 --- a/package/gcc/arc-2016.03-rc2/301-missing-execinfo_h.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: gcc-4.8.0/boehm-gc/include/gc.h -=================================================================== ---- gcc-4.8.0.orig/boehm-gc/include/gc.h 2007-04-23 23:10:09.000000000 +0200 -+++ gcc-4.8.0/boehm-gc/include/gc.h 2013-03-23 17:39:20.000000000 +0100 -@@ -503,7 +503,7 @@ - #if defined(__linux__) || defined(__GLIBC__) - # include - # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \ -- && !defined(__ia64__) -+ && !defined(__ia64__) && !defined(__UCLIBC__) - # ifndef GC_HAVE_BUILTIN_BACKTRACE - # define GC_HAVE_BUILTIN_BACKTRACE - # endif diff --git a/package/gcc/arc-2016.03-rc2/305-libmudflap-susv3-legacy.patch b/package/gcc/arc-2016.03-rc2/305-libmudflap-susv3-legacy.patch deleted file mode 100644 index 35d5f50207..0000000000 --- a/package/gcc/arc-2016.03-rc2/305-libmudflap-susv3-legacy.patch +++ /dev/null @@ -1,49 +0,0 @@ -Index: gcc-4.8.0/libmudflap/mf-hooks2.c -=================================================================== ---- gcc-4.8.0.orig/libmudflap/mf-hooks2.c 2013-02-03 18:48:05.000000000 +0100 -+++ gcc-4.8.0/libmudflap/mf-hooks2.c 2013-03-23 17:39:43.000000000 +0100 -@@ -424,7 +424,7 @@ - { - TRACE ("%s\n", __PRETTY_FUNCTION__); - MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region"); -- bzero (s, n); -+ memset (s, 0, n); - } - - -@@ -434,7 +434,7 @@ - TRACE ("%s\n", __PRETTY_FUNCTION__); - MF_VALIDATE_EXTENT(src, n, __MF_CHECK_READ, "bcopy src"); - MF_VALIDATE_EXTENT(dest, n, __MF_CHECK_WRITE, "bcopy dest"); -- bcopy (src, dest, n); -+ memmove (dest, src, n); - } - - -@@ -444,7 +444,7 @@ - TRACE ("%s\n", __PRETTY_FUNCTION__); - MF_VALIDATE_EXTENT(s1, n, __MF_CHECK_READ, "bcmp 1st arg"); - MF_VALIDATE_EXTENT(s2, n, __MF_CHECK_READ, "bcmp 2nd arg"); -- return bcmp (s1, s2, n); -+ return n == 0 ? 0 : memcmp (s1, s2, n); - } - - -@@ -453,7 +453,7 @@ - size_t n = strlen (s); - TRACE ("%s\n", __PRETTY_FUNCTION__); - MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region"); -- return index (s, c); -+ return strchr (s, c); - } - - -@@ -462,7 +462,7 @@ - size_t n = strlen (s); - TRACE ("%s\n", __PRETTY_FUNCTION__); - MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region"); -- return rindex (s, c); -+ return strrchr (s, c); - } - - /* XXX: stpcpy, memccpy */ diff --git a/package/gcc/arc-2016.03-rc2/842-PR60155.patch b/package/gcc/arc-2016.03-rc2/842-PR60155.patch deleted file mode 100644 index 7bc2122fd4..0000000000 --- a/package/gcc/arc-2016.03-rc2/842-PR60155.patch +++ /dev/null @@ -1,111 +0,0 @@ -From gcc bugzilla https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60155 -Upstream status: in trunk. - -Signed-off-by: Gustavo Zacarias - ---- trunk/gcc/gcse.c 2014/02/12 14:50:06 207726 -+++ trunk/gcc/gcse.c 2014/04/04 22:25:51 209134 -@@ -2502,6 +2502,65 @@ - } - } - -+struct set_data -+{ -+ rtx insn; -+ const_rtx set; -+ int nsets; -+}; -+ -+/* Increment number of sets and record set in DATA. */ -+ -+static void -+record_set_data (rtx dest, const_rtx set, void *data) -+{ -+ struct set_data *s = (struct set_data *)data; -+ -+ if (GET_CODE (set) == SET) -+ { -+ /* We allow insns having multiple sets, where all but one are -+ dead as single set insns. In the common case only a single -+ set is present, so we want to avoid checking for REG_UNUSED -+ notes unless necessary. */ -+ if (s->nsets == 1 -+ && find_reg_note (s->insn, REG_UNUSED, SET_DEST (s->set)) -+ && !side_effects_p (s->set)) -+ s->nsets = 0; -+ -+ if (!s->nsets) -+ { -+ /* Record this set. */ -+ s->nsets += 1; -+ s->set = set; -+ } -+ else if (!find_reg_note (s->insn, REG_UNUSED, dest) -+ || side_effects_p (set)) -+ s->nsets += 1; -+ } -+} -+ -+static const_rtx -+single_set_gcse (rtx insn) -+{ -+ struct set_data s; -+ rtx pattern; -+ -+ gcc_assert (INSN_P (insn)); -+ -+ /* Optimize common case. */ -+ pattern = PATTERN (insn); -+ if (GET_CODE (pattern) == SET) -+ return pattern; -+ -+ s.insn = insn; -+ s.nsets = 0; -+ note_stores (pattern, record_set_data, &s); -+ -+ /* Considered invariant insns have exactly one set. */ -+ gcc_assert (s.nsets == 1); -+ return s.set; -+} -+ - /* Emit move from SRC to DEST noting the equivalence with expression computed - in INSN. */ - -@@ -2509,7 +2568,8 @@ - gcse_emit_move_after (rtx dest, rtx src, rtx insn) - { - rtx new_rtx; -- rtx set = single_set (insn), set2; -+ const_rtx set = single_set_gcse (insn); -+ rtx set2; - rtx note; - rtx eqv = NULL_RTX; - -@@ -3369,13 +3429,12 @@ - FOR_EACH_VEC_ELT (occrs_to_hoist, j, occr) - { - rtx insn; -- rtx set; -+ const_rtx set; - - gcc_assert (!occr->deleted_p); - - insn = occr->insn; -- set = single_set (insn); -- gcc_assert (set); -+ set = single_set_gcse (insn); - - /* Create a pseudo-reg to store the result of reaching - expressions into. Get the mode for the new pseudo -@@ -3456,10 +3515,8 @@ - { - rtx reg; - enum reg_class pressure_class; -- rtx set = single_set (insn); -+ const_rtx set = single_set_gcse (insn); - -- /* Considered invariant insns have only one set. */ -- gcc_assert (set != NULL_RTX); - reg = SET_DEST (set); - if (GET_CODE (reg) == SUBREG) - reg = SUBREG_REG (reg); diff --git a/package/gcc/arc-2016.03-rc2/850-libstdcxx-uclibc-c99.patch b/package/gcc/arc-2016.03-rc2/850-libstdcxx-uclibc-c99.patch deleted file mode 100644 index 792976fd51..0000000000 --- a/package/gcc/arc-2016.03-rc2/850-libstdcxx-uclibc-c99.patch +++ /dev/null @@ -1,273 +0,0 @@ -Allow C99-depending features of libstdc++ with uClibc - -The libstdc++ code is fairly restrictive on how it checks for C99 -compatibility: it requires *complete* C99 support to enable certain -features. For example, uClibc provides a good number of C99 features, -but not C99 complex number support. For this reason, libstdc++ -completely disables many the standard C++ methods that can in fact -work because uClibc provides the necessary functions. - -This patch is similar and highly inspired from -https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58393, but implemented in -a way that doesn't involve changing the configure.ac script, as -autoreconfiguring gcc is complicated. It simply relies on the fact -that uClibc defines the __UCLIBC__ definition. - -Signed-off-by: Thomas Petazzoni - -Index: b/libstdc++-v3/config/locale/generic/c_locale.h -=================================================================== ---- a/libstdc++-v3/config/locale/generic/c_locale.h -+++ b/libstdc++-v3/config/locale/generic/c_locale.h -@@ -70,7 +70,7 @@ - __builtin_va_list __args; - __builtin_va_start(__args, __fmt); - --#ifdef _GLIBCXX_USE_C99 -+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) - const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args); - #else - const int __ret = __builtin_vsprintf(__out, __fmt, __args); -Index: b/libstdc++-v3/config/locale/gnu/c_locale.h -=================================================================== ---- a/libstdc++-v3/config/locale/gnu/c_locale.h -+++ b/libstdc++-v3/config/locale/gnu/c_locale.h -@@ -88,7 +88,7 @@ - __builtin_va_list __args; - __builtin_va_start(__args, __fmt); - --#ifdef _GLIBCXX_USE_C99 -+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) - const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args); - #else - const int __ret = __builtin_vsprintf(__out, __fmt, __args); -Index: b/libstdc++-v3/include/bits/basic_string.h -=================================================================== ---- a/libstdc++-v3/include/bits/basic_string.h -+++ b/libstdc++-v3/include/bits/basic_string.h -@@ -2809,7 +2809,7 @@ - _GLIBCXX_END_NAMESPACE_VERSION - } // namespace - --#if ((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99) \ -+#if ((__cplusplus >= 201103L) && (defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)) \ - && !defined(_GLIBCXX_HAVE_BROKEN_VSWPRINTF)) - - #include -Index: b/libstdc++-v3/include/bits/locale_facets.tcc -=================================================================== ---- a/libstdc++-v3/include/bits/locale_facets.tcc -+++ b/libstdc++-v3/include/bits/locale_facets.tcc -@@ -987,7 +987,7 @@ - char __fbuf[16]; - __num_base::_S_format_float(__io, __fbuf, __mod); - --#ifdef _GLIBCXX_USE_C99 -+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) - // First try a buffer perhaps big enough (most probably sufficient - // for non-ios_base::fixed outputs) - int __cs_size = __max_digits * 3; -Index: b/libstdc++-v3/include/bits/locale_facets_nonio.tcc -=================================================================== ---- a/libstdc++-v3/include/bits/locale_facets_nonio.tcc -+++ b/libstdc++-v3/include/bits/locale_facets_nonio.tcc -@@ -572,7 +572,7 @@ - { - const locale __loc = __io.getloc(); - const ctype<_CharT>& __ctype = use_facet >(__loc); --#ifdef _GLIBCXX_USE_C99 -+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) - // First try a buffer perhaps big enough. - int __cs_size = 64; - char* __cs = static_cast(__builtin_alloca(__cs_size)); -Index: b/libstdc++-v3/include/c_compatibility/math.h -=================================================================== ---- a/libstdc++-v3/include/c_compatibility/math.h -+++ b/libstdc++-v3/include/c_compatibility/math.h -@@ -56,7 +56,7 @@ - using std::floor; - using std::fmod; - --#if _GLIBCXX_USE_C99 -+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) - using std::fpclassify; - using std::isfinite; - using std::isinf; -Index: b/libstdc++-v3/include/c_compatibility/wchar.h -=================================================================== ---- a/libstdc++-v3/include/c_compatibility/wchar.h -+++ b/libstdc++-v3/include/c_compatibility/wchar.h -@@ -103,7 +103,7 @@ - using std::wmemset; - using std::wcsftime; - --#if _GLIBCXX_USE_C99 -+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) - using std::wcstold; - using std::wcstoll; - using std::wcstoull; -Index: b/libstdc++-v3/include/c_global/cstdlib -=================================================================== ---- a/libstdc++-v3/include/c_global/cstdlib -+++ b/libstdc++-v3/include/c_global/cstdlib -@@ -182,7 +182,7 @@ - _GLIBCXX_END_NAMESPACE_VERSION - } // namespace - --#if _GLIBCXX_USE_C99 -+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) - - #undef _Exit - #undef llabs -Index: b/libstdc++-v3/include/c_global/cwchar -=================================================================== ---- a/libstdc++-v3/include/c_global/cwchar -+++ b/libstdc++-v3/include/c_global/cwchar -@@ -232,7 +232,7 @@ - _GLIBCXX_END_NAMESPACE_VERSION - } // namespace - --#if _GLIBCXX_USE_C99 -+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) - - #undef wcstold - #undef wcstoll -@@ -289,7 +289,7 @@ - using std::vwscanf; - #endif - --#if _GLIBCXX_USE_C99 -+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) - using std::wcstold; - using std::wcstoll; - using std::wcstoull; -Index: b/libstdc++-v3/include/c_std/cstdio -=================================================================== ---- a/libstdc++-v3/include/c_std/cstdio -+++ b/libstdc++-v3/include/c_std/cstdio -@@ -139,7 +139,7 @@ - using ::vsprintf; - } // namespace std - --#if _GLIBCXX_USE_C99 -+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) - - #undef snprintf - #undef vfscanf -Index: b/libstdc++-v3/include/c_std/cstdlib -=================================================================== ---- a/libstdc++-v3/include/c_std/cstdlib -+++ b/libstdc++-v3/include/c_std/cstdlib -@@ -180,7 +180,7 @@ - _GLIBCXX_END_NAMESPACE_VERSION - } // namespace - --#if _GLIBCXX_USE_C99 -+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) - - #undef _Exit - #undef llabs -Index: b/libstdc++-v3/include/c_std/cwchar -=================================================================== ---- a/libstdc++-v3/include/c_std/cwchar -+++ b/libstdc++-v3/include/c_std/cwchar -@@ -228,7 +228,7 @@ - _GLIBCXX_END_NAMESPACE_VERSION - } // namespace - --#if _GLIBCXX_USE_C99 -+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) - - #undef wcstold - #undef wcstoll -Index: b/libstdc++-v3/include/ext/vstring.h -=================================================================== ---- a/libstdc++-v3/include/ext/vstring.h -+++ b/libstdc++-v3/include/ext/vstring.h -@@ -2571,7 +2571,7 @@ - _GLIBCXX_END_NAMESPACE_VERSION - } // namespace - --#if ((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99)) -+#if ((__cplusplus >= 201103L) && (defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__))) - - #include - -Index: b/libstdc++-v3/include/tr1/cstdio -=================================================================== ---- a/libstdc++-v3/include/tr1/cstdio -+++ b/libstdc++-v3/include/tr1/cstdio -@@ -33,7 +33,7 @@ - - #include - --#if _GLIBCXX_USE_C99 -+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) - - namespace std _GLIBCXX_VISIBILITY(default) - { -Index: b/libstdc++-v3/include/tr1/cstdlib -=================================================================== ---- a/libstdc++-v3/include/tr1/cstdlib -+++ b/libstdc++-v3/include/tr1/cstdlib -@@ -35,7 +35,7 @@ - - #if _GLIBCXX_HOSTED - --#if _GLIBCXX_USE_C99 -+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) - - namespace std _GLIBCXX_VISIBILITY(default) - { -Index: b/libstdc++-v3/include/tr1/cwchar -=================================================================== ---- a/libstdc++-v3/include/tr1/cwchar -+++ b/libstdc++-v3/include/tr1/cwchar -@@ -52,7 +52,7 @@ - using std::vwscanf; - #endif - --#if _GLIBCXX_USE_C99 -+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) - using std::wcstold; - using std::wcstoll; - using std::wcstoull; -Index: b/libstdc++-v3/include/tr1/stdlib.h -=================================================================== ---- a/libstdc++-v3/include/tr1/stdlib.h -+++ b/libstdc++-v3/include/tr1/stdlib.h -@@ -33,7 +33,7 @@ - - #if _GLIBCXX_HOSTED - --#if _GLIBCXX_USE_C99 -+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) - - using std::tr1::atoll; - using std::tr1::strtoll; -Index: b/libstdc++-v3/src/c++11/debug.cc -=================================================================== ---- a/libstdc++-v3/src/c++11/debug.cc -+++ b/libstdc++-v3/src/c++11/debug.cc -@@ -787,7 +787,7 @@ - int __n __attribute__ ((__unused__)), - const char* __fmt, _Tp __s) const throw () - { --#ifdef _GLIBCXX_USE_C99 -+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) - std::snprintf(__buf, __n, __fmt, __s); - #else - std::sprintf(__buf, __fmt, __s); -Index: b/libstdc++-v3/include/c_global/cstdio -=================================================================== ---- a/libstdc++-v3/include/c_global/cstdio -+++ b/libstdc++-v3/include/c_global/cstdio -@@ -139,7 +139,7 @@ - using ::vsprintf; - } // namespace - --#if _GLIBCXX_USE_C99 -+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) - - #undef snprintf - #undef vfscanf diff --git a/package/gcc/arc-2016.03-rc2/851-PR-other-56780.patch b/package/gcc/arc-2016.03-rc2/851-PR-other-56780.patch deleted file mode 100644 index feb433920d..0000000000 --- a/package/gcc/arc-2016.03-rc2/851-PR-other-56780.patch +++ /dev/null @@ -1,244 +0,0 @@ -From afe990251bd9b3a063f03da31a3b8d139d033bc3 Mon Sep 17 00:00:00 2001 -From: ian -Date: Sat, 1 Jun 2013 00:20:49 +0000 -Subject: [PATCH] PR other/56780 - -* libiberty/configure.ac: Move test for --enable-install-libiberty -outside of the 'with_target_subdir' test so that it actually gets -run. Add output messages to show the test result. -* libiberty/configure: Regenerate. -* libiberty/Makefile.in (install_to_libdir): Place the -installation of the libiberty library in the same guard as that -used for the headers to prevent it being installed unless -requested via --enable-install-libiberty. - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@199570 138bc75d-0d04-0410-961f-82ee72b054a4 - -libiberty: fix --enable-install-libiberty flag [PR 56780] - -Commit 199570 fixed the --disable-install-libiberty behavior, but it also -added a bug where the enable path never works because the initial clear -of target_header_dir wasn't deleted. So we end up initializing properly -at the top only to reset it at the end all the time. - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206367 138bc75d-0d04-0410-961f-82ee72b054a4 - -[Romain - squash the two upstream commits - Remove the ChangeLog] -Signed-off-by: Romain Naour ---- - libiberty/Makefile.in | 24 ++++++++++----------- - libiberty/configure | 57 +++++++++++++++++++++++++++----------------------- - libiberty/configure.ac | 47 ++++++++++++++++++++++------------------- - 3 files changed, 68 insertions(+), 60 deletions(-) - -diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in -index f6a3ebd..75ff82d 100644 ---- a/libiberty/Makefile.in -+++ b/libiberty/Makefile.in -@@ -355,19 +355,19 @@ install-strip: install - # since it will be passed the multilib flags. - MULTIOSDIR = `$(CC) $(CFLAGS) -print-multi-os-directory` - install_to_libdir: all -- ${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR) -- $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n -- ( cd $(DESTDIR)$(libdir)/$(MULTIOSDIR) ; chmod 644 $(TARGETLIB)n ;$(RANLIB) $(TARGETLIB)n ) -- mv -f $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB) - if test -n "${target_header_dir}"; then \ -- case "${target_header_dir}" in \ -- /*) thd=${target_header_dir};; \ -- *) thd=${includedir}/${target_header_dir};; \ -- esac; \ -- ${mkinstalldirs} $(DESTDIR)$${thd}; \ -- for h in ${INSTALLED_HEADERS}; do \ -- ${INSTALL_DATA} $$h $(DESTDIR)$${thd}; \ -- done; \ -+ ${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR); \ -+ $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n; \ -+ ( cd $(DESTDIR)$(libdir)/$(MULTIOSDIR) ; chmod 644 $(TARGETLIB)n ;$(RANLIB) $(TARGETLIB)n ); \ -+ mv -f $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB); \ -+ case "${target_header_dir}" in \ -+ /*) thd=${target_header_dir};; \ -+ *) thd=${includedir}/${target_header_dir};; \ -+ esac; \ -+ ${mkinstalldirs} $(DESTDIR)$${thd}; \ -+ for h in ${INSTALLED_HEADERS}; do \ -+ ${INSTALL_DATA} $$h $(DESTDIR)$${thd}; \ -+ done; \ - fi - @$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install - -diff --git a/libiberty/configure b/libiberty/configure -index 5367027..4feb95a 100755 ---- a/libiberty/configure -+++ b/libiberty/configure -@@ -675,8 +675,8 @@ with_cross_host - with_newlib - enable_maintainer_mode - enable_multilib --enable_largefile - enable_install_libiberty -+enable_largefile - ' - ac_precious_vars='build_alias - host_alias -@@ -1303,8 +1303,8 @@ Optional Features: - enable make rules and dependencies not useful - (and sometimes confusing) to the casual installer - --enable-multilib build many library versions (default) -+ --enable-install-libiberty Install headers and library for end users - --disable-largefile omit support for large files -- --enable-install-libiberty Install headers for end users - - Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] -@@ -2784,6 +2784,35 @@ if test $cross_compiling = no && test $multilib = yes \ - cross_compiling=maybe - fi - -+# We may wish to install the target headers somewhere. -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to install libiberty headers and static library" >&5 -+$as_echo_n "checking whether to install libiberty headers and static library... " >&6; } -+ -+# Check whether --enable-install-libiberty was given. -+if test "${enable_install_libiberty+set}" = set; then : -+ enableval=$enable_install_libiberty; enable_install_libiberty=$enableval -+else -+ enable_install_libiberty=no -+fi -+ -+# Option parsed, now set things appropriately. -+case x"$enable_install_libiberty" in -+ xyes|x) -+ target_header_dir=libiberty -+ ;; -+ xno) -+ target_header_dir= -+ ;; -+ *) -+ # This could be sanity-checked in various ways... -+ target_header_dir="${enable_install_libiberty}" -+ ;; -+esac -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_install_libiberty" >&5 -+$as_echo "$enable_install_libiberty" >&6; } -+{ $as_echo "$as_me:${as_lineno-$LINENO}: target_header_dir = $target_header_dir" >&5 -+$as_echo "$as_me: target_header_dir = $target_header_dir" >&6;} -+ - - ac_ext=c - ac_cpp='$CPP $CPPFLAGS' -@@ -5476,7 +5505,6 @@ fi - - setobjs= - CHECK= --target_header_dir= - if test -n "${with_target_subdir}"; then - - # We are being configured as a target library. AC_REPLACE_FUNCS -@@ -5759,29 +5787,6 @@ _ACEOF - - esac - -- # We may wish to install the target headers somewhere. -- # Check whether --enable-install-libiberty was given. --if test "${enable_install_libiberty+set}" = set; then : -- enableval=$enable_install_libiberty; enable_install_libiberty=$enableval --else -- enable_install_libiberty=no --fi -- -- # Option parsed, now set things appropriately. -- case x"$enable_install_libiberty" in -- xyes|x) -- target_header_dir=libiberty -- ;; -- xno) -- target_header_dir= -- ;; -- *) -- # This could be sanity-checked in various ways... -- target_header_dir="${enable_install_libiberty}" -- ;; -- esac -- -- - else - - # Not a target library, so we set things up to run the test suite. -diff --git a/libiberty/configure.ac b/libiberty/configure.ac -index c763894..f17e6b6 100644 ---- a/libiberty/configure.ac -+++ b/libiberty/configure.ac -@@ -128,6 +128,31 @@ if test $cross_compiling = no && test $multilib = yes \ - cross_compiling=maybe - fi - -+# We may wish to install the target headers somewhere. -+AC_MSG_CHECKING([whether to install libiberty headers and static library]) -+dnl install-libiberty is disabled by default -+ -+AC_ARG_ENABLE(install-libiberty, -+[ --enable-install-libiberty Install headers and library for end users], -+enable_install_libiberty=$enableval, -+enable_install_libiberty=no)dnl -+ -+# Option parsed, now set things appropriately. -+case x"$enable_install_libiberty" in -+ xyes|x) -+ target_header_dir=libiberty -+ ;; -+ xno) -+ target_header_dir= -+ ;; -+ *) -+ # This could be sanity-checked in various ways... -+ target_header_dir="${enable_install_libiberty}" -+ ;; -+esac -+AC_MSG_RESULT($enable_install_libiberty) -+AC_MSG_NOTICE([target_header_dir = $target_header_dir]) -+ - GCC_NO_EXECUTABLES - AC_PROG_CC - AC_SYS_LARGEFILE -@@ -380,7 +405,6 @@ fi - - setobjs= - CHECK= --target_header_dir= - if test -n "${with_target_subdir}"; then - - # We are being configured as a target library. AC_REPLACE_FUNCS -@@ -492,27 +516,6 @@ if test -n "${with_target_subdir}"; then - - esac - -- # We may wish to install the target headers somewhere. -- AC_ARG_ENABLE(install-libiberty, -- [ --enable-install-libiberty Install headers for end users], -- enable_install_libiberty=$enableval, -- enable_install_libiberty=no)dnl -- -- # Option parsed, now set things appropriately. -- case x"$enable_install_libiberty" in -- xyes|x) -- target_header_dir=libiberty -- ;; -- xno) -- target_header_dir= -- ;; -- *) -- # This could be sanity-checked in various ways... -- target_header_dir="${enable_install_libiberty}" -- ;; -- esac -- -- - else - - # Not a target library, so we set things up to run the test suite. --- -1.9.3 - diff --git a/package/gcc/arc-2016.03-rc2/930-libgcc-disable-split-stack-nothreads.patch b/package/gcc/arc-2016.03-rc2/930-libgcc-disable-split-stack-nothreads.patch deleted file mode 100644 index 7799c1286e..0000000000 --- a/package/gcc/arc-2016.03-rc2/930-libgcc-disable-split-stack-nothreads.patch +++ /dev/null @@ -1,14 +0,0 @@ -disable split-stack for non-thread builds - -Signed-off-by: Waldemar Brodkorb - -diff -Nur gcc-4.8.5.orig/libgcc/config/t-stack gcc-4.8.5/libgcc/config/t-stack ---- gcc-4.8.5.orig/libgcc/config/t-stack 2010-10-01 21:31:49.000000000 +0200 -+++ gcc-4.8.5/libgcc/config/t-stack 2016-03-07 05:28:12.000000000 +0100 -@@ -1,4 +1,6 @@ - # Makefile fragment to provide generic support for -fsplit-stack. - # This should be used in config.host for any host which supports - # -fsplit-stack. -+ifeq ($(enable_threads),yes) - LIB2ADD_ST += $(srcdir)/generic-morestack.c $(srcdir)/generic-morestack-thread.c -+endif diff --git a/package/gcc/arc-2016.03/130-pr43538.patch b/package/gcc/arc-2016.03/130-pr43538.patch new file mode 100644 index 0000000000..19e57bb059 --- /dev/null +++ b/package/gcc/arc-2016.03/130-pr43538.patch @@ -0,0 +1,25 @@ +From c037df1be41f8daf4d581d7ffa4ec8cfa640bccf Mon Sep 17 00:00:00 2001 +From: glisse +Date: Fri, 25 Apr 2014 08:03:08 +0000 +Subject: [PATCH] 2014-04-25 Marc Glisse + + PR target/43538 + * mt-gnu: Don't reset CXXFLAGS_FOR_TARGET. + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209784 138bc75d-0d04-0410-961f-82ee72b054a4 +Signed-off-by: Max Filippov +--- + config/mt-gnu | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/config/mt-gnu b/config/mt-gnu +index 15bf417..5c696f5 100644 +--- a/config/mt-gnu ++++ b/config/mt-gnu +@@ -1 +1 @@ +-CXXFLAGS_FOR_TARGET = $(CXXFLAGS) -D_GNU_SOURCE ++CXXFLAGS_FOR_TARGET += -D_GNU_SOURCE +-- +2.1.4 + diff --git a/package/gcc/arc-2016.03/301-missing-execinfo_h.patch b/package/gcc/arc-2016.03/301-missing-execinfo_h.patch new file mode 100644 index 0000000000..00efda24aa --- /dev/null +++ b/package/gcc/arc-2016.03/301-missing-execinfo_h.patch @@ -0,0 +1,13 @@ +Index: gcc-4.8.0/boehm-gc/include/gc.h +=================================================================== +--- gcc-4.8.0.orig/boehm-gc/include/gc.h 2007-04-23 23:10:09.000000000 +0200 ++++ gcc-4.8.0/boehm-gc/include/gc.h 2013-03-23 17:39:20.000000000 +0100 +@@ -503,7 +503,7 @@ + #if defined(__linux__) || defined(__GLIBC__) + # include + # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \ +- && !defined(__ia64__) ++ && !defined(__ia64__) && !defined(__UCLIBC__) + # ifndef GC_HAVE_BUILTIN_BACKTRACE + # define GC_HAVE_BUILTIN_BACKTRACE + # endif diff --git a/package/gcc/arc-2016.03/305-libmudflap-susv3-legacy.patch b/package/gcc/arc-2016.03/305-libmudflap-susv3-legacy.patch new file mode 100644 index 0000000000..35d5f50207 --- /dev/null +++ b/package/gcc/arc-2016.03/305-libmudflap-susv3-legacy.patch @@ -0,0 +1,49 @@ +Index: gcc-4.8.0/libmudflap/mf-hooks2.c +=================================================================== +--- gcc-4.8.0.orig/libmudflap/mf-hooks2.c 2013-02-03 18:48:05.000000000 +0100 ++++ gcc-4.8.0/libmudflap/mf-hooks2.c 2013-03-23 17:39:43.000000000 +0100 +@@ -424,7 +424,7 @@ + { + TRACE ("%s\n", __PRETTY_FUNCTION__); + MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region"); +- bzero (s, n); ++ memset (s, 0, n); + } + + +@@ -434,7 +434,7 @@ + TRACE ("%s\n", __PRETTY_FUNCTION__); + MF_VALIDATE_EXTENT(src, n, __MF_CHECK_READ, "bcopy src"); + MF_VALIDATE_EXTENT(dest, n, __MF_CHECK_WRITE, "bcopy dest"); +- bcopy (src, dest, n); ++ memmove (dest, src, n); + } + + +@@ -444,7 +444,7 @@ + TRACE ("%s\n", __PRETTY_FUNCTION__); + MF_VALIDATE_EXTENT(s1, n, __MF_CHECK_READ, "bcmp 1st arg"); + MF_VALIDATE_EXTENT(s2, n, __MF_CHECK_READ, "bcmp 2nd arg"); +- return bcmp (s1, s2, n); ++ return n == 0 ? 0 : memcmp (s1, s2, n); + } + + +@@ -453,7 +453,7 @@ + size_t n = strlen (s); + TRACE ("%s\n", __PRETTY_FUNCTION__); + MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region"); +- return index (s, c); ++ return strchr (s, c); + } + + +@@ -462,7 +462,7 @@ + size_t n = strlen (s); + TRACE ("%s\n", __PRETTY_FUNCTION__); + MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region"); +- return rindex (s, c); ++ return strrchr (s, c); + } + + /* XXX: stpcpy, memccpy */ diff --git a/package/gcc/arc-2016.03/842-PR60155.patch b/package/gcc/arc-2016.03/842-PR60155.patch new file mode 100644 index 0000000000..7bc2122fd4 --- /dev/null +++ b/package/gcc/arc-2016.03/842-PR60155.patch @@ -0,0 +1,111 @@ +From gcc bugzilla https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60155 +Upstream status: in trunk. + +Signed-off-by: Gustavo Zacarias + +--- trunk/gcc/gcse.c 2014/02/12 14:50:06 207726 ++++ trunk/gcc/gcse.c 2014/04/04 22:25:51 209134 +@@ -2502,6 +2502,65 @@ + } + } + ++struct set_data ++{ ++ rtx insn; ++ const_rtx set; ++ int nsets; ++}; ++ ++/* Increment number of sets and record set in DATA. */ ++ ++static void ++record_set_data (rtx dest, const_rtx set, void *data) ++{ ++ struct set_data *s = (struct set_data *)data; ++ ++ if (GET_CODE (set) == SET) ++ { ++ /* We allow insns having multiple sets, where all but one are ++ dead as single set insns. In the common case only a single ++ set is present, so we want to avoid checking for REG_UNUSED ++ notes unless necessary. */ ++ if (s->nsets == 1 ++ && find_reg_note (s->insn, REG_UNUSED, SET_DEST (s->set)) ++ && !side_effects_p (s->set)) ++ s->nsets = 0; ++ ++ if (!s->nsets) ++ { ++ /* Record this set. */ ++ s->nsets += 1; ++ s->set = set; ++ } ++ else if (!find_reg_note (s->insn, REG_UNUSED, dest) ++ || side_effects_p (set)) ++ s->nsets += 1; ++ } ++} ++ ++static const_rtx ++single_set_gcse (rtx insn) ++{ ++ struct set_data s; ++ rtx pattern; ++ ++ gcc_assert (INSN_P (insn)); ++ ++ /* Optimize common case. */ ++ pattern = PATTERN (insn); ++ if (GET_CODE (pattern) == SET) ++ return pattern; ++ ++ s.insn = insn; ++ s.nsets = 0; ++ note_stores (pattern, record_set_data, &s); ++ ++ /* Considered invariant insns have exactly one set. */ ++ gcc_assert (s.nsets == 1); ++ return s.set; ++} ++ + /* Emit move from SRC to DEST noting the equivalence with expression computed + in INSN. */ + +@@ -2509,7 +2568,8 @@ + gcse_emit_move_after (rtx dest, rtx src, rtx insn) + { + rtx new_rtx; +- rtx set = single_set (insn), set2; ++ const_rtx set = single_set_gcse (insn); ++ rtx set2; + rtx note; + rtx eqv = NULL_RTX; + +@@ -3369,13 +3429,12 @@ + FOR_EACH_VEC_ELT (occrs_to_hoist, j, occr) + { + rtx insn; +- rtx set; ++ const_rtx set; + + gcc_assert (!occr->deleted_p); + + insn = occr->insn; +- set = single_set (insn); +- gcc_assert (set); ++ set = single_set_gcse (insn); + + /* Create a pseudo-reg to store the result of reaching + expressions into. Get the mode for the new pseudo +@@ -3456,10 +3515,8 @@ + { + rtx reg; + enum reg_class pressure_class; +- rtx set = single_set (insn); ++ const_rtx set = single_set_gcse (insn); + +- /* Considered invariant insns have only one set. */ +- gcc_assert (set != NULL_RTX); + reg = SET_DEST (set); + if (GET_CODE (reg) == SUBREG) + reg = SUBREG_REG (reg); diff --git a/package/gcc/arc-2016.03/850-libstdcxx-uclibc-c99.patch b/package/gcc/arc-2016.03/850-libstdcxx-uclibc-c99.patch new file mode 100644 index 0000000000..792976fd51 --- /dev/null +++ b/package/gcc/arc-2016.03/850-libstdcxx-uclibc-c99.patch @@ -0,0 +1,273 @@ +Allow C99-depending features of libstdc++ with uClibc + +The libstdc++ code is fairly restrictive on how it checks for C99 +compatibility: it requires *complete* C99 support to enable certain +features. For example, uClibc provides a good number of C99 features, +but not C99 complex number support. For this reason, libstdc++ +completely disables many the standard C++ methods that can in fact +work because uClibc provides the necessary functions. + +This patch is similar and highly inspired from +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58393, but implemented in +a way that doesn't involve changing the configure.ac script, as +autoreconfiguring gcc is complicated. It simply relies on the fact +that uClibc defines the __UCLIBC__ definition. + +Signed-off-by: Thomas Petazzoni + +Index: b/libstdc++-v3/config/locale/generic/c_locale.h +=================================================================== +--- a/libstdc++-v3/config/locale/generic/c_locale.h ++++ b/libstdc++-v3/config/locale/generic/c_locale.h +@@ -70,7 +70,7 @@ + __builtin_va_list __args; + __builtin_va_start(__args, __fmt); + +-#ifdef _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args); + #else + const int __ret = __builtin_vsprintf(__out, __fmt, __args); +Index: b/libstdc++-v3/config/locale/gnu/c_locale.h +=================================================================== +--- a/libstdc++-v3/config/locale/gnu/c_locale.h ++++ b/libstdc++-v3/config/locale/gnu/c_locale.h +@@ -88,7 +88,7 @@ + __builtin_va_list __args; + __builtin_va_start(__args, __fmt); + +-#ifdef _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args); + #else + const int __ret = __builtin_vsprintf(__out, __fmt, __args); +Index: b/libstdc++-v3/include/bits/basic_string.h +=================================================================== +--- a/libstdc++-v3/include/bits/basic_string.h ++++ b/libstdc++-v3/include/bits/basic_string.h +@@ -2809,7 +2809,7 @@ + _GLIBCXX_END_NAMESPACE_VERSION + } // namespace + +-#if ((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99) \ ++#if ((__cplusplus >= 201103L) && (defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)) \ + && !defined(_GLIBCXX_HAVE_BROKEN_VSWPRINTF)) + + #include +Index: b/libstdc++-v3/include/bits/locale_facets.tcc +=================================================================== +--- a/libstdc++-v3/include/bits/locale_facets.tcc ++++ b/libstdc++-v3/include/bits/locale_facets.tcc +@@ -987,7 +987,7 @@ + char __fbuf[16]; + __num_base::_S_format_float(__io, __fbuf, __mod); + +-#ifdef _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + // First try a buffer perhaps big enough (most probably sufficient + // for non-ios_base::fixed outputs) + int __cs_size = __max_digits * 3; +Index: b/libstdc++-v3/include/bits/locale_facets_nonio.tcc +=================================================================== +--- a/libstdc++-v3/include/bits/locale_facets_nonio.tcc ++++ b/libstdc++-v3/include/bits/locale_facets_nonio.tcc +@@ -572,7 +572,7 @@ + { + const locale __loc = __io.getloc(); + const ctype<_CharT>& __ctype = use_facet >(__loc); +-#ifdef _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + // First try a buffer perhaps big enough. + int __cs_size = 64; + char* __cs = static_cast(__builtin_alloca(__cs_size)); +Index: b/libstdc++-v3/include/c_compatibility/math.h +=================================================================== +--- a/libstdc++-v3/include/c_compatibility/math.h ++++ b/libstdc++-v3/include/c_compatibility/math.h +@@ -56,7 +56,7 @@ + using std::floor; + using std::fmod; + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + using std::fpclassify; + using std::isfinite; + using std::isinf; +Index: b/libstdc++-v3/include/c_compatibility/wchar.h +=================================================================== +--- a/libstdc++-v3/include/c_compatibility/wchar.h ++++ b/libstdc++-v3/include/c_compatibility/wchar.h +@@ -103,7 +103,7 @@ + using std::wmemset; + using std::wcsftime; + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + using std::wcstold; + using std::wcstoll; + using std::wcstoull; +Index: b/libstdc++-v3/include/c_global/cstdlib +=================================================================== +--- a/libstdc++-v3/include/c_global/cstdlib ++++ b/libstdc++-v3/include/c_global/cstdlib +@@ -182,7 +182,7 @@ + _GLIBCXX_END_NAMESPACE_VERSION + } // namespace + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + #undef _Exit + #undef llabs +Index: b/libstdc++-v3/include/c_global/cwchar +=================================================================== +--- a/libstdc++-v3/include/c_global/cwchar ++++ b/libstdc++-v3/include/c_global/cwchar +@@ -232,7 +232,7 @@ + _GLIBCXX_END_NAMESPACE_VERSION + } // namespace + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + #undef wcstold + #undef wcstoll +@@ -289,7 +289,7 @@ + using std::vwscanf; + #endif + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + using std::wcstold; + using std::wcstoll; + using std::wcstoull; +Index: b/libstdc++-v3/include/c_std/cstdio +=================================================================== +--- a/libstdc++-v3/include/c_std/cstdio ++++ b/libstdc++-v3/include/c_std/cstdio +@@ -139,7 +139,7 @@ + using ::vsprintf; + } // namespace std + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + #undef snprintf + #undef vfscanf +Index: b/libstdc++-v3/include/c_std/cstdlib +=================================================================== +--- a/libstdc++-v3/include/c_std/cstdlib ++++ b/libstdc++-v3/include/c_std/cstdlib +@@ -180,7 +180,7 @@ + _GLIBCXX_END_NAMESPACE_VERSION + } // namespace + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + #undef _Exit + #undef llabs +Index: b/libstdc++-v3/include/c_std/cwchar +=================================================================== +--- a/libstdc++-v3/include/c_std/cwchar ++++ b/libstdc++-v3/include/c_std/cwchar +@@ -228,7 +228,7 @@ + _GLIBCXX_END_NAMESPACE_VERSION + } // namespace + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + #undef wcstold + #undef wcstoll +Index: b/libstdc++-v3/include/ext/vstring.h +=================================================================== +--- a/libstdc++-v3/include/ext/vstring.h ++++ b/libstdc++-v3/include/ext/vstring.h +@@ -2571,7 +2571,7 @@ + _GLIBCXX_END_NAMESPACE_VERSION + } // namespace + +-#if ((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99)) ++#if ((__cplusplus >= 201103L) && (defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__))) + + #include + +Index: b/libstdc++-v3/include/tr1/cstdio +=================================================================== +--- a/libstdc++-v3/include/tr1/cstdio ++++ b/libstdc++-v3/include/tr1/cstdio +@@ -33,7 +33,7 @@ + + #include + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + namespace std _GLIBCXX_VISIBILITY(default) + { +Index: b/libstdc++-v3/include/tr1/cstdlib +=================================================================== +--- a/libstdc++-v3/include/tr1/cstdlib ++++ b/libstdc++-v3/include/tr1/cstdlib +@@ -35,7 +35,7 @@ + + #if _GLIBCXX_HOSTED + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + namespace std _GLIBCXX_VISIBILITY(default) + { +Index: b/libstdc++-v3/include/tr1/cwchar +=================================================================== +--- a/libstdc++-v3/include/tr1/cwchar ++++ b/libstdc++-v3/include/tr1/cwchar +@@ -52,7 +52,7 @@ + using std::vwscanf; + #endif + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + using std::wcstold; + using std::wcstoll; + using std::wcstoull; +Index: b/libstdc++-v3/include/tr1/stdlib.h +=================================================================== +--- a/libstdc++-v3/include/tr1/stdlib.h ++++ b/libstdc++-v3/include/tr1/stdlib.h +@@ -33,7 +33,7 @@ + + #if _GLIBCXX_HOSTED + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + using std::tr1::atoll; + using std::tr1::strtoll; +Index: b/libstdc++-v3/src/c++11/debug.cc +=================================================================== +--- a/libstdc++-v3/src/c++11/debug.cc ++++ b/libstdc++-v3/src/c++11/debug.cc +@@ -787,7 +787,7 @@ + int __n __attribute__ ((__unused__)), + const char* __fmt, _Tp __s) const throw () + { +-#ifdef _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + std::snprintf(__buf, __n, __fmt, __s); + #else + std::sprintf(__buf, __fmt, __s); +Index: b/libstdc++-v3/include/c_global/cstdio +=================================================================== +--- a/libstdc++-v3/include/c_global/cstdio ++++ b/libstdc++-v3/include/c_global/cstdio +@@ -139,7 +139,7 @@ + using ::vsprintf; + } // namespace + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + #undef snprintf + #undef vfscanf diff --git a/package/gcc/arc-2016.03/851-PR-other-56780.patch b/package/gcc/arc-2016.03/851-PR-other-56780.patch new file mode 100644 index 0000000000..feb433920d --- /dev/null +++ b/package/gcc/arc-2016.03/851-PR-other-56780.patch @@ -0,0 +1,244 @@ +From afe990251bd9b3a063f03da31a3b8d139d033bc3 Mon Sep 17 00:00:00 2001 +From: ian +Date: Sat, 1 Jun 2013 00:20:49 +0000 +Subject: [PATCH] PR other/56780 + +* libiberty/configure.ac: Move test for --enable-install-libiberty +outside of the 'with_target_subdir' test so that it actually gets +run. Add output messages to show the test result. +* libiberty/configure: Regenerate. +* libiberty/Makefile.in (install_to_libdir): Place the +installation of the libiberty library in the same guard as that +used for the headers to prevent it being installed unless +requested via --enable-install-libiberty. + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@199570 138bc75d-0d04-0410-961f-82ee72b054a4 + +libiberty: fix --enable-install-libiberty flag [PR 56780] + +Commit 199570 fixed the --disable-install-libiberty behavior, but it also +added a bug where the enable path never works because the initial clear +of target_header_dir wasn't deleted. So we end up initializing properly +at the top only to reset it at the end all the time. + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206367 138bc75d-0d04-0410-961f-82ee72b054a4 + +[Romain + squash the two upstream commits + Remove the ChangeLog] +Signed-off-by: Romain Naour +--- + libiberty/Makefile.in | 24 ++++++++++----------- + libiberty/configure | 57 +++++++++++++++++++++++++++----------------------- + libiberty/configure.ac | 47 ++++++++++++++++++++++------------------- + 3 files changed, 68 insertions(+), 60 deletions(-) + +diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in +index f6a3ebd..75ff82d 100644 +--- a/libiberty/Makefile.in ++++ b/libiberty/Makefile.in +@@ -355,19 +355,19 @@ install-strip: install + # since it will be passed the multilib flags. + MULTIOSDIR = `$(CC) $(CFLAGS) -print-multi-os-directory` + install_to_libdir: all +- ${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR) +- $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n +- ( cd $(DESTDIR)$(libdir)/$(MULTIOSDIR) ; chmod 644 $(TARGETLIB)n ;$(RANLIB) $(TARGETLIB)n ) +- mv -f $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB) + if test -n "${target_header_dir}"; then \ +- case "${target_header_dir}" in \ +- /*) thd=${target_header_dir};; \ +- *) thd=${includedir}/${target_header_dir};; \ +- esac; \ +- ${mkinstalldirs} $(DESTDIR)$${thd}; \ +- for h in ${INSTALLED_HEADERS}; do \ +- ${INSTALL_DATA} $$h $(DESTDIR)$${thd}; \ +- done; \ ++ ${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR); \ ++ $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n; \ ++ ( cd $(DESTDIR)$(libdir)/$(MULTIOSDIR) ; chmod 644 $(TARGETLIB)n ;$(RANLIB) $(TARGETLIB)n ); \ ++ mv -f $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB); \ ++ case "${target_header_dir}" in \ ++ /*) thd=${target_header_dir};; \ ++ *) thd=${includedir}/${target_header_dir};; \ ++ esac; \ ++ ${mkinstalldirs} $(DESTDIR)$${thd}; \ ++ for h in ${INSTALLED_HEADERS}; do \ ++ ${INSTALL_DATA} $$h $(DESTDIR)$${thd}; \ ++ done; \ + fi + @$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install + +diff --git a/libiberty/configure b/libiberty/configure +index 5367027..4feb95a 100755 +--- a/libiberty/configure ++++ b/libiberty/configure +@@ -675,8 +675,8 @@ with_cross_host + with_newlib + enable_maintainer_mode + enable_multilib +-enable_largefile + enable_install_libiberty ++enable_largefile + ' + ac_precious_vars='build_alias + host_alias +@@ -1303,8 +1303,8 @@ Optional Features: + enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer + --enable-multilib build many library versions (default) ++ --enable-install-libiberty Install headers and library for end users + --disable-largefile omit support for large files +- --enable-install-libiberty Install headers for end users + + Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] +@@ -2784,6 +2784,35 @@ if test $cross_compiling = no && test $multilib = yes \ + cross_compiling=maybe + fi + ++# We may wish to install the target headers somewhere. ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to install libiberty headers and static library" >&5 ++$as_echo_n "checking whether to install libiberty headers and static library... " >&6; } ++ ++# Check whether --enable-install-libiberty was given. ++if test "${enable_install_libiberty+set}" = set; then : ++ enableval=$enable_install_libiberty; enable_install_libiberty=$enableval ++else ++ enable_install_libiberty=no ++fi ++ ++# Option parsed, now set things appropriately. ++case x"$enable_install_libiberty" in ++ xyes|x) ++ target_header_dir=libiberty ++ ;; ++ xno) ++ target_header_dir= ++ ;; ++ *) ++ # This could be sanity-checked in various ways... ++ target_header_dir="${enable_install_libiberty}" ++ ;; ++esac ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_install_libiberty" >&5 ++$as_echo "$enable_install_libiberty" >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: target_header_dir = $target_header_dir" >&5 ++$as_echo "$as_me: target_header_dir = $target_header_dir" >&6;} ++ + + ac_ext=c + ac_cpp='$CPP $CPPFLAGS' +@@ -5476,7 +5505,6 @@ fi + + setobjs= + CHECK= +-target_header_dir= + if test -n "${with_target_subdir}"; then + + # We are being configured as a target library. AC_REPLACE_FUNCS +@@ -5759,29 +5787,6 @@ _ACEOF + + esac + +- # We may wish to install the target headers somewhere. +- # Check whether --enable-install-libiberty was given. +-if test "${enable_install_libiberty+set}" = set; then : +- enableval=$enable_install_libiberty; enable_install_libiberty=$enableval +-else +- enable_install_libiberty=no +-fi +- +- # Option parsed, now set things appropriately. +- case x"$enable_install_libiberty" in +- xyes|x) +- target_header_dir=libiberty +- ;; +- xno) +- target_header_dir= +- ;; +- *) +- # This could be sanity-checked in various ways... +- target_header_dir="${enable_install_libiberty}" +- ;; +- esac +- +- + else + + # Not a target library, so we set things up to run the test suite. +diff --git a/libiberty/configure.ac b/libiberty/configure.ac +index c763894..f17e6b6 100644 +--- a/libiberty/configure.ac ++++ b/libiberty/configure.ac +@@ -128,6 +128,31 @@ if test $cross_compiling = no && test $multilib = yes \ + cross_compiling=maybe + fi + ++# We may wish to install the target headers somewhere. ++AC_MSG_CHECKING([whether to install libiberty headers and static library]) ++dnl install-libiberty is disabled by default ++ ++AC_ARG_ENABLE(install-libiberty, ++[ --enable-install-libiberty Install headers and library for end users], ++enable_install_libiberty=$enableval, ++enable_install_libiberty=no)dnl ++ ++# Option parsed, now set things appropriately. ++case x"$enable_install_libiberty" in ++ xyes|x) ++ target_header_dir=libiberty ++ ;; ++ xno) ++ target_header_dir= ++ ;; ++ *) ++ # This could be sanity-checked in various ways... ++ target_header_dir="${enable_install_libiberty}" ++ ;; ++esac ++AC_MSG_RESULT($enable_install_libiberty) ++AC_MSG_NOTICE([target_header_dir = $target_header_dir]) ++ + GCC_NO_EXECUTABLES + AC_PROG_CC + AC_SYS_LARGEFILE +@@ -380,7 +405,6 @@ fi + + setobjs= + CHECK= +-target_header_dir= + if test -n "${with_target_subdir}"; then + + # We are being configured as a target library. AC_REPLACE_FUNCS +@@ -492,27 +516,6 @@ if test -n "${with_target_subdir}"; then + + esac + +- # We may wish to install the target headers somewhere. +- AC_ARG_ENABLE(install-libiberty, +- [ --enable-install-libiberty Install headers for end users], +- enable_install_libiberty=$enableval, +- enable_install_libiberty=no)dnl +- +- # Option parsed, now set things appropriately. +- case x"$enable_install_libiberty" in +- xyes|x) +- target_header_dir=libiberty +- ;; +- xno) +- target_header_dir= +- ;; +- *) +- # This could be sanity-checked in various ways... +- target_header_dir="${enable_install_libiberty}" +- ;; +- esac +- +- + else + + # Not a target library, so we set things up to run the test suite. +-- +1.9.3 + diff --git a/package/gcc/arc-2016.03/930-libgcc-disable-split-stack-nothreads.patch b/package/gcc/arc-2016.03/930-libgcc-disable-split-stack-nothreads.patch new file mode 100644 index 0000000000..7799c1286e --- /dev/null +++ b/package/gcc/arc-2016.03/930-libgcc-disable-split-stack-nothreads.patch @@ -0,0 +1,14 @@ +disable split-stack for non-thread builds + +Signed-off-by: Waldemar Brodkorb + +diff -Nur gcc-4.8.5.orig/libgcc/config/t-stack gcc-4.8.5/libgcc/config/t-stack +--- gcc-4.8.5.orig/libgcc/config/t-stack 2010-10-01 21:31:49.000000000 +0200 ++++ gcc-4.8.5/libgcc/config/t-stack 2016-03-07 05:28:12.000000000 +0100 +@@ -1,4 +1,6 @@ + # Makefile fragment to provide generic support for -fsplit-stack. + # This should be used in config.host for any host which supports + # -fsplit-stack. ++ifeq ($(enable_threads),yes) + LIB2ADD_ST += $(srcdir)/generic-morestack.c $(srcdir)/generic-morestack-thread.c ++endif diff --git a/package/gcc/gcc.hash b/package/gcc/gcc.hash index 61c8993dcc..1bed7709e7 100644 --- a/package/gcc/gcc.hash +++ b/package/gcc/gcc.hash @@ -10,5 +10,6 @@ sha512 9ac57377a6975fc7adac704ec81355262b9f537def6955576753b87715470a20ee6a2a31 sha512 d619847383405fd389f5a2d7225f97fedb01f81478dbb8339047ccba7561a5c20045ab500a8744bffd19ea51892ce09fc37f862f2cfcb42de0f0f8cd8f8da37a gcc-5.3.0.tar.bz2 # From ftp://gcc.gnu.org/pub/gcc/releases/gcc-6.1.0/sha512.sum sha512 eeed3e2018b8c012aabce419e8d718fde701e5c3c179b4486c61ba46e5736eecc8fccdd18b01fcd973a42c6ad3116dbbe2ee247fe3757d622d373f93ebaf8d2e gcc-6.1.0.tar.bz2 -# No hash for the ARC variant, comes from the github-helper: -none xxx gcc-arc-2016.03-rc2.tar.gz + +# Locally calculated (fetched from Github) +sha512 65b1eef5f8ca26941dd9b5e1bcaf4ce285cc95429eeb92b4088663577bcdb2392f9712925f38666d94207fecd244579336f753a13de1f90e5169b21d8a73bef3 gcc-arc-2016.03.tar.gz diff --git a/package/gdb/Config.in.host b/package/gdb/Config.in.host index d006fb7ea3..257d68ac9b 100644 --- a/package/gdb/Config.in.host +++ b/package/gdb/Config.in.host @@ -48,7 +48,7 @@ endif config BR2_GDB_VERSION string depends on BR2_PACKAGE_GDB || BR2_PACKAGE_HOST_GDB - default "arc-2016.03-rc2-gdb" if BR2_arc + default "arc-2016.03-gdb" if BR2_arc default "6be65fb56ea6694a9260733a536a023a1e2d4d57" if BR2_microblaze default "7.9.1" if BR2_GDB_VERSION_7_9 default "7.10.1" if BR2_GDB_VERSION_7_10 || !BR2_PACKAGE_HOST_GDB diff --git a/package/gdb/gdb.hash b/package/gdb/gdb.hash index dd55189309..bf3f925ece 100644 --- a/package/gdb/gdb.hash +++ b/package/gdb/gdb.hash @@ -5,4 +5,4 @@ sha512 eadd2a59a1e48b1484eb2bea85256d6b1912926bc8b690793d02babf2639608bd22a0f2d # Locally calculated (fetched from Github) sha512 0a467091d4b01fbecabb4b8da1cb743025c70e7f4874a0b5c8fa2ec623569a39bde6762b91806de0be6e63711aeb6909715cfbe43860de73d8aec6159a9f10a7 gdb-6be65fb56ea6694a9260733a536a023a1e2d4d57.tar.gz -sha512 6026889c72baee2f57d3e706fdd07c19e9b0b27d9ab87d32da39cc3bc3afe911f0d30e3bbca6fd6281b7e94da66d475b17edadfd58bce4d8b419ee8d475660fa gdb-arc-2016.03-rc2-gdb.tar.gz +sha512 1abef1357896c2b57cfa7f7414eedc49d0de26b54321c680c2d027b1a27ec453d421e7f89a5281336047542379fd4820685802059efbd32b87c5ccffbaf2bd16 gdb-arc-2016.03-gdb.tar.gz