toolchain: Bump ARC tools to arc-2016.03
authorAlexey Brodkin <Alexey.Brodkin@synopsys.com>
Thu, 19 May 2016 05:20:33 +0000 (08:20 +0300)
committerFelix Fietkau <nbd@nbd.name>
Thu, 19 May 2016 17:29:44 +0000 (19:29 +0200)
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

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
50 files changed:
toolchain/binutils/Config.in
toolchain/binutils/Config.version
toolchain/binutils/Makefile
toolchain/binutils/patches/arc-2016.03/200-arc-fix-target-mask.patch [new file with mode: 0644]
toolchain/gcc/Config.version
toolchain/gcc/common.mk
toolchain/gcc/patches/arc-2015.06/001-revert_register_mode_search.patch [deleted file]
toolchain/gcc/patches/arc-2015.06/002-weak_data_fix.patch [deleted file]
toolchain/gcc/patches/arc-2015.06/003-universal_initializer.patch [deleted file]
toolchain/gcc/patches/arc-2015.06/004-case_insensitive.patch [deleted file]
toolchain/gcc/patches/arc-2015.06/010-documentation.patch [deleted file]
toolchain/gcc/patches/arc-2015.06/020-no-plt-backport.patch [deleted file]
toolchain/gcc/patches/arc-2015.06/100-uclibc-conf.patch [deleted file]
toolchain/gcc/patches/arc-2015.06/210-disable_libsanitizer_off_t_check.patch [deleted file]
toolchain/gcc/patches/arc-2015.06/800-arc-disablelibgmon.patch [deleted file]
toolchain/gcc/patches/arc-2015.06/820-libgcc_pic.patch [deleted file]
toolchain/gcc/patches/arc-2015.06/850-use_shared_libgcc.patch [deleted file]
toolchain/gcc/patches/arc-2015.06/851-libgcc_no_compat.patch [deleted file]
toolchain/gcc/patches/arc-2015.06/860-use_eh_frame.patch [deleted file]
toolchain/gcc/patches/arc-2015.06/870-ppc_no_crtsavres.patch [deleted file]
toolchain/gcc/patches/arc-2015.06/880-no_java_section.patch [deleted file]
toolchain/gcc/patches/arc-2015.06/910-mbsd_multi.patch [deleted file]
toolchain/gcc/patches/arc-2015.06/920-specs_nonfatal_getenv.patch [deleted file]
toolchain/gcc/patches/arc-2015.06/940-no-clobber-stamp-bits.patch [deleted file]
toolchain/gcc/patches/arc-2016.03/001-revert_register_mode_search.patch [new file with mode: 0644]
toolchain/gcc/patches/arc-2016.03/002-weak_data_fix.patch [new file with mode: 0644]
toolchain/gcc/patches/arc-2016.03/003-universal_initializer.patch [new file with mode: 0644]
toolchain/gcc/patches/arc-2016.03/004-case_insensitive.patch [new file with mode: 0644]
toolchain/gcc/patches/arc-2016.03/010-documentation.patch [new file with mode: 0644]
toolchain/gcc/patches/arc-2016.03/020-no-plt-backport.patch [new file with mode: 0644]
toolchain/gcc/patches/arc-2016.03/100-uclibc-conf.patch [new file with mode: 0644]
toolchain/gcc/patches/arc-2016.03/210-disable_libsanitizer_off_t_check.patch [new file with mode: 0644]
toolchain/gcc/patches/arc-2016.03/800-arc-disablelibgmon.patch [new file with mode: 0644]
toolchain/gcc/patches/arc-2016.03/820-libgcc_pic.patch [new file with mode: 0644]
toolchain/gcc/patches/arc-2016.03/850-use_shared_libgcc.patch [new file with mode: 0644]
toolchain/gcc/patches/arc-2016.03/851-libgcc_no_compat.patch [new file with mode: 0644]
toolchain/gcc/patches/arc-2016.03/860-use_eh_frame.patch [new file with mode: 0644]
toolchain/gcc/patches/arc-2016.03/870-ppc_no_crtsavres.patch [new file with mode: 0644]
toolchain/gcc/patches/arc-2016.03/880-no_java_section.patch [new file with mode: 0644]
toolchain/gcc/patches/arc-2016.03/910-mbsd_multi.patch [new file with mode: 0644]
toolchain/gcc/patches/arc-2016.03/920-specs_nonfatal_getenv.patch [new file with mode: 0644]
toolchain/gcc/patches/arc-2016.03/940-no-clobber-stamp-bits.patch [new file with mode: 0644]
toolchain/gdb/Makefile
toolchain/gdb/patches/arc-2015.06-gdb/100-no_extern_inline.patch [deleted file]
toolchain/gdb/patches/arc-2015.06-gdb/110-no_testsuite.patch [deleted file]
toolchain/gdb/patches/arc-2015.06-gdb/120-fix-compile-flag-mismatch.patch [deleted file]
toolchain/gdb/patches/arc-2016.03/100-no_extern_inline.patch [new file with mode: 0644]
toolchain/gdb/patches/arc-2016.03/110-no_testsuite.patch [new file with mode: 0644]
toolchain/gdb/patches/arc-2016.03/120-fix-compile-flag-mismatch.patch [new file with mode: 0644]
toolchain/gdb/patches/arc-2016.03/200-arc-fix-target-mask.patch [new file with mode: 0644]

index c32f43cdd4657296e1371b7546f85391acfda81d..2960c947d2b2e2dd02c0f0f5115cd92b44714c66 100644 (file)
@@ -3,7 +3,7 @@
 choice
        prompt "Binutils Version" if TOOLCHAINOPTS
        default BINUTILS_USE_VERSION_2_25_1 if !arc
-       default BINUTILS_USE_VERSION_2_23_ARC if arc
+       default BINUTILS_USE_VERSION_2_26_ARC if arc
        help
          Select the version of binutils you wish to use.
 
@@ -17,10 +17,10 @@ choice
                bool "Binutils 2.25.1"
                select BINUTILS_VERSION_2_25_1
 
-       config BINUTILS_USE_VERSION_2_23_ARC
+       config BINUTILS_USE_VERSION_2_26_ARC
                depends on arc
-               bool "ARC binutils 2.23"
-               select BINUTILS_VERSION_2_23_ARC
+               bool "ARC binutils 2.26"
+               select BINUTILS_VERSION_2_26_ARC
 
 endchoice
 
index bea748b90220b948d0268f1ca0827979f7ce1ca3..fc7a1f37c08d44d93145b91e1286102837d038e0 100644 (file)
@@ -5,7 +5,7 @@ config BINUTILS_VERSION_2_25_1
        default y if (!TOOLCHAINOPTS && !arc)
        bool
 
-config BINUTILS_VERSION_2_23_ARC
+config BINUTILS_VERSION_2_26_ARC
        default y if (!TOOLCHAINOPTS && arc)
        bool
 
@@ -13,5 +13,5 @@ config BINUTILS_VERSION
        string
        default "2.24-linaro"          if BINUTILS_VERSION_2_24_LINARO
        default "2.25.1"               if BINUTILS_VERSION_2_25_1
-       default "arc-2015.06"          if BINUTILS_VERSION_2_23_ARC
+       default "arc-2016.03"          if BINUTILS_VERSION_2_26_ARC
 
index c37148eedd9e6df0a8cc6a4ac7d31e15d1b58456..03fc76abddb3bb0e862e29d7de7013d0b8830e16 100644 (file)
@@ -26,11 +26,11 @@ ifeq ($(findstring linaro, $(CONFIG_BINUTILS_VERSION)),linaro)
   HOST_BUILD_DIR:=$(BUILD_DIR_TOOLCHAIN)/$(BINUTILS_DIR)
 endif
 
-ifneq ($(CONFIG_BINUTILS_VERSION_2_23_ARC),)
-  PKG_SOURCE_URL:=https://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb/archive/arc-2015.06/
-  PKG_REV:=2015.06
+ifneq ($(CONFIG_BINUTILS_VERSION_2_26_ARC),)
+  PKG_SOURCE_URL:=https://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb/archive/arc-2016.03/
+  PKG_REV:=2016.03
   PKG_SOURCE:=$(PKG_NAME)-arc-$(PKG_REV).tar.gz
-  PKG_MD5SUM:=961a3564de857238c255c381f8e4360b
+  PKG_MD5SUM:=d4387bab089df77a8049c81980b9fa12
   BINUTILS_DIR:=$(PKG_NAME)-gdb-arc-$(PKG_REV)
   HOST_BUILD_DIR:=$(BUILD_DIR_TOOLCHAIN)/$(BINUTILS_DIR)
 endif
diff --git a/toolchain/binutils/patches/arc-2016.03/200-arc-fix-target-mask.patch b/toolchain/binutils/patches/arc-2016.03/200-arc-fix-target-mask.patch
new file mode 100644 (file)
index 0000000..7e51d58
--- /dev/null
@@ -0,0 +1,13 @@
+diff --git a/bfd/config.bfd b/bfd/config.bfd
+index 5145d4a..a9c9c99 100644
+--- a/bfd/config.bfd
++++ b/bfd/config.bfd
+@@ -275,7 +275,7 @@ case "${targ}" in
+     targ_defvec=am33_elf32_linux_vec
+     ;;
+-  arc*-*-elf* | arc*-*-linux-uclibc*)
++  arc*-*-elf* | arc*-*-linux-*)
+     targ_defvec=arc_elf32_le_vec
+     targ_selvecs=arc_elf32_be_vec
+     ;;
index 5d393c54d08fc340407923d9f21e4464fdfa9015..f9e8c47c6f2557e6045829aa2fcf45145115e9a7 100644 (file)
@@ -5,7 +5,7 @@ config GCC_VERSION_4_8_ARC
 config GCC_VERSION
        string
        default "4.8-linaro"    if GCC_VERSION_4_8_LINARO
-       default "arc-2015.06"   if GCC_VERSION_4_8_ARC
+       default "arc-2016.03"   if GCC_VERSION_4_8_ARC
        default "5.3.0"
 
 config GCC_VERSION_4_8
index e6b5c8ea4be7caccf7a6c8e2dee083093f2ff9e7..c3546f545b19c50ebfc4ec417fe70d4d55d006b4 100644 (file)
@@ -33,11 +33,11 @@ ifeq ($(PKG_VERSION),5.3.0)
 endif
 
 ifneq ($(CONFIG_GCC_VERSION_4_8_ARC),)
-    PKG_VERSION:=4.8.4
-    PKG_SOURCE_URL:=https://github.com/foss-for-synopsys-dwc-arc-processors/gcc/archive/arc-2015.06
+    PKG_VERSION:=4.8.5
+    PKG_SOURCE_URL:=https://github.com/foss-for-synopsys-dwc-arc-processors/gcc/archive/arc-2016.03
     PKG_SOURCE:=$(PKG_NAME)-$(GCC_VERSION).tar.gz
-    PKG_MD5SUM:=25007ebb02a5f6c32532b103bb5984a0
-    PKG_REV:=2015.06
+    PKG_MD5SUM:=ca59c8140d6efd07b97a18869bddbb53
+    PKG_REV:=2016.03
     GCC_DIR:=gcc-arc-$(PKG_REV)
     HOST_BUILD_DIR = $(BUILD_DIR_HOST)/$(PKG_NAME)-$(GCC_VERSION)
 endif
diff --git a/toolchain/gcc/patches/arc-2015.06/001-revert_register_mode_search.patch b/toolchain/gcc/patches/arc-2015.06/001-revert_register_mode_search.patch
deleted file mode 100644 (file)
index 162d651..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-Revert of:
-
-commit 275035b56823b26d5fb7e90fad945b998648edf2
-Author: bergner <bergner@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date:   Thu Sep 5 14:09:07 2013 +0000
-
-        PR target/58139
-        * reginfo.c (choose_hard_reg_mode): Scan through all mode classes
-        looking for widest mode.
-
-
-    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202286 138bc75d-0d04-0410-961f-82ee72b054a4
-
-
---- a/gcc/reginfo.c
-+++ b/gcc/reginfo.c
-@@ -620,35 +620,40 @@ choose_hard_reg_mode (unsigned int regno
-        mode = GET_MODE_WIDER_MODE (mode))
-     if ((unsigned) hard_regno_nregs[regno][mode] == nregs
-       && HARD_REGNO_MODE_OK (regno, mode)
--      && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))
--      && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode))
-+      && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)))
-       found_mode = mode;
-+  if (found_mode != VOIDmode)
-+    return found_mode;
-+
-   for (mode = GET_CLASS_NARROWEST_MODE (MODE_FLOAT);
-        mode != VOIDmode;
-        mode = GET_MODE_WIDER_MODE (mode))
-     if ((unsigned) hard_regno_nregs[regno][mode] == nregs
-       && HARD_REGNO_MODE_OK (regno, mode)
--      && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))
--      && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode))
-+      && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)))
-       found_mode = mode;
-+  if (found_mode != VOIDmode)
-+    return found_mode;
-+
-   for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_FLOAT);
-        mode != VOIDmode;
-        mode = GET_MODE_WIDER_MODE (mode))
-     if ((unsigned) hard_regno_nregs[regno][mode] == nregs
-       && HARD_REGNO_MODE_OK (regno, mode)
--      && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))
--      && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode))
-+      && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)))
-       found_mode = mode;
-+  if (found_mode != VOIDmode)
-+    return found_mode;
-+
-   for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_INT);
-        mode != VOIDmode;
-        mode = GET_MODE_WIDER_MODE (mode))
-     if ((unsigned) hard_regno_nregs[regno][mode] == nregs
-       && HARD_REGNO_MODE_OK (regno, mode)
--      && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))
--      && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode))
-+      && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)))
-       found_mode = mode;
-   if (found_mode != VOIDmode)
diff --git a/toolchain/gcc/patches/arc-2015.06/002-weak_data_fix.patch b/toolchain/gcc/patches/arc-2015.06/002-weak_data_fix.patch
deleted file mode 100644 (file)
index a740b4c..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
---- /dev/null
-+++ b/gcc/testsuite/gcc.dg/visibility-21.c
-@@ -0,0 +1,14 @@
-+/* PR target/32219 */
-+/* { dg-do run } */
-+/* { dg-require-visibility "" } */
-+/* { dg-options "-fPIC" { target fpic } } */
-+
-+extern void f() __attribute__((weak,visibility("hidden")));
-+extern int puts( char const* );
-+int main()
-+{
-+      if (f)
-+              f();
-+      return 0;
-+}
-+
---- a/gcc/varasm.c
-+++ b/gcc/varasm.c
-@@ -6677,6 +6677,10 @@ default_binds_local_p_1 (const_tree exp,
-   /* Static variables are always local.  */
-   else if (! TREE_PUBLIC (exp))
-     local_p = true;
-+  /* hidden weak can't be overridden by something non-local, all
-+     that is possible is that it is not defined at all. */
-+  else if (DECL_WEAK (exp))
-+    local_p = false;
-   /* A variable is local if the user has said explicitly that it will
-      be.  */
-   else if ((DECL_VISIBILITY_SPECIFIED (exp)
-@@ -6690,11 +6694,6 @@ default_binds_local_p_1 (const_tree exp,
-      local.  */
-   else if (DECL_VISIBILITY (exp) != VISIBILITY_DEFAULT)
-     local_p = true;
--  /* Default visibility weak data can be overridden by a strong symbol
--     in another module and so are not local.  */
--  else if (DECL_WEAK (exp)
--         && !resolved_locally)
--    local_p = false;
-   /* If PIC, then assume that any global name can be overridden by
-      symbols resolved from other modules.  */
-   else if (shlib)
diff --git a/toolchain/gcc/patches/arc-2015.06/003-universal_initializer.patch b/toolchain/gcc/patches/arc-2015.06/003-universal_initializer.patch
deleted file mode 100644 (file)
index 1b9a5b3..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
---- a/gcc/c/c-typeck.c
-+++ b/gcc/c/c-typeck.c
-@@ -62,9 +62,9 @@ int in_typeof;
-    if expr.original_code == SIZEOF_EXPR.  */
- tree c_last_sizeof_arg;
--/* Nonzero if we've already printed a "missing braces around initializer"
--   message within this initializer.  */
--static int missing_braces_mentioned;
-+/* Nonzero if we might need to print a "missing braces around
-+   initializer" message within this initializer.  */
-+static int found_missing_braces;
- static int require_constant_value;
- static int require_constant_elements;
-@@ -6363,6 +6363,9 @@ static int constructor_nonconst;
- /* 1 if this constructor is erroneous so far.  */
- static int constructor_erroneous;
-+/* 1 if this constructor is the universal zero initializer { 0 }.  */
-+static int constructor_zeroinit;
-+
- /* Structure for managing pending initializer elements, organized as an
-    AVL tree.  */
-@@ -6524,7 +6527,7 @@ start_init (tree decl, tree asmspec_tree
-   constructor_stack = 0;
-   constructor_range_stack = 0;
--  missing_braces_mentioned = 0;
-+  found_missing_braces = 0;
-   spelling_base = 0;
-   spelling_size = 0;
-@@ -6619,6 +6622,7 @@ really_start_incremental_init (tree type
-   constructor_type = type;
-   constructor_incremental = 1;
-   constructor_designated = 0;
-+  constructor_zeroinit = 1;
-   designator_depth = 0;
-   designator_erroneous = 0;
-@@ -6816,11 +6820,8 @@ push_init_level (int implicit, struct ob
-       set_nonincremental_init (braced_init_obstack);
-     }
--  if (implicit == 1 && warn_missing_braces && !missing_braces_mentioned)
--    {
--      missing_braces_mentioned = 1;
--      warning_init (OPT_Wmissing_braces, "missing braces around initializer");
--    }
-+  if (implicit == 1)
-+    found_missing_braces = 1;
-   if (TREE_CODE (constructor_type) == RECORD_TYPE
-          || TREE_CODE (constructor_type) == UNION_TYPE)
-@@ -6953,16 +6954,23 @@ pop_init_level (int implicit, struct obs
-       }
-     }
-+  if (vec_safe_length (constructor_elements) != 1)
-+    constructor_zeroinit = 0;
-+
-+  /* Warn when some structs are initialized with direct aggregation.  */
-+  if (!implicit && found_missing_braces && warn_missing_braces
-+      && !constructor_zeroinit)
-+    {
-+      warning_init (OPT_Wmissing_braces,
-+                  "missing braces around initializer");
-+    }
-+
-   /* Warn when some struct elements are implicitly initialized to zero.  */
-   if (warn_missing_field_initializers
-       && constructor_type
-       && TREE_CODE (constructor_type) == RECORD_TYPE
-       && constructor_unfilled_fields)
-     {
--      bool constructor_zeroinit =
--       (vec_safe_length (constructor_elements) == 1
--        && integer_zerop ((*constructor_elements)[0].value));
--
-       /* Do not warn for flexible array members or zero-length arrays.  */
-       while (constructor_unfilled_fields
-              && (!DECL_SIZE (constructor_unfilled_fields)
-@@ -8077,6 +8085,9 @@ process_init_element (struct c_expr valu
-   designator_depth = 0;
-   designator_erroneous = 0;
-+  if (!implicit && value.value && !integer_zerop (value.value))
-+    constructor_zeroinit = 0;
-+
-   /* Handle superfluous braces around string cst as in
-      char x[] = {"foo"}; */
-   if (string_flag
diff --git a/toolchain/gcc/patches/arc-2015.06/004-case_insensitive.patch b/toolchain/gcc/patches/arc-2015.06/004-case_insensitive.patch
deleted file mode 100644 (file)
index b3d2dbe..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/include/filenames.h
-+++ b/include/filenames.h
-@@ -43,11 +43,6 @@ extern "C" {
- #  define IS_DIR_SEPARATOR(c) IS_DOS_DIR_SEPARATOR (c)
- #  define IS_ABSOLUTE_PATH(f) IS_DOS_ABSOLUTE_PATH (f)
- #else /* not DOSish */
--#  if defined(__APPLE__)
--#    ifndef HAVE_CASE_INSENSITIVE_FILE_SYSTEM
--#      define HAVE_CASE_INSENSITIVE_FILE_SYSTEM 1
--#    endif
--#  endif /* __APPLE__ */
- #  define HAS_DRIVE_SPEC(f) (0)
- #  define IS_DIR_SEPARATOR(c) IS_UNIX_DIR_SEPARATOR (c)
- #  define IS_ABSOLUTE_PATH(f) IS_UNIX_ABSOLUTE_PATH (f)
diff --git a/toolchain/gcc/patches/arc-2015.06/010-documentation.patch b/toolchain/gcc/patches/arc-2015.06/010-documentation.patch
deleted file mode 100644 (file)
index 5548069..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
---- a/gcc/Makefile.in
-+++ b/gcc/Makefile.in
-@@ -4327,18 +4327,10 @@ doc/gcc.info: $(TEXI_GCC_FILES)
- doc/gccint.info: $(TEXI_GCCINT_FILES)
- doc/cppinternals.info: $(TEXI_CPPINT_FILES)
--doc/%.info: %.texi
--      if [ x$(BUILD_INFO) = xinfo ]; then \
--              $(MAKEINFO) $(MAKEINFOFLAGS) -I . -I $(gcc_docdir) \
--                      -I $(gcc_docdir)/include -o $@ $<; \
--      fi
-+doc/%.info:
- # Duplicate entry to handle renaming of gccinstall.info
--doc/gccinstall.info: $(TEXI_GCCINSTALL_FILES)
--      if [ x$(BUILD_INFO) = xinfo ]; then \
--              $(MAKEINFO) $(MAKEINFOFLAGS) -I $(gcc_docdir) \
--                      -I $(gcc_docdir)/include -o $@ $<; \
--      fi
-+doc/gccinstall.info:
- doc/cpp.dvi: $(TEXI_CPP_FILES)
- doc/gcc.dvi: $(TEXI_GCC_FILES)
diff --git a/toolchain/gcc/patches/arc-2015.06/020-no-plt-backport.patch b/toolchain/gcc/patches/arc-2015.06/020-no-plt-backport.patch
deleted file mode 100644 (file)
index b225376..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
---- a/gcc/calls.c
-+++ b/gcc/calls.c
-@@ -176,6 +176,12 @@ prepare_call_address (tree fndecl, rtx f
-              && targetm.small_register_classes_for_mode_p (FUNCTION_MODE))
-             ? force_not_mem (memory_address (FUNCTION_MODE, funexp))
-             : memory_address (FUNCTION_MODE, funexp));
-+  else if (flag_pic && !flag_plt && fndecl
-+         && TREE_CODE (fndecl) == FUNCTION_DECL
-+         && !targetm.binds_local_p (fndecl))
-+    {
-+      funexp = force_reg (Pmode, funexp);
-+    }
-   else if (! sibcallp)
-     {
- #ifndef NO_FUNCTION_CSE
---- a/gcc/common.opt
-+++ b/gcc/common.opt
-@@ -1617,6 +1617,10 @@ fpie
- Common Report Var(flag_pie,1) Negative(fPIC)
- Generate position-independent code for executables if possible (small mode)
-+fplt
-+Common Report Var(flag_plt) Init(1)
-+Use PLT for PIC calls (-fno-plt: load the address from GOT at call site)
-+
- fplugin=
- Common Joined RejectNegative Var(common_deferred_options) Defer
- Specify a plugin to load
diff --git a/toolchain/gcc/patches/arc-2015.06/100-uclibc-conf.patch b/toolchain/gcc/patches/arc-2015.06/100-uclibc-conf.patch
deleted file mode 100644 (file)
index ff9ad94..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
---- a/contrib/regression/objs-gcc.sh
-+++ b/contrib/regression/objs-gcc.sh
-@@ -106,6 +106,10 @@ if [ $H_REAL_TARGET = $H_REAL_HOST -a $H
-  then
-   make all-gdb all-dejagnu all-ld || exit 1
-   make install-gdb install-dejagnu install-ld || exit 1
-+elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
-+ then
-+  make all-gdb all-dejagnu all-ld || exit 1
-+  make install-gdb install-dejagnu install-ld || exit 1
- elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
-   make bootstrap || exit 1
-   make install || exit 1
---- a/libjava/classpath/ltconfig
-+++ b/libjava/classpath/ltconfig
-@@ -603,7 +603,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-
- # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
- case $host_os in
--linux-gnu*) ;;
-+linux-gnu*|linux-uclibc*) ;;
- linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
- esac
-@@ -1247,7 +1247,7 @@ linux-gnuoldld* | linux-gnuaout* | linux
-   ;;
- # This must be Linux ELF.
--linux-gnu*)
-+linux*)
-   version_type=linux
-   need_lib_prefix=no
-   need_version=no
diff --git a/toolchain/gcc/patches/arc-2015.06/210-disable_libsanitizer_off_t_check.patch b/toolchain/gcc/patches/arc-2015.06/210-disable_libsanitizer_off_t_check.patch
deleted file mode 100644 (file)
index 5608469..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/libsanitizer/interception/interception_type_test.cc
-+++ b/libsanitizer/interception/interception_type_test.cc
-@@ -31,7 +31,7 @@ COMPILER_CHECK(sizeof(OFF64_T) == sizeof
- // rest (they depend on _FILE_OFFSET_BITS setting when building an application).
- # if defined(__ANDROID__) || !defined _FILE_OFFSET_BITS || \
-   _FILE_OFFSET_BITS != 64
--COMPILER_CHECK(sizeof(OFF_T) == sizeof(off_t));
-+// COMPILER_CHECK(sizeof(OFF_T) == sizeof(off_t));
- # endif
- #endif
diff --git a/toolchain/gcc/patches/arc-2015.06/800-arc-disablelibgmon.patch b/toolchain/gcc/patches/arc-2015.06/800-arc-disablelibgmon.patch
deleted file mode 100644 (file)
index 612883c..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-diff --git a/libgcc/config.host b/libgcc/config.host
-index e768389..aec10c7 100644
---- a/libgcc/config.host
-+++ b/libgcc/config.host
-@@ -320,11 +320,11 @@ alpha*-dec-*vms*)
-       ;;
- arc*-*-elf*)
-       tmake_file="arc/t-arc-newlib arc/t-arc"
--      extra_parts="crti.o crtn.o crtend.o crtbegin.o crtendS.o crtbeginS.o libgmon.a crtg.o crtgend.o crttls_r25.o crttls_r30.o"
-+      extra_parts="crti.o crtn.o crtend.o crtbegin.o crtendS.o crtbeginS.o crtg.o crtgend.o crttls_r25.o crttls_r30.o"
-       ;;
- arc*-*-linux-uclibc*)
-       tmake_file="${tmake_file} t-slibgcc-libgcc t-slibgcc-nolc-override arc/t-arc700-uClibc arc/t-arc"
--      extra_parts="crti.o crtn.o crtend.o crtbegin.o crtendS.o crtbeginS.o libgmon.a crtg.o crtgend.o"
-+      extra_parts="crti.o crtn.o crtend.o crtbegin.o crtendS.o crtbeginS.o crtg.o crtgend.o"
-       ;;
- arm-wrs-vxworks)
-       tmake_file="$tmake_file arm/t-arm arm/t-vxworks t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp"
diff --git a/toolchain/gcc/patches/arc-2015.06/820-libgcc_pic.patch b/toolchain/gcc/patches/arc-2015.06/820-libgcc_pic.patch
deleted file mode 100644 (file)
index 7a0ac73..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
---- a/libgcc/Makefile.in
-+++ b/libgcc/Makefile.in
-@@ -865,11 +865,12 @@ $(libgcov-objects): %$(objext): $(srcdir
- # Static libraries.
- libgcc.a: $(libgcc-objects)
-+libgcc_pic.a: $(libgcc-s-objects)
- libgcov.a: $(libgcov-objects)
- libunwind.a: $(libunwind-objects)
- libgcc_eh.a: $(libgcc-eh-objects)
--libgcc.a libgcov.a libunwind.a libgcc_eh.a:
-+libgcc.a libgcov.a libunwind.a libgcc_eh.a libgcc_pic.a:
-       -rm -f $@
-       objects="$(objects)";                                   \
-@@ -891,7 +892,7 @@ libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_E
- endif
- ifeq ($(enable_shared),yes)
--all: libgcc_eh.a libgcc_s$(SHLIB_EXT)
-+all: libgcc_eh.a libgcc_pic.a libgcc_s$(SHLIB_EXT)
- ifneq ($(LIBUNWIND),)
- all: libunwind$(SHLIB_EXT)
- endif
-@@ -1058,6 +1059,10 @@ install-shared:
-       chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a
-       $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a
-+      $(INSTALL_DATA) libgcc_pic.a $(mapfile) $(DESTDIR)$(inst_libdir)/
-+      chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_pic.a
-+      $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_pic.a
-+
-       $(subst @multilib_dir@,$(MULTIDIR),$(subst \
-               @shlib_base_name@,libgcc_s,$(subst \
-               @shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(SHLIB_INSTALL))))
diff --git a/toolchain/gcc/patches/arc-2015.06/850-use_shared_libgcc.patch b/toolchain/gcc/patches/arc-2015.06/850-use_shared_libgcc.patch
deleted file mode 100644 (file)
index 6934bc9..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
---- a/gcc/config/arm/linux-eabi.h
-+++ b/gcc/config/arm/linux-eabi.h
-@@ -131,10 +131,6 @@
- #define ENDFILE_SPEC \
-   LINUX_OR_ANDROID_LD (GNU_USER_TARGET_ENDFILE_SPEC, ANDROID_ENDFILE_SPEC)
--/* Use the default LIBGCC_SPEC, not the version in linux-elf.h, as we
--   do not use -lfloat.  */
--#undef LIBGCC_SPEC
--
- /* Clear the instruction cache from `beg' to `end'.  This is
-    implemented in lib1funcs.S, so ensure an error if this definition
-    is used.  */
---- a/gcc/config/linux.h
-+++ b/gcc/config/linux.h
-@@ -51,6 +51,10 @@ see the files COPYING3 and COPYING.RUNTI
-       builtin_assert ("system=posix");                        \
-     } while (0)
-+#ifndef LIBGCC_SPEC
-+#define LIBGCC_SPEC "%{static|static-libgcc:-lgcc}%{!static:%{!static-libgcc:-lgcc_s}}"
-+#endif
-+
- /* Determine which dynamic linker to use depending on whether GLIBC or
-    uClibc or Bionic is the default C library and whether
-    -muclibc or -mglibc or -mbionic has been passed to change the default.  */
---- a/libgcc/mkmap-symver.awk
-+++ b/libgcc/mkmap-symver.awk
-@@ -132,5 +132,5 @@ function output(lib) {
-   else if (inherit[lib])
-     printf("} %s;\n", inherit[lib]);
-   else
--    printf ("\n  local:\n\t*;\n};\n");
-+    printf ("\n\t*;\n};\n");
- }
---- a/gcc/config/rs6000/linux.h
-+++ b/gcc/config/rs6000/linux.h
-@@ -61,6 +61,9 @@
- #undef  CPLUSPLUS_CPP_SPEC
- #define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
-+#undef LIBGCC_SPEC
-+#define LIBGCC_SPEC "%{!static:%{!static-libgcc:-lgcc_s}} -lgcc"
-+
- #undef  LINK_SHLIB_SPEC
- #define LINK_SHLIB_SPEC "%{shared:-shared} %{!shared: %{static:-static}}"
diff --git a/toolchain/gcc/patches/arc-2015.06/851-libgcc_no_compat.patch b/toolchain/gcc/patches/arc-2015.06/851-libgcc_no_compat.patch
deleted file mode 100644 (file)
index 80c3476..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
---- a/libgcc/config/t-libunwind
-+++ b/libgcc/config/t-libunwind
-@@ -2,8 +2,7 @@
- HOST_LIBGCC2_CFLAGS += -DUSE_GAS_SYMVER
--LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c \
--  $(srcdir)/unwind-compat.c $(srcdir)/unwind-dw2-fde-compat.c
-+LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
- LIB2ADDEHSTATIC = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
- # Override the default value from t-slibgcc-elf-ver and mention -lunwind
diff --git a/toolchain/gcc/patches/arc-2015.06/860-use_eh_frame.patch b/toolchain/gcc/patches/arc-2015.06/860-use_eh_frame.patch
deleted file mode 100644 (file)
index 1ac83fe..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
---- a/libgcc/unwind-dw2-fde-dip.c
-+++ b/libgcc/unwind-dw2-fde-dip.c
-@@ -46,33 +46,13 @@
- #include "unwind-compat.h"
- #include "gthr.h"
--#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
--    && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \
--      || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG)))
--# define USE_PT_GNU_EH_FRAME
--#endif
--
--#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
--    && defined(__BIONIC__)
--# define USE_PT_GNU_EH_FRAME
--#endif
--
--#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
--    && defined(__FreeBSD__) && __FreeBSD__ >= 7
--# define ElfW __ElfN
--# define USE_PT_GNU_EH_FRAME
--#endif
--
--#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
--    && defined(__OpenBSD__)
--# define ElfW(type) Elf_##type
--# define USE_PT_GNU_EH_FRAME
--#endif
--
--#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
--    && defined(TARGET_DL_ITERATE_PHDR) \
--    && defined(__sun__) && defined(__svr4__)
-+#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR)
- # define USE_PT_GNU_EH_FRAME
-+# ifdef __OpenBSD__
-+#  define ElfW(type) Elf_##type
-+# elif defined(__FreeBSD__) && __FreeBSD__ >= 7
-+#  define ElfW __ElfN
-+# endif
- #endif
- #if defined(USE_PT_GNU_EH_FRAME)
diff --git a/toolchain/gcc/patches/arc-2015.06/870-ppc_no_crtsavres.patch b/toolchain/gcc/patches/arc-2015.06/870-ppc_no_crtsavres.patch
deleted file mode 100644 (file)
index 4b7fcbd..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/gcc/config/rs6000/rs6000.c
-+++ b/gcc/config/rs6000/rs6000.c
-@@ -17662,7 +17662,7 @@ rs6000_savres_strategy (rs6000_stack_t *
-   /* Define cutoff for using out-of-line functions to save registers.  */
-   if (DEFAULT_ABI == ABI_V4 || TARGET_ELF)
-     {
--      if (!optimize_size)
-+      if (1)
-       {
-         strategy |= SAVE_INLINE_FPRS | REST_INLINE_FPRS;
-         strategy |= SAVE_INLINE_GPRS | REST_INLINE_GPRS;
diff --git a/toolchain/gcc/patches/arc-2015.06/880-no_java_section.patch b/toolchain/gcc/patches/arc-2015.06/880-no_java_section.patch
deleted file mode 100644 (file)
index def6c9f..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/gcc/defaults.h
-+++ b/gcc/defaults.h
-@@ -380,7 +380,7 @@ see the files COPYING3 and COPYING.RUNTI
- /* If we have named section and we support weak symbols, then use the
-    .jcr section for recording java classes which need to be registered
-    at program start-up time.  */
--#if defined (TARGET_ASM_NAMED_SECTION) && SUPPORTS_WEAK
-+#if 0 && defined (TARGET_ASM_NAMED_SECTION) && SUPPORTS_WEAK
- #ifndef JCR_SECTION_NAME
- #define JCR_SECTION_NAME ".jcr"
- #endif
diff --git a/toolchain/gcc/patches/arc-2015.06/910-mbsd_multi.patch b/toolchain/gcc/patches/arc-2015.06/910-mbsd_multi.patch
deleted file mode 100644 (file)
index 5387f8e..0000000
+++ /dev/null
@@ -1,253 +0,0 @@
-
-       This patch brings over a few features from MirBSD:
-       * -fhonour-copts
-         If this option is not given, it's warned (depending
-         on environment variables). This is to catch errors
-         of misbuilt packages which override CFLAGS themselves.
-       * -Werror-maybe-reset
-         Has the effect of -Wno-error if GCC_NO_WERROR is
-         set and not '0', a no-operation otherwise. This is
-         to be able to use -Werror in "make" but prevent
-         GNU autoconf generated configure scripts from
-         freaking out.
-       * Make -fno-strict-aliasing and -fno-delete-null-pointer-checks
-         the default for -O2/-Os, because they trigger gcc bugs
-         and can delete code with security implications.
-
-       This patch was authored by Thorsten Glaser <tg at mirbsd.de>
-       with copyright assignment to the FSF in effect.
-
---- a/gcc/c-family/c-opts.c
-+++ b/gcc/c-family/c-opts.c
-@@ -104,6 +104,9 @@ static size_t include_cursor;
- /* Whether any standard preincluded header has been preincluded.  */
- static bool done_preinclude;
-+/* Check if a port honours COPTS.  */
-+static int honour_copts = 0;
-+
- static void handle_OPT_d (const char *);
- static void set_std_cxx98 (int);
- static void set_std_cxx11 (int);
-@@ -383,6 +386,9 @@ c_common_handle_option (size_t scode, co
-       cpp_opts->warn_endif_labels = value;
-       break;
-+    case OPT_Werror_maybe_reset:
-+      break;
-+
-     case OPT_Winvalid_pch:
-       cpp_opts->warn_invalid_pch = value;
-       break;
-@@ -491,6 +497,12 @@ c_common_handle_option (size_t scode, co
-       flag_no_builtin = !value;
-       break;
-+    case OPT_fhonour_copts:
-+      if (c_language == clk_c) {
-+        honour_copts++;
-+      }
-+      break;
-+
-     case OPT_fconstant_string_class_:
-       constant_string_class_name = arg;
-       break;
-@@ -1027,6 +1039,47 @@ c_common_init (void)
-       return false;
-     }
-+  if (c_language == clk_c) {
-+    char *ev = getenv ("GCC_HONOUR_COPTS");
-+    int evv;
-+    if (ev == NULL)
-+      evv = -1;
-+    else if ((*ev == '0') || (*ev == '\0'))
-+      evv = 0;
-+    else if (*ev == '1')
-+      evv = 1;
-+    else if (*ev == '2')
-+      evv = 2;
-+    else if (*ev == 's')
-+      evv = -1;
-+    else {
-+      warning (0, "unknown GCC_HONOUR_COPTS value, assuming 1");
-+      evv = 1; /* maybe depend this on something like MIRBSD_NATIVE?  */
-+    }
-+    if (evv == 1) {
-+      if (honour_copts == 0) {
-+        error ("someone does not honour COPTS at all in lenient mode");
-+        return false;
-+      } else if (honour_copts != 1) {
-+        warning (0, "someone does not honour COPTS correctly, passed %d times",
-+         honour_copts);
-+      }
-+    } else if (evv == 2) {
-+      if (honour_copts == 0) {
-+        error ("someone does not honour COPTS at all in strict mode");
-+        return false;
-+      } else if (honour_copts != 1) {
-+        error ("someone does not honour COPTS correctly, passed %d times",
-+         honour_copts);
-+        return false;
-+      }
-+    } else if (evv == 0) {
-+      if (honour_copts != 1)
-+        inform (0, "someone does not honour COPTS correctly, passed %d times",
-+         honour_copts);
-+    }
-+  }
-+
-   return true;
- }
---- a/gcc/c-family/c.opt
-+++ b/gcc/c-family/c.opt
-@@ -379,6 +379,10 @@ Werror-implicit-function-declaration
- C ObjC RejectNegative Warning Alias(Werror=, implicit-function-declaration)
- This switch is deprecated; use -Werror=implicit-function-declaration instead
-+Werror-maybe-reset
-+C ObjC C++ ObjC++
-+; Documented in common.opt
-+
- Wfloat-equal
- C ObjC C++ ObjC++ Var(warn_float_equal) Warning
- Warn if testing floating point numbers for equality
-@@ -949,6 +953,9 @@ C++ ObjC++ Optimization Alias(fexception
- fhonor-std
- C++ ObjC++ Ignore Warn(switch %qs is no longer supported)
-+fhonour-copts
-+C ObjC C++ ObjC++ RejectNegative
-+
- fhosted
- C ObjC
- Assume normal C execution environment
---- a/gcc/common.opt
-+++ b/gcc/common.opt
-@@ -541,6 +541,10 @@ Werror=
- Common Joined
- Treat specified warning as error
-+Werror-maybe-reset
-+Common
-+If environment variable GCC_NO_WERROR is set, act as -Wno-error
-+
- Wextra
- Common Var(extra_warnings) Warning
- Print extra (possibly unwanted) warnings
-@@ -1242,6 +1246,9 @@ fguess-branch-probability
- Common Report Var(flag_guess_branch_prob) Optimization
- Enable guessing of branch probabilities
-+fhonour-copts
-+Common RejectNegative
-+
- ; Nonzero means ignore `#ident' directives.  0 means handle them.
- ; Generate position-independent code for executables if possible
- ; On SVR4 targets, it also controls whether or not to emit a
---- a/gcc/opts.c
-+++ b/gcc/opts.c
-@@ -468,8 +468,6 @@ static const struct default_options defa
-     { OPT_LEVELS_2_PLUS, OPT_fschedule_insns2, NULL, 1 },
- #endif
-     { OPT_LEVELS_2_PLUS, OPT_fregmove, NULL, 1 },
--    { OPT_LEVELS_2_PLUS, OPT_fstrict_aliasing, NULL, 1 },
--    { OPT_LEVELS_2_PLUS, OPT_fstrict_overflow, NULL, 1 },
-     { OPT_LEVELS_2_PLUS, OPT_freorder_blocks, NULL, 1 },
-     { OPT_LEVELS_2_PLUS, OPT_freorder_functions, NULL, 1 },
-     { OPT_LEVELS_2_PLUS, OPT_ftree_vrp, NULL, 1 },
-@@ -489,6 +487,8 @@ static const struct default_options defa
-     { OPT_LEVELS_2_PLUS, OPT_fhoist_adjacent_loads, NULL, 1 },
-     /* -O3 optimizations.  */
-+    { OPT_LEVELS_3_PLUS, OPT_fstrict_aliasing, NULL, 1 },
-+    { OPT_LEVELS_3_PLUS, OPT_fstrict_overflow, NULL, 1 },
-     { OPT_LEVELS_3_PLUS, OPT_ftree_loop_distribute_patterns, NULL, 1 },
-     { OPT_LEVELS_3_PLUS, OPT_fpredictive_commoning, NULL, 1 },
-     /* Inlining of functions reducing size is a good idea with -Os
-@@ -1435,6 +1435,17 @@ common_handle_option (struct gcc_options
-                              opts, opts_set, loc, dc);
-       break;
-+    case OPT_Werror_maybe_reset:
-+      {
-+        char *ev = getenv ("GCC_NO_WERROR");
-+        if ((ev != NULL) && (*ev != '0'))
-+          warnings_are_errors = 0;
-+      }
-+      break;
-+
-+    case OPT_fhonour_copts:
-+      break;
-+
-     case OPT_Wlarger_than_:
-       opts->x_larger_than_size = value;
-       opts->x_warn_larger_than = value != -1;
---- a/gcc/doc/cppopts.texi
-+++ b/gcc/doc/cppopts.texi
-@@ -163,6 +163,11 @@ in older programs.  This warning is on b
- Make all warnings into hard errors.  Source code which triggers warnings
- will be rejected.
-+ at item -Werror-maybe-reset
-+ at opindex Werror-maybe-reset
-+Act like @samp{-Wno-error} if the @env{GCC_NO_WERROR} environment
-+variable is set to anything other than 0 or empty.
-+
- @item -Wsystem-headers
- @opindex Wsystem-headers
- Issue warnings for code in system headers.  These are normally unhelpful
---- a/gcc/doc/invoke.texi
-+++ b/gcc/doc/invoke.texi
-@@ -240,7 +240,7 @@ Objective-C and Objective-C++ Dialects}.
- -Wconversion  -Wcoverage-mismatch  -Wno-cpp  -Wno-deprecated  @gol
- -Wno-deprecated-declarations -Wdisabled-optimization  @gol
- -Wno-div-by-zero -Wdouble-promotion -Wempty-body  -Wenum-compare @gol
---Wno-endif-labels -Werror  -Werror=* @gol
-+-Wno-endif-labels -Werror  -Werror=* -Werror-maybe-reset @gol
- -Wfatal-errors  -Wfloat-equal  -Wformat  -Wformat=2 @gol
- -Wno-format-contains-nul -Wno-format-extra-args -Wformat-nonliteral @gol
- -Wformat-security  -Wformat-y2k @gol
-@@ -4817,6 +4817,22 @@ This option is only supported for C and 
- @option{-Wall} and by @option{-Wpedantic}, which can be disabled with
- @option{-Wno-pointer-sign}.
-+ at item -Werror-maybe-reset
-+ at opindex Werror-maybe-reset
-+Act like @samp{-Wno-error} if the @env{GCC_NO_WERROR} environment
-+variable is set to anything other than 0 or empty.
-+
-+ at item -fhonour-copts
-+ at opindex fhonour-copts
-+If @env{GCC_HONOUR_COPTS} is set to 1, abort if this option is not
-+given at least once, and warn if it is given more than once.
-+If @env{GCC_HONOUR_COPTS} is set to 2, abort if this option is not
-+given exactly once.
-+If @env{GCC_HONOUR_COPTS} is set to 0 or unset, warn if this option
-+is not given exactly once.
-+The warning is quelled if @env{GCC_HONOUR_COPTS} is set to @samp{s}.
-+This flag and environment variable only affect the C language.
-+
- @item -Wstack-protector
- @opindex Wstack-protector
- @opindex Wno-stack-protector
-@@ -6928,7 +6944,7 @@ so, the first branch is redirected to ei
- second branch or a point immediately following it, depending on whether
- the condition is known to be true or false.
--Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
-+Enabled at levels @option{-O3}.
- @item -fsplit-wide-types
- @opindex fsplit-wide-types
---- a/gcc/java/jvspec.c
-+++ b/gcc/java/jvspec.c
-@@ -626,6 +626,7 @@ lang_specific_pre_link (void)
-      class name.  Append dummy `.c' that can be stripped by set_input so %b
-      is correct.  */ 
-   set_input (concat (main_class_name, "main.c", NULL));
-+  putenv ("GCC_HONOUR_COPTS=s"); /* XXX hack!  */
-   err = do_spec (jvgenmain_spec);
-   if (err == 0)
-     {
diff --git a/toolchain/gcc/patches/arc-2015.06/920-specs_nonfatal_getenv.patch b/toolchain/gcc/patches/arc-2015.06/920-specs_nonfatal_getenv.patch
deleted file mode 100644 (file)
index 09768f5..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -8029,7 +8029,10 @@ getenv_spec_function (int argc, const ch
-   value = getenv (argv[0]);
-   if (!value)
--    fatal_error ("environment variable %qs not defined", argv[0]);
-+    {
-+      warning (0, "environment variable %qs not defined", argv[0]);
-+      value = "";
-+    }
-   /* We have to escape every character of the environment variable so
-      they are not interpreted as active spec characters.  A
diff --git a/toolchain/gcc/patches/arc-2015.06/940-no-clobber-stamp-bits.patch b/toolchain/gcc/patches/arc-2015.06/940-no-clobber-stamp-bits.patch
deleted file mode 100644 (file)
index dbecef2..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/libstdc++-v3/include/Makefile.in
-+++ b/libstdc++-v3/include/Makefile.in
-@@ -1342,7 +1342,7 @@
-       @$(STAMP) stamp-bits
- stamp-bits-sup: stamp-bits ${bits_sup_headers}
--      @-cd ${bits_builddir} && $(LN_S) $? . 2>/dev/null
-+      @-cd ${bits_builddir} && $(LN_S) $(filter-out stamp-bits,$?) . 2>/dev/null
-       @$(STAMP) stamp-bits-sup
- stamp-c_base: ${c_base_headers}
diff --git a/toolchain/gcc/patches/arc-2016.03/001-revert_register_mode_search.patch b/toolchain/gcc/patches/arc-2016.03/001-revert_register_mode_search.patch
new file mode 100644 (file)
index 0000000..162d651
--- /dev/null
@@ -0,0 +1,65 @@
+Revert of:
+
+commit 275035b56823b26d5fb7e90fad945b998648edf2
+Author: bergner <bergner@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date:   Thu Sep 5 14:09:07 2013 +0000
+
+        PR target/58139
+        * reginfo.c (choose_hard_reg_mode): Scan through all mode classes
+        looking for widest mode.
+
+
+    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202286 138bc75d-0d04-0410-961f-82ee72b054a4
+
+
+--- a/gcc/reginfo.c
++++ b/gcc/reginfo.c
+@@ -620,35 +620,40 @@ choose_hard_reg_mode (unsigned int regno
+        mode = GET_MODE_WIDER_MODE (mode))
+     if ((unsigned) hard_regno_nregs[regno][mode] == nregs
+       && HARD_REGNO_MODE_OK (regno, mode)
+-      && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))
+-      && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode))
++      && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)))
+       found_mode = mode;
++  if (found_mode != VOIDmode)
++    return found_mode;
++
+   for (mode = GET_CLASS_NARROWEST_MODE (MODE_FLOAT);
+        mode != VOIDmode;
+        mode = GET_MODE_WIDER_MODE (mode))
+     if ((unsigned) hard_regno_nregs[regno][mode] == nregs
+       && HARD_REGNO_MODE_OK (regno, mode)
+-      && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))
+-      && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode))
++      && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)))
+       found_mode = mode;
++  if (found_mode != VOIDmode)
++    return found_mode;
++
+   for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_FLOAT);
+        mode != VOIDmode;
+        mode = GET_MODE_WIDER_MODE (mode))
+     if ((unsigned) hard_regno_nregs[regno][mode] == nregs
+       && HARD_REGNO_MODE_OK (regno, mode)
+-      && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))
+-      && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode))
++      && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)))
+       found_mode = mode;
++  if (found_mode != VOIDmode)
++    return found_mode;
++
+   for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_INT);
+        mode != VOIDmode;
+        mode = GET_MODE_WIDER_MODE (mode))
+     if ((unsigned) hard_regno_nregs[regno][mode] == nregs
+       && HARD_REGNO_MODE_OK (regno, mode)
+-      && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))
+-      && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode))
++      && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)))
+       found_mode = mode;
+   if (found_mode != VOIDmode)
diff --git a/toolchain/gcc/patches/arc-2016.03/002-weak_data_fix.patch b/toolchain/gcc/patches/arc-2016.03/002-weak_data_fix.patch
new file mode 100644 (file)
index 0000000..a740b4c
--- /dev/null
@@ -0,0 +1,42 @@
+--- /dev/null
++++ b/gcc/testsuite/gcc.dg/visibility-21.c
+@@ -0,0 +1,14 @@
++/* PR target/32219 */
++/* { dg-do run } */
++/* { dg-require-visibility "" } */
++/* { dg-options "-fPIC" { target fpic } } */
++
++extern void f() __attribute__((weak,visibility("hidden")));
++extern int puts( char const* );
++int main()
++{
++      if (f)
++              f();
++      return 0;
++}
++
+--- a/gcc/varasm.c
++++ b/gcc/varasm.c
+@@ -6677,6 +6677,10 @@ default_binds_local_p_1 (const_tree exp,
+   /* Static variables are always local.  */
+   else if (! TREE_PUBLIC (exp))
+     local_p = true;
++  /* hidden weak can't be overridden by something non-local, all
++     that is possible is that it is not defined at all. */
++  else if (DECL_WEAK (exp))
++    local_p = false;
+   /* A variable is local if the user has said explicitly that it will
+      be.  */
+   else if ((DECL_VISIBILITY_SPECIFIED (exp)
+@@ -6690,11 +6694,6 @@ default_binds_local_p_1 (const_tree exp,
+      local.  */
+   else if (DECL_VISIBILITY (exp) != VISIBILITY_DEFAULT)
+     local_p = true;
+-  /* Default visibility weak data can be overridden by a strong symbol
+-     in another module and so are not local.  */
+-  else if (DECL_WEAK (exp)
+-         && !resolved_locally)
+-    local_p = false;
+   /* If PIC, then assume that any global name can be overridden by
+      symbols resolved from other modules.  */
+   else if (shlib)
diff --git a/toolchain/gcc/patches/arc-2016.03/003-universal_initializer.patch b/toolchain/gcc/patches/arc-2016.03/003-universal_initializer.patch
new file mode 100644 (file)
index 0000000..1b9a5b3
--- /dev/null
@@ -0,0 +1,94 @@
+--- a/gcc/c/c-typeck.c
++++ b/gcc/c/c-typeck.c
+@@ -62,9 +62,9 @@ int in_typeof;
+    if expr.original_code == SIZEOF_EXPR.  */
+ tree c_last_sizeof_arg;
+-/* Nonzero if we've already printed a "missing braces around initializer"
+-   message within this initializer.  */
+-static int missing_braces_mentioned;
++/* Nonzero if we might need to print a "missing braces around
++   initializer" message within this initializer.  */
++static int found_missing_braces;
+ static int require_constant_value;
+ static int require_constant_elements;
+@@ -6363,6 +6363,9 @@ static int constructor_nonconst;
+ /* 1 if this constructor is erroneous so far.  */
+ static int constructor_erroneous;
++/* 1 if this constructor is the universal zero initializer { 0 }.  */
++static int constructor_zeroinit;
++
+ /* Structure for managing pending initializer elements, organized as an
+    AVL tree.  */
+@@ -6524,7 +6527,7 @@ start_init (tree decl, tree asmspec_tree
+   constructor_stack = 0;
+   constructor_range_stack = 0;
+-  missing_braces_mentioned = 0;
++  found_missing_braces = 0;
+   spelling_base = 0;
+   spelling_size = 0;
+@@ -6619,6 +6622,7 @@ really_start_incremental_init (tree type
+   constructor_type = type;
+   constructor_incremental = 1;
+   constructor_designated = 0;
++  constructor_zeroinit = 1;
+   designator_depth = 0;
+   designator_erroneous = 0;
+@@ -6816,11 +6820,8 @@ push_init_level (int implicit, struct ob
+       set_nonincremental_init (braced_init_obstack);
+     }
+-  if (implicit == 1 && warn_missing_braces && !missing_braces_mentioned)
+-    {
+-      missing_braces_mentioned = 1;
+-      warning_init (OPT_Wmissing_braces, "missing braces around initializer");
+-    }
++  if (implicit == 1)
++    found_missing_braces = 1;
+   if (TREE_CODE (constructor_type) == RECORD_TYPE
+          || TREE_CODE (constructor_type) == UNION_TYPE)
+@@ -6953,16 +6954,23 @@ pop_init_level (int implicit, struct obs
+       }
+     }
++  if (vec_safe_length (constructor_elements) != 1)
++    constructor_zeroinit = 0;
++
++  /* Warn when some structs are initialized with direct aggregation.  */
++  if (!implicit && found_missing_braces && warn_missing_braces
++      && !constructor_zeroinit)
++    {
++      warning_init (OPT_Wmissing_braces,
++                  "missing braces around initializer");
++    }
++
+   /* Warn when some struct elements are implicitly initialized to zero.  */
+   if (warn_missing_field_initializers
+       && constructor_type
+       && TREE_CODE (constructor_type) == RECORD_TYPE
+       && constructor_unfilled_fields)
+     {
+-      bool constructor_zeroinit =
+-       (vec_safe_length (constructor_elements) == 1
+-        && integer_zerop ((*constructor_elements)[0].value));
+-
+       /* Do not warn for flexible array members or zero-length arrays.  */
+       while (constructor_unfilled_fields
+              && (!DECL_SIZE (constructor_unfilled_fields)
+@@ -8077,6 +8085,9 @@ process_init_element (struct c_expr valu
+   designator_depth = 0;
+   designator_erroneous = 0;
++  if (!implicit && value.value && !integer_zerop (value.value))
++    constructor_zeroinit = 0;
++
+   /* Handle superfluous braces around string cst as in
+      char x[] = {"foo"}; */
+   if (string_flag
diff --git a/toolchain/gcc/patches/arc-2016.03/004-case_insensitive.patch b/toolchain/gcc/patches/arc-2016.03/004-case_insensitive.patch
new file mode 100644 (file)
index 0000000..b3d2dbe
--- /dev/null
@@ -0,0 +1,14 @@
+--- a/include/filenames.h
++++ b/include/filenames.h
+@@ -43,11 +43,6 @@ extern "C" {
+ #  define IS_DIR_SEPARATOR(c) IS_DOS_DIR_SEPARATOR (c)
+ #  define IS_ABSOLUTE_PATH(f) IS_DOS_ABSOLUTE_PATH (f)
+ #else /* not DOSish */
+-#  if defined(__APPLE__)
+-#    ifndef HAVE_CASE_INSENSITIVE_FILE_SYSTEM
+-#      define HAVE_CASE_INSENSITIVE_FILE_SYSTEM 1
+-#    endif
+-#  endif /* __APPLE__ */
+ #  define HAS_DRIVE_SPEC(f) (0)
+ #  define IS_DIR_SEPARATOR(c) IS_UNIX_DIR_SEPARATOR (c)
+ #  define IS_ABSOLUTE_PATH(f) IS_UNIX_ABSOLUTE_PATH (f)
diff --git a/toolchain/gcc/patches/arc-2016.03/010-documentation.patch b/toolchain/gcc/patches/arc-2016.03/010-documentation.patch
new file mode 100644 (file)
index 0000000..5548069
--- /dev/null
@@ -0,0 +1,23 @@
+--- a/gcc/Makefile.in
++++ b/gcc/Makefile.in
+@@ -4327,18 +4327,10 @@ doc/gcc.info: $(TEXI_GCC_FILES)
+ doc/gccint.info: $(TEXI_GCCINT_FILES)
+ doc/cppinternals.info: $(TEXI_CPPINT_FILES)
+-doc/%.info: %.texi
+-      if [ x$(BUILD_INFO) = xinfo ]; then \
+-              $(MAKEINFO) $(MAKEINFOFLAGS) -I . -I $(gcc_docdir) \
+-                      -I $(gcc_docdir)/include -o $@ $<; \
+-      fi
++doc/%.info:
+ # Duplicate entry to handle renaming of gccinstall.info
+-doc/gccinstall.info: $(TEXI_GCCINSTALL_FILES)
+-      if [ x$(BUILD_INFO) = xinfo ]; then \
+-              $(MAKEINFO) $(MAKEINFOFLAGS) -I $(gcc_docdir) \
+-                      -I $(gcc_docdir)/include -o $@ $<; \
+-      fi
++doc/gccinstall.info:
+ doc/cpp.dvi: $(TEXI_CPP_FILES)
+ doc/gcc.dvi: $(TEXI_GCC_FILES)
diff --git a/toolchain/gcc/patches/arc-2016.03/020-no-plt-backport.patch b/toolchain/gcc/patches/arc-2016.03/020-no-plt-backport.patch
new file mode 100644 (file)
index 0000000..b225376
--- /dev/null
@@ -0,0 +1,28 @@
+--- a/gcc/calls.c
++++ b/gcc/calls.c
+@@ -176,6 +176,12 @@ prepare_call_address (tree fndecl, rtx f
+              && targetm.small_register_classes_for_mode_p (FUNCTION_MODE))
+             ? force_not_mem (memory_address (FUNCTION_MODE, funexp))
+             : memory_address (FUNCTION_MODE, funexp));
++  else if (flag_pic && !flag_plt && fndecl
++         && TREE_CODE (fndecl) == FUNCTION_DECL
++         && !targetm.binds_local_p (fndecl))
++    {
++      funexp = force_reg (Pmode, funexp);
++    }
+   else if (! sibcallp)
+     {
+ #ifndef NO_FUNCTION_CSE
+--- a/gcc/common.opt
++++ b/gcc/common.opt
+@@ -1617,6 +1617,10 @@ fpie
+ Common Report Var(flag_pie,1) Negative(fPIC)
+ Generate position-independent code for executables if possible (small mode)
++fplt
++Common Report Var(flag_plt) Init(1)
++Use PLT for PIC calls (-fno-plt: load the address from GOT at call site)
++
+ fplugin=
+ Common Joined RejectNegative Var(common_deferred_options) Defer
+ Specify a plugin to load
diff --git a/toolchain/gcc/patches/arc-2016.03/100-uclibc-conf.patch b/toolchain/gcc/patches/arc-2016.03/100-uclibc-conf.patch
new file mode 100644 (file)
index 0000000..ff9ad94
--- /dev/null
@@ -0,0 +1,33 @@
+--- a/contrib/regression/objs-gcc.sh
++++ b/contrib/regression/objs-gcc.sh
+@@ -106,6 +106,10 @@ if [ $H_REAL_TARGET = $H_REAL_HOST -a $H
+  then
+   make all-gdb all-dejagnu all-ld || exit 1
+   make install-gdb install-dejagnu install-ld || exit 1
++elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
++ then
++  make all-gdb all-dejagnu all-ld || exit 1
++  make install-gdb install-dejagnu install-ld || exit 1
+ elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
+   make bootstrap || exit 1
+   make install || exit 1
+--- a/libjava/classpath/ltconfig
++++ b/libjava/classpath/ltconfig
+@@ -603,7 +603,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-
+ # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
+ case $host_os in
+-linux-gnu*) ;;
++linux-gnu*|linux-uclibc*) ;;
+ linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
+ esac
+@@ -1247,7 +1247,7 @@ linux-gnuoldld* | linux-gnuaout* | linux
+   ;;
+ # This must be Linux ELF.
+-linux-gnu*)
++linux*)
+   version_type=linux
+   need_lib_prefix=no
+   need_version=no
diff --git a/toolchain/gcc/patches/arc-2016.03/210-disable_libsanitizer_off_t_check.patch b/toolchain/gcc/patches/arc-2016.03/210-disable_libsanitizer_off_t_check.patch
new file mode 100644 (file)
index 0000000..5608469
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/libsanitizer/interception/interception_type_test.cc
++++ b/libsanitizer/interception/interception_type_test.cc
+@@ -31,7 +31,7 @@ COMPILER_CHECK(sizeof(OFF64_T) == sizeof
+ // rest (they depend on _FILE_OFFSET_BITS setting when building an application).
+ # if defined(__ANDROID__) || !defined _FILE_OFFSET_BITS || \
+   _FILE_OFFSET_BITS != 64
+-COMPILER_CHECK(sizeof(OFF_T) == sizeof(off_t));
++// COMPILER_CHECK(sizeof(OFF_T) == sizeof(off_t));
+ # endif
+ #endif
diff --git a/toolchain/gcc/patches/arc-2016.03/800-arc-disablelibgmon.patch b/toolchain/gcc/patches/arc-2016.03/800-arc-disablelibgmon.patch
new file mode 100644 (file)
index 0000000..612883c
--- /dev/null
@@ -0,0 +1,18 @@
+diff --git a/libgcc/config.host b/libgcc/config.host
+index e768389..aec10c7 100644
+--- a/libgcc/config.host
++++ b/libgcc/config.host
+@@ -320,11 +320,11 @@ alpha*-dec-*vms*)
+       ;;
+ arc*-*-elf*)
+       tmake_file="arc/t-arc-newlib arc/t-arc"
+-      extra_parts="crti.o crtn.o crtend.o crtbegin.o crtendS.o crtbeginS.o libgmon.a crtg.o crtgend.o crttls_r25.o crttls_r30.o"
++      extra_parts="crti.o crtn.o crtend.o crtbegin.o crtendS.o crtbeginS.o crtg.o crtgend.o crttls_r25.o crttls_r30.o"
+       ;;
+ arc*-*-linux-uclibc*)
+       tmake_file="${tmake_file} t-slibgcc-libgcc t-slibgcc-nolc-override arc/t-arc700-uClibc arc/t-arc"
+-      extra_parts="crti.o crtn.o crtend.o crtbegin.o crtendS.o crtbeginS.o libgmon.a crtg.o crtgend.o"
++      extra_parts="crti.o crtn.o crtend.o crtbegin.o crtendS.o crtbeginS.o crtg.o crtgend.o"
+       ;;
+ arm-wrs-vxworks)
+       tmake_file="$tmake_file arm/t-arm arm/t-vxworks t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp"
diff --git a/toolchain/gcc/patches/arc-2016.03/820-libgcc_pic.patch b/toolchain/gcc/patches/arc-2016.03/820-libgcc_pic.patch
new file mode 100644 (file)
index 0000000..7a0ac73
--- /dev/null
@@ -0,0 +1,36 @@
+--- a/libgcc/Makefile.in
++++ b/libgcc/Makefile.in
+@@ -865,11 +865,12 @@ $(libgcov-objects): %$(objext): $(srcdir
+ # Static libraries.
+ libgcc.a: $(libgcc-objects)
++libgcc_pic.a: $(libgcc-s-objects)
+ libgcov.a: $(libgcov-objects)
+ libunwind.a: $(libunwind-objects)
+ libgcc_eh.a: $(libgcc-eh-objects)
+-libgcc.a libgcov.a libunwind.a libgcc_eh.a:
++libgcc.a libgcov.a libunwind.a libgcc_eh.a libgcc_pic.a:
+       -rm -f $@
+       objects="$(objects)";                                   \
+@@ -891,7 +892,7 @@ libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_E
+ endif
+ ifeq ($(enable_shared),yes)
+-all: libgcc_eh.a libgcc_s$(SHLIB_EXT)
++all: libgcc_eh.a libgcc_pic.a libgcc_s$(SHLIB_EXT)
+ ifneq ($(LIBUNWIND),)
+ all: libunwind$(SHLIB_EXT)
+ endif
+@@ -1058,6 +1059,10 @@ install-shared:
+       chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a
+       $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a
++      $(INSTALL_DATA) libgcc_pic.a $(mapfile) $(DESTDIR)$(inst_libdir)/
++      chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_pic.a
++      $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_pic.a
++
+       $(subst @multilib_dir@,$(MULTIDIR),$(subst \
+               @shlib_base_name@,libgcc_s,$(subst \
+               @shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(SHLIB_INSTALL))))
diff --git a/toolchain/gcc/patches/arc-2016.03/850-use_shared_libgcc.patch b/toolchain/gcc/patches/arc-2016.03/850-use_shared_libgcc.patch
new file mode 100644 (file)
index 0000000..6934bc9
--- /dev/null
@@ -0,0 +1,47 @@
+--- a/gcc/config/arm/linux-eabi.h
++++ b/gcc/config/arm/linux-eabi.h
+@@ -131,10 +131,6 @@
+ #define ENDFILE_SPEC \
+   LINUX_OR_ANDROID_LD (GNU_USER_TARGET_ENDFILE_SPEC, ANDROID_ENDFILE_SPEC)
+-/* Use the default LIBGCC_SPEC, not the version in linux-elf.h, as we
+-   do not use -lfloat.  */
+-#undef LIBGCC_SPEC
+-
+ /* Clear the instruction cache from `beg' to `end'.  This is
+    implemented in lib1funcs.S, so ensure an error if this definition
+    is used.  */
+--- a/gcc/config/linux.h
++++ b/gcc/config/linux.h
+@@ -51,6 +51,10 @@ see the files COPYING3 and COPYING.RUNTI
+       builtin_assert ("system=posix");                        \
+     } while (0)
++#ifndef LIBGCC_SPEC
++#define LIBGCC_SPEC "%{static|static-libgcc:-lgcc}%{!static:%{!static-libgcc:-lgcc_s}}"
++#endif
++
+ /* Determine which dynamic linker to use depending on whether GLIBC or
+    uClibc or Bionic is the default C library and whether
+    -muclibc or -mglibc or -mbionic has been passed to change the default.  */
+--- a/libgcc/mkmap-symver.awk
++++ b/libgcc/mkmap-symver.awk
+@@ -132,5 +132,5 @@ function output(lib) {
+   else if (inherit[lib])
+     printf("} %s;\n", inherit[lib]);
+   else
+-    printf ("\n  local:\n\t*;\n};\n");
++    printf ("\n\t*;\n};\n");
+ }
+--- a/gcc/config/rs6000/linux.h
++++ b/gcc/config/rs6000/linux.h
+@@ -61,6 +61,9 @@
+ #undef  CPLUSPLUS_CPP_SPEC
+ #define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
++#undef LIBGCC_SPEC
++#define LIBGCC_SPEC "%{!static:%{!static-libgcc:-lgcc_s}} -lgcc"
++
+ #undef  LINK_SHLIB_SPEC
+ #define LINK_SHLIB_SPEC "%{shared:-shared} %{!shared: %{static:-static}}"
diff --git a/toolchain/gcc/patches/arc-2016.03/851-libgcc_no_compat.patch b/toolchain/gcc/patches/arc-2016.03/851-libgcc_no_compat.patch
new file mode 100644 (file)
index 0000000..80c3476
--- /dev/null
@@ -0,0 +1,12 @@
+--- a/libgcc/config/t-libunwind
++++ b/libgcc/config/t-libunwind
+@@ -2,8 +2,7 @@
+ HOST_LIBGCC2_CFLAGS += -DUSE_GAS_SYMVER
+-LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c \
+-  $(srcdir)/unwind-compat.c $(srcdir)/unwind-dw2-fde-compat.c
++LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
+ LIB2ADDEHSTATIC = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
+ # Override the default value from t-slibgcc-elf-ver and mention -lunwind
diff --git a/toolchain/gcc/patches/arc-2016.03/860-use_eh_frame.patch b/toolchain/gcc/patches/arc-2016.03/860-use_eh_frame.patch
new file mode 100644 (file)
index 0000000..1ac83fe
--- /dev/null
@@ -0,0 +1,42 @@
+--- a/libgcc/unwind-dw2-fde-dip.c
++++ b/libgcc/unwind-dw2-fde-dip.c
+@@ -46,33 +46,13 @@
+ #include "unwind-compat.h"
+ #include "gthr.h"
+-#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
+-    && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \
+-      || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG)))
+-# define USE_PT_GNU_EH_FRAME
+-#endif
+-
+-#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
+-    && defined(__BIONIC__)
+-# define USE_PT_GNU_EH_FRAME
+-#endif
+-
+-#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
+-    && defined(__FreeBSD__) && __FreeBSD__ >= 7
+-# define ElfW __ElfN
+-# define USE_PT_GNU_EH_FRAME
+-#endif
+-
+-#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
+-    && defined(__OpenBSD__)
+-# define ElfW(type) Elf_##type
+-# define USE_PT_GNU_EH_FRAME
+-#endif
+-
+-#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
+-    && defined(TARGET_DL_ITERATE_PHDR) \
+-    && defined(__sun__) && defined(__svr4__)
++#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR)
+ # define USE_PT_GNU_EH_FRAME
++# ifdef __OpenBSD__
++#  define ElfW(type) Elf_##type
++# elif defined(__FreeBSD__) && __FreeBSD__ >= 7
++#  define ElfW __ElfN
++# endif
+ #endif
+ #if defined(USE_PT_GNU_EH_FRAME)
diff --git a/toolchain/gcc/patches/arc-2016.03/870-ppc_no_crtsavres.patch b/toolchain/gcc/patches/arc-2016.03/870-ppc_no_crtsavres.patch
new file mode 100644 (file)
index 0000000..4b7fcbd
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/gcc/config/rs6000/rs6000.c
++++ b/gcc/config/rs6000/rs6000.c
+@@ -17662,7 +17662,7 @@ rs6000_savres_strategy (rs6000_stack_t *
+   /* Define cutoff for using out-of-line functions to save registers.  */
+   if (DEFAULT_ABI == ABI_V4 || TARGET_ELF)
+     {
+-      if (!optimize_size)
++      if (1)
+       {
+         strategy |= SAVE_INLINE_FPRS | REST_INLINE_FPRS;
+         strategy |= SAVE_INLINE_GPRS | REST_INLINE_GPRS;
diff --git a/toolchain/gcc/patches/arc-2016.03/880-no_java_section.patch b/toolchain/gcc/patches/arc-2016.03/880-no_java_section.patch
new file mode 100644 (file)
index 0000000..def6c9f
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/gcc/defaults.h
++++ b/gcc/defaults.h
+@@ -380,7 +380,7 @@ see the files COPYING3 and COPYING.RUNTI
+ /* If we have named section and we support weak symbols, then use the
+    .jcr section for recording java classes which need to be registered
+    at program start-up time.  */
+-#if defined (TARGET_ASM_NAMED_SECTION) && SUPPORTS_WEAK
++#if 0 && defined (TARGET_ASM_NAMED_SECTION) && SUPPORTS_WEAK
+ #ifndef JCR_SECTION_NAME
+ #define JCR_SECTION_NAME ".jcr"
+ #endif
diff --git a/toolchain/gcc/patches/arc-2016.03/910-mbsd_multi.patch b/toolchain/gcc/patches/arc-2016.03/910-mbsd_multi.patch
new file mode 100644 (file)
index 0000000..5387f8e
--- /dev/null
@@ -0,0 +1,253 @@
+
+       This patch brings over a few features from MirBSD:
+       * -fhonour-copts
+         If this option is not given, it's warned (depending
+         on environment variables). This is to catch errors
+         of misbuilt packages which override CFLAGS themselves.
+       * -Werror-maybe-reset
+         Has the effect of -Wno-error if GCC_NO_WERROR is
+         set and not '0', a no-operation otherwise. This is
+         to be able to use -Werror in "make" but prevent
+         GNU autoconf generated configure scripts from
+         freaking out.
+       * Make -fno-strict-aliasing and -fno-delete-null-pointer-checks
+         the default for -O2/-Os, because they trigger gcc bugs
+         and can delete code with security implications.
+
+       This patch was authored by Thorsten Glaser <tg at mirbsd.de>
+       with copyright assignment to the FSF in effect.
+
+--- a/gcc/c-family/c-opts.c
++++ b/gcc/c-family/c-opts.c
+@@ -104,6 +104,9 @@ static size_t include_cursor;
+ /* Whether any standard preincluded header has been preincluded.  */
+ static bool done_preinclude;
++/* Check if a port honours COPTS.  */
++static int honour_copts = 0;
++
+ static void handle_OPT_d (const char *);
+ static void set_std_cxx98 (int);
+ static void set_std_cxx11 (int);
+@@ -383,6 +386,9 @@ c_common_handle_option (size_t scode, co
+       cpp_opts->warn_endif_labels = value;
+       break;
++    case OPT_Werror_maybe_reset:
++      break;
++
+     case OPT_Winvalid_pch:
+       cpp_opts->warn_invalid_pch = value;
+       break;
+@@ -491,6 +497,12 @@ c_common_handle_option (size_t scode, co
+       flag_no_builtin = !value;
+       break;
++    case OPT_fhonour_copts:
++      if (c_language == clk_c) {
++        honour_copts++;
++      }
++      break;
++
+     case OPT_fconstant_string_class_:
+       constant_string_class_name = arg;
+       break;
+@@ -1027,6 +1039,47 @@ c_common_init (void)
+       return false;
+     }
++  if (c_language == clk_c) {
++    char *ev = getenv ("GCC_HONOUR_COPTS");
++    int evv;
++    if (ev == NULL)
++      evv = -1;
++    else if ((*ev == '0') || (*ev == '\0'))
++      evv = 0;
++    else if (*ev == '1')
++      evv = 1;
++    else if (*ev == '2')
++      evv = 2;
++    else if (*ev == 's')
++      evv = -1;
++    else {
++      warning (0, "unknown GCC_HONOUR_COPTS value, assuming 1");
++      evv = 1; /* maybe depend this on something like MIRBSD_NATIVE?  */
++    }
++    if (evv == 1) {
++      if (honour_copts == 0) {
++        error ("someone does not honour COPTS at all in lenient mode");
++        return false;
++      } else if (honour_copts != 1) {
++        warning (0, "someone does not honour COPTS correctly, passed %d times",
++         honour_copts);
++      }
++    } else if (evv == 2) {
++      if (honour_copts == 0) {
++        error ("someone does not honour COPTS at all in strict mode");
++        return false;
++      } else if (honour_copts != 1) {
++        error ("someone does not honour COPTS correctly, passed %d times",
++         honour_copts);
++        return false;
++      }
++    } else if (evv == 0) {
++      if (honour_copts != 1)
++        inform (0, "someone does not honour COPTS correctly, passed %d times",
++         honour_copts);
++    }
++  }
++
+   return true;
+ }
+--- a/gcc/c-family/c.opt
++++ b/gcc/c-family/c.opt
+@@ -379,6 +379,10 @@ Werror-implicit-function-declaration
+ C ObjC RejectNegative Warning Alias(Werror=, implicit-function-declaration)
+ This switch is deprecated; use -Werror=implicit-function-declaration instead
++Werror-maybe-reset
++C ObjC C++ ObjC++
++; Documented in common.opt
++
+ Wfloat-equal
+ C ObjC C++ ObjC++ Var(warn_float_equal) Warning
+ Warn if testing floating point numbers for equality
+@@ -949,6 +953,9 @@ C++ ObjC++ Optimization Alias(fexception
+ fhonor-std
+ C++ ObjC++ Ignore Warn(switch %qs is no longer supported)
++fhonour-copts
++C ObjC C++ ObjC++ RejectNegative
++
+ fhosted
+ C ObjC
+ Assume normal C execution environment
+--- a/gcc/common.opt
++++ b/gcc/common.opt
+@@ -541,6 +541,10 @@ Werror=
+ Common Joined
+ Treat specified warning as error
++Werror-maybe-reset
++Common
++If environment variable GCC_NO_WERROR is set, act as -Wno-error
++
+ Wextra
+ Common Var(extra_warnings) Warning
+ Print extra (possibly unwanted) warnings
+@@ -1242,6 +1246,9 @@ fguess-branch-probability
+ Common Report Var(flag_guess_branch_prob) Optimization
+ Enable guessing of branch probabilities
++fhonour-copts
++Common RejectNegative
++
+ ; Nonzero means ignore `#ident' directives.  0 means handle them.
+ ; Generate position-independent code for executables if possible
+ ; On SVR4 targets, it also controls whether or not to emit a
+--- a/gcc/opts.c
++++ b/gcc/opts.c
+@@ -468,8 +468,6 @@ static const struct default_options defa
+     { OPT_LEVELS_2_PLUS, OPT_fschedule_insns2, NULL, 1 },
+ #endif
+     { OPT_LEVELS_2_PLUS, OPT_fregmove, NULL, 1 },
+-    { OPT_LEVELS_2_PLUS, OPT_fstrict_aliasing, NULL, 1 },
+-    { OPT_LEVELS_2_PLUS, OPT_fstrict_overflow, NULL, 1 },
+     { OPT_LEVELS_2_PLUS, OPT_freorder_blocks, NULL, 1 },
+     { OPT_LEVELS_2_PLUS, OPT_freorder_functions, NULL, 1 },
+     { OPT_LEVELS_2_PLUS, OPT_ftree_vrp, NULL, 1 },
+@@ -489,6 +487,8 @@ static const struct default_options defa
+     { OPT_LEVELS_2_PLUS, OPT_fhoist_adjacent_loads, NULL, 1 },
+     /* -O3 optimizations.  */
++    { OPT_LEVELS_3_PLUS, OPT_fstrict_aliasing, NULL, 1 },
++    { OPT_LEVELS_3_PLUS, OPT_fstrict_overflow, NULL, 1 },
+     { OPT_LEVELS_3_PLUS, OPT_ftree_loop_distribute_patterns, NULL, 1 },
+     { OPT_LEVELS_3_PLUS, OPT_fpredictive_commoning, NULL, 1 },
+     /* Inlining of functions reducing size is a good idea with -Os
+@@ -1435,6 +1435,17 @@ common_handle_option (struct gcc_options
+                              opts, opts_set, loc, dc);
+       break;
++    case OPT_Werror_maybe_reset:
++      {
++        char *ev = getenv ("GCC_NO_WERROR");
++        if ((ev != NULL) && (*ev != '0'))
++          warnings_are_errors = 0;
++      }
++      break;
++
++    case OPT_fhonour_copts:
++      break;
++
+     case OPT_Wlarger_than_:
+       opts->x_larger_than_size = value;
+       opts->x_warn_larger_than = value != -1;
+--- a/gcc/doc/cppopts.texi
++++ b/gcc/doc/cppopts.texi
+@@ -163,6 +163,11 @@ in older programs.  This warning is on b
+ Make all warnings into hard errors.  Source code which triggers warnings
+ will be rejected.
++ at item -Werror-maybe-reset
++ at opindex Werror-maybe-reset
++Act like @samp{-Wno-error} if the @env{GCC_NO_WERROR} environment
++variable is set to anything other than 0 or empty.
++
+ @item -Wsystem-headers
+ @opindex Wsystem-headers
+ Issue warnings for code in system headers.  These are normally unhelpful
+--- a/gcc/doc/invoke.texi
++++ b/gcc/doc/invoke.texi
+@@ -240,7 +240,7 @@ Objective-C and Objective-C++ Dialects}.
+ -Wconversion  -Wcoverage-mismatch  -Wno-cpp  -Wno-deprecated  @gol
+ -Wno-deprecated-declarations -Wdisabled-optimization  @gol
+ -Wno-div-by-zero -Wdouble-promotion -Wempty-body  -Wenum-compare @gol
+--Wno-endif-labels -Werror  -Werror=* @gol
++-Wno-endif-labels -Werror  -Werror=* -Werror-maybe-reset @gol
+ -Wfatal-errors  -Wfloat-equal  -Wformat  -Wformat=2 @gol
+ -Wno-format-contains-nul -Wno-format-extra-args -Wformat-nonliteral @gol
+ -Wformat-security  -Wformat-y2k @gol
+@@ -4817,6 +4817,22 @@ This option is only supported for C and 
+ @option{-Wall} and by @option{-Wpedantic}, which can be disabled with
+ @option{-Wno-pointer-sign}.
++ at item -Werror-maybe-reset
++ at opindex Werror-maybe-reset
++Act like @samp{-Wno-error} if the @env{GCC_NO_WERROR} environment
++variable is set to anything other than 0 or empty.
++
++ at item -fhonour-copts
++ at opindex fhonour-copts
++If @env{GCC_HONOUR_COPTS} is set to 1, abort if this option is not
++given at least once, and warn if it is given more than once.
++If @env{GCC_HONOUR_COPTS} is set to 2, abort if this option is not
++given exactly once.
++If @env{GCC_HONOUR_COPTS} is set to 0 or unset, warn if this option
++is not given exactly once.
++The warning is quelled if @env{GCC_HONOUR_COPTS} is set to @samp{s}.
++This flag and environment variable only affect the C language.
++
+ @item -Wstack-protector
+ @opindex Wstack-protector
+ @opindex Wno-stack-protector
+@@ -6928,7 +6944,7 @@ so, the first branch is redirected to ei
+ second branch or a point immediately following it, depending on whether
+ the condition is known to be true or false.
+-Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
++Enabled at levels @option{-O3}.
+ @item -fsplit-wide-types
+ @opindex fsplit-wide-types
+--- a/gcc/java/jvspec.c
++++ b/gcc/java/jvspec.c
+@@ -626,6 +626,7 @@ lang_specific_pre_link (void)
+      class name.  Append dummy `.c' that can be stripped by set_input so %b
+      is correct.  */ 
+   set_input (concat (main_class_name, "main.c", NULL));
++  putenv ("GCC_HONOUR_COPTS=s"); /* XXX hack!  */
+   err = do_spec (jvgenmain_spec);
+   if (err == 0)
+     {
diff --git a/toolchain/gcc/patches/arc-2016.03/920-specs_nonfatal_getenv.patch b/toolchain/gcc/patches/arc-2016.03/920-specs_nonfatal_getenv.patch
new file mode 100644 (file)
index 0000000..09768f5
--- /dev/null
@@ -0,0 +1,14 @@
+--- a/gcc/gcc.c
++++ b/gcc/gcc.c
+@@ -8029,7 +8029,10 @@ getenv_spec_function (int argc, const ch
+   value = getenv (argv[0]);
+   if (!value)
+-    fatal_error ("environment variable %qs not defined", argv[0]);
++    {
++      warning (0, "environment variable %qs not defined", argv[0]);
++      value = "";
++    }
+   /* We have to escape every character of the environment variable so
+      they are not interpreted as active spec characters.  A
diff --git a/toolchain/gcc/patches/arc-2016.03/940-no-clobber-stamp-bits.patch b/toolchain/gcc/patches/arc-2016.03/940-no-clobber-stamp-bits.patch
new file mode 100644 (file)
index 0000000..dbecef2
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/libstdc++-v3/include/Makefile.in
++++ b/libstdc++-v3/include/Makefile.in
+@@ -1342,7 +1342,7 @@
+       @$(STAMP) stamp-bits
+ stamp-bits-sup: stamp-bits ${bits_sup_headers}
+-      @-cd ${bits_builddir} && $(LN_S) $? . 2>/dev/null
++      @-cd ${bits_builddir} && $(LN_S) $(filter-out stamp-bits,$?) . 2>/dev/null
+       @$(STAMP) stamp-bits-sup
+ stamp-c_base: ${c_base_headers}
index 0e1b0a27bce199a02ced791e5fc872c2a186a3a3..97d88d65a60de92bab5db3e36a273598be125204 100644 (file)
@@ -9,11 +9,11 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=gdb
 
 ifeq ($(CONFIG_arc),y)
-PKG_VERSION:=arc-2015.06-gdb
+PKG_VERSION:=arc-2016.03-gdb
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb/archive/arc-2015.06-gdb/
-PKG_MD5SUM:=d318829bfd2ed62714817f0d25706825
+PKG_SOURCE_URL:=https://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb/archive/arc-2016.03-gdb
+PKG_MD5SUM:=775caaf6385c16f20b6f53c0a2b95f79
 GDB_DIR:=binutils-$(PKG_NAME)-$(PKG_VERSION)
 else
 PKG_VERSION:=7.11
diff --git a/toolchain/gdb/patches/arc-2015.06-gdb/100-no_extern_inline.patch b/toolchain/gdb/patches/arc-2015.06-gdb/100-no_extern_inline.patch
deleted file mode 100644 (file)
index bbae1d7..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
---- a/sim/common/sim-arange.c
-+++ b/sim/common/sim-arange.c
-@@ -280,11 +280,7 @@ sim_addr_range_delete (ADDR_RANGE *ar, a
-   build_search_tree (ar);
- }
--#endif /* DEFINE_NON_INLINE_P */
--
--#if DEFINE_INLINE_P
--
--SIM_ARANGE_INLINE int
-+int
- sim_addr_range_hit_p (ADDR_RANGE *ar, address_word addr)
- {
-   ADDR_RANGE_TREE *t = ar->range_tree;
-@@ -301,4 +297,4 @@ sim_addr_range_hit_p (ADDR_RANGE *ar, ad
-   return 0;
- }
--#endif /* DEFINE_INLINE_P */
-+#endif /* DEFINE_NON_INLINE_P */
---- a/sim/common/sim-arange.h
-+++ b/sim/common/sim-arange.h
-@@ -62,7 +62,7 @@ extern void sim_addr_range_delete (ADDR_
- /* Return non-zero if ADDR is in range AR, traversing the entire tree.
-    If no range is specified, that is defined to mean "everything".  */
--extern INLINE int
-+extern int
- sim_addr_range_hit_p (ADDR_RANGE * /*ar*/, address_word /*addr*/);
- #define ADDR_RANGE_HIT_P(ar, addr) \
-   ((ar)->range_tree == NULL || sim_addr_range_hit_p ((ar), (addr)))
diff --git a/toolchain/gdb/patches/arc-2015.06-gdb/110-no_testsuite.patch b/toolchain/gdb/patches/arc-2015.06-gdb/110-no_testsuite.patch
deleted file mode 100644 (file)
index 5c5d15c..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
---- a/gdb/configure
-+++ b/gdb/configure
-@@ -855,8 +855,7 @@ MAKEINFOFLAGS
- YACC
- YFLAGS
- XMKMF'
--ac_subdirs_all='testsuite
--gdbtk
-+ac_subdirs_all='gdbtk
- multi-ice
- gdbserver'
-@@ -5168,7 +5167,7 @@ $as_echo "$with_auto_load_safe_path" >&6
--subdirs="$subdirs testsuite"
-+subdirs="$subdirs"
- # Check whether to support alternative target configurations
diff --git a/toolchain/gdb/patches/arc-2015.06-gdb/120-fix-compile-flag-mismatch.patch b/toolchain/gdb/patches/arc-2015.06-gdb/120-fix-compile-flag-mismatch.patch
deleted file mode 100644 (file)
index ce34c95..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/gdb/gdbserver/configure
-+++ b/gdb/gdbserver/configure
-@@ -2183,7 +2183,7 @@ $as_echo "$as_me: error: \`$ac_var' was
-       ac_cache_corrupted=: ;;
-     ,);;
-     *)
--      if test "x$ac_old_val" != "x$ac_new_val"; then
-+      if test "`echo x$ac_old_val`" != "`echo x$ac_new_val`"; then
-       # differences in whitespace do not lead to failure.
-       ac_old_val_w=`echo x $ac_old_val`
-       ac_new_val_w=`echo x $ac_new_val`
diff --git a/toolchain/gdb/patches/arc-2016.03/100-no_extern_inline.patch b/toolchain/gdb/patches/arc-2016.03/100-no_extern_inline.patch
new file mode 100644 (file)
index 0000000..8c18c6e
--- /dev/null
@@ -0,0 +1,32 @@
+--- a/sim/common/sim-arange.c
++++ b/sim/common/sim-arange.c
+@@ -280,11 +280,7 @@ sim_addr_range_delete (ADDR_RANGE *ar, a
+   build_search_tree (ar);
+ }
+-#endif /* DEFINE_NON_INLINE_P */
+-
+-#if DEFINE_INLINE_P
+-
+-SIM_ARANGE_INLINE int
++int
+ sim_addr_range_hit_p (ADDR_RANGE *ar, address_word addr)
+ {
+   ADDR_RANGE_TREE *t = ar->range_tree;
+@@ -301,4 +297,4 @@ sim_addr_range_hit_p (ADDR_RANGE *ar, ad
+   return 0;
+ }
+-#endif /* DEFINE_INLINE_P */
++#endif /* DEFINE_NON_INLINE_P */
+--- a/sim/common/sim-arange.h
++++ b/sim/common/sim-arange.h
+@@ -73,7 +73,7 @@ extern void sim_addr_range_delete (ADDR_
+ /* Return non-zero if ADDR is in range AR, traversing the entire tree.
+    If no range is specified, that is defined to mean "everything".  */
+-SIM_ARANGE_INLINE int
++extern int
+ sim_addr_range_hit_p (ADDR_RANGE * /*ar*/, address_word /*addr*/);
+ #define ADDR_RANGE_HIT_P(ar, addr) \
+   ((ar)->range_tree == NULL || sim_addr_range_hit_p ((ar), (addr)))
diff --git a/toolchain/gdb/patches/arc-2016.03/110-no_testsuite.patch b/toolchain/gdb/patches/arc-2016.03/110-no_testsuite.patch
new file mode 100644 (file)
index 0000000..1b284ea
--- /dev/null
@@ -0,0 +1,21 @@
+--- a/gdb/configure
++++ b/gdb/configure
+@@ -870,8 +870,7 @@ MAKEINFOFLAGS
+ YACC
+ YFLAGS
+ XMKMF'
+-ac_subdirs_all='testsuite
+-gdbtk
++ac_subdirs_all='gdbtk
+ multi-ice
+ gdbserver'
+@@ -5610,7 +5610,7 @@ $as_echo "$with_auto_load_safe_path" >&6
+-subdirs="$subdirs testsuite"
++subdirs="$subdirs"
+ # Check whether to support alternative target configurations
diff --git a/toolchain/gdb/patches/arc-2016.03/120-fix-compile-flag-mismatch.patch b/toolchain/gdb/patches/arc-2016.03/120-fix-compile-flag-mismatch.patch
new file mode 100644 (file)
index 0000000..c8b41f2
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/gdb/gdbserver/configure
++++ b/gdb/gdbserver/configure
+@@ -2468,7 +2468,7 @@ $as_echo "$as_me: error: \`$ac_var' was
+       ac_cache_corrupted=: ;;
+     ,);;
+     *)
+-      if test "x$ac_old_val" != "x$ac_new_val"; then
++      if test "`echo x$ac_old_val`" != "`echo x$ac_new_val`"; then
+       # differences in whitespace do not lead to failure.
+       ac_old_val_w=`echo x $ac_old_val`
+       ac_new_val_w=`echo x $ac_new_val`
diff --git a/toolchain/gdb/patches/arc-2016.03/200-arc-fix-target-mask.patch b/toolchain/gdb/patches/arc-2016.03/200-arc-fix-target-mask.patch
new file mode 100644 (file)
index 0000000..7e51d58
--- /dev/null
@@ -0,0 +1,13 @@
+diff --git a/bfd/config.bfd b/bfd/config.bfd
+index 5145d4a..a9c9c99 100644
+--- a/bfd/config.bfd
++++ b/bfd/config.bfd
+@@ -275,7 +275,7 @@ case "${targ}" in
+     targ_defvec=am33_elf32_linux_vec
+     ;;
+-  arc*-*-elf* | arc*-*-linux-uclibc*)
++  arc*-*-elf* | arc*-*-linux-*)
+     targ_defvec=arc_elf32_le_vec
+     targ_selvecs=arc_elf32_be_vec
+     ;;