ARC: update tools to arc-2015.06 release
authorAlexey Brodkin <Alexey.Brodkin@synopsys.com>
Wed, 15 Jul 2015 12:51:18 +0000 (15:51 +0300)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sat, 18 Jul 2015 09:13:31 +0000 (11:13 +0200)
I'm happy to update GNU tools for ARC cores to the most recent
arc-2015.06 release.

This release brings following major improvements:
 * GCC: source update to v4.8.4
 * GCC: C ABI compatibility between MetaWare and GNU toolchains
 * uClibc: support for thread local storage and Native Pthread Library (NPTL)
 * GDB: updated to version 7.9.1

Also a lot of fixes and improvements has been done, please refer to
https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases/tag/arc-2015.06
for more details.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Anton Kolesov <akolesov@synopsys.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Peter Korsgaard <peter@korsgaard.com>
Cc: Romain Naour <romain.naour@openwide.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
19 files changed:
package/binutils/Config.in.host
package/binutils/arc-2015.06-rc1/0001-PR-other-56780.patch [deleted file]
package/binutils/arc-2015.06-rc1/600-poison-system-directories.patch [deleted file]
package/binutils/arc-2015.06/0001-PR-other-56780.patch [new file with mode: 0644]
package/binutils/arc-2015.06/600-poison-system-directories.patch [new file with mode: 0644]
package/binutils/binutils.hash
package/binutils/binutils.mk
package/gcc/Config.in.host
package/gcc/arc-2015.06-rc1/100-libstdcxx-uclibc-c99.patch [deleted file]
package/gcc/arc-2015.06-rc1/851-PR-other-56780.patch [deleted file]
package/gcc/arc-2015.06-rc1/910-gcc-poison-system-directories.patch [deleted file]
package/gcc/arc-2015.06/100-libstdcxx-uclibc-c99.patch [new file with mode: 0644]
package/gcc/arc-2015.06/851-PR-other-56780.patch [new file with mode: 0644]
package/gcc/arc-2015.06/910-gcc-poison-system-directories.patch [new file with mode: 0644]
package/gcc/gcc.hash
package/gdb/Config.in.host
package/gdb/gdb.hash
package/uclibc/Config.in
package/uclibc/uclibc.hash

index 76e7e77cde2703ef49d2fa6688ebd417a5a34e21..70253cc9b68b0c4b3611d746fa5d4ababececb54 100644 (file)
@@ -24,7 +24,7 @@ endchoice
 
 config BR2_BINUTILS_VERSION
        string
-       default "arc-2015.06-rc1"       if BR2_arc
+       default "arc-2015.06"   if BR2_arc
        default "2.23.2"        if BR2_BINUTILS_VERSION_2_23_2
        default "2.24"          if BR2_BINUTILS_VERSION_2_24
        default "2.25"          if BR2_BINUTILS_VERSION_2_25
diff --git a/package/binutils/arc-2015.06-rc1/0001-PR-other-56780.patch b/package/binutils/arc-2015.06-rc1/0001-PR-other-56780.patch
deleted file mode 100644 (file)
index b418a2f..0000000
+++ /dev/null
@@ -1,236 +0,0 @@
-From 7827cdf59a1894abe18aa20043a63c8c875c3fce Mon Sep 17 00:00:00 2001
-From: DJ Delorie <dj@redhat.com>
-Date: Sat, 1 Jun 2013 01:01:44 +0000
-Subject: [PATCH] PR other/56780 merge from gcc
-
-binutils-gdb upstream a4818a052efb4cea976a03a2f7cb0b38b23d12d0
-
-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
-  rename patch name
-  squash the two upstream commits
-  Remove the ChangeLog]
-Signed-off-by: Romain Naour <romain.naour@openwide.fr>
----
- 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 0a5da31..4f40c72 100644
---- a/libiberty/Makefile.in
-+++ b/libiberty/Makefile.in
-@@ -354,19 +354,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 6e98352..44d1f78 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'
-@@ -5475,7 +5504,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
-@@ -5752,29 +5780,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 754b66a..04260ec 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
-@@ -379,7 +404,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
-@@ -490,27 +514,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/binutils/arc-2015.06-rc1/600-poison-system-directories.patch b/package/binutils/arc-2015.06-rc1/600-poison-system-directories.patch
deleted file mode 100644 (file)
index 8a3bdc6..0000000
+++ /dev/null
@@ -1,279 +0,0 @@
-Patch adapted to binutils arc-4.8-R3 and extended to use
-BR_COMPILER_PARANOID_UNSAFE_PATH by Thomas Petazzoni.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
-Upstream-Status: Inappropriate [distribution: codesourcery]
-
-Patch originally created by Mark Hatle, forward-ported to
-binutils 2.21 by Scott Garman.
-
-purpose:  warn for uses of system directories when cross linking
-
-Code Merged from Sourcery G++ binutils 2.19 - 4.4-277
-
-2008-07-02  Joseph Myers  <joseph@codesourcery.com>
-
-    ld/
-    * ld.h (args_type): Add error_poison_system_directories.
-    * ld.texinfo (--error-poison-system-directories): Document.
-    * ldfile.c (ldfile_add_library_path): Check
-    command_line.error_poison_system_directories.
-    * ldmain.c (main): Initialize
-    command_line.error_poison_system_directories.
-    * lexsup.c (enum option_values): Add
-    OPTION_ERROR_POISON_SYSTEM_DIRECTORIES.
-    (ld_options): Add --error-poison-system-directories.
-    (parse_args): Handle new option.
-
-2007-06-13  Joseph Myers  <joseph@codesourcery.com>
-
-    ld/
-    * config.in: Regenerate.
-    * ld.h (args_type): Add poison_system_directories.
-    * ld.texinfo (--no-poison-system-directories): Document.
-    * ldfile.c (ldfile_add_library_path): Check
-    command_line.poison_system_directories.
-    * ldmain.c (main): Initialize
-    command_line.poison_system_directories.
-    * lexsup.c (enum option_values): Add
-    OPTION_NO_POISON_SYSTEM_DIRECTORIES.
-    (ld_options): Add --no-poison-system-directories.
-    (parse_args): Handle new option.
-
-2007-04-20  Joseph Myers  <joseph@codesourcery.com>
-
-    Merge from Sourcery G++ binutils 2.17:
-
-    2007-03-20  Joseph Myers  <joseph@codesourcery.com>
-    Based on patch by Mark Hatle <mark.hatle@windriver.com>.
-    ld/
-    * configure.in (--enable-poison-system-directories): New option.
-    * configure, config.in: Regenerate.
-    * ldfile.c (ldfile_add_library_path): If
-    ENABLE_POISON_SYSTEM_DIRECTORIES defined, warn for use of /lib,
-    /usr/lib, /usr/local/lib or /usr/X11R6/lib.
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
-Index: b/ld/config.in
-===================================================================
---- a/ld/config.in
-+++ b/ld/config.in
-@@ -11,6 +11,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
-Index: b/ld/configure
-===================================================================
---- a/ld/configure
-+++ b/ld/configure
-@@ -773,6 +773,7 @@
- enable_targets
- enable_64_bit_bfd
- with_sysroot
-+enable_poison_system_directories
- enable_gold
- enable_got
- enable_werror
-@@ -1428,6 +1429,8 @@
-                         (and sometimes confusing) to the casual installer
-   --enable-targets        alternative target configurations
-   --enable-64-bit-bfd     64-bit support (on hosts with narrower word sizes)
-+  --enable-poison-system-directories
-+                          warn for use of native system library directories
-   --enable-gold[=ARG]     build gold [ARG={default,yes,no}]
-   --enable-got=<type>     GOT handling scheme (target, single, negative,
-                           multigot)
-@@ -4338,7 +4341,18 @@
- fi
-+# Check whether --enable-poison-system-directories was given.
-+if test "${enable_poison_system_directories+set}" = set; then :
-+  enableval=$enable_poison_system_directories;
-+else
-+  enable_poison_system_directories=no
-+fi
-+
-+if test "x${enable_poison_system_directories}" = "xyes"; then
-+$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h
-+
-+fi
- # Check whether --enable-got was given.
- if test "${enable_got+set}" = set; then :
-Index: b/ld/configure.in
-===================================================================
---- a/ld/configure.in
-+++ b/ld/configure.in
-@@ -70,6 +70,16 @@
- AC_SUBST(TARGET_SYSTEM_ROOT)
- AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE)
-+AC_ARG_ENABLE([poison-system-directories],
-+         AS_HELP_STRING([--enable-poison-system-directories],
-+                [warn for use of native system library directories]),,
-+         [enable_poison_system_directories=no])
-+if test "x${enable_poison_system_directories}" = "xyes"; then
-+  AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES],
-+       [1],
-+       [Define to warn for use of native system library directories])
-+fi
-+
- dnl Use --enable-gold to decide if this linker should be the default.
- dnl "install_as_default" is set to false if gold is the default linker.
- dnl "installed_linker" is the installed BFD linker name.
-Index: b/ld/ldfile.c
-===================================================================
---- a/ld/ldfile.c
-+++ b/ld/ldfile.c
-@@ -116,6 +116,23 @@
-     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.  */
-Index: b/ld/ld.h
-===================================================================
---- a/ld/ld.h
-+++ b/ld/ld.h
-@@ -203,6 +203,14 @@
-   /* If TRUE we'll just print the default output on stdout.  */
-   bfd_boolean print_output_format;
-+  /* 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;
-Index: b/ld/ldmain.c
-===================================================================
---- a/ld/ldmain.c
-+++ b/ld/ldmain.c
-@@ -265,6 +265,8 @@
-   command_line.warn_search_mismatch = TRUE;
-   command_line.check_section_addresses = -1;
-   command_line.disable_target_specific_optimizations = -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
-Index: b/ld/ld.texinfo
-===================================================================
---- a/ld/ld.texinfo
-+++ b/ld/ld.texinfo
-@@ -2156,6 +2156,18 @@
- Passing @code{none} for @var{style} disables the setting from any
- @code{--build-id} options earlier on the command line.
-+
-+@kindex --no-poison-system-directories
-+@item --no-poison-system-directories
-+Do not warn for @option{-L} options using system directories such as
-+@file{/usr/lib} when cross linking.  This option is intended for use
-+in chroot environments when such directories contain the correct
-+libraries for the target system rather than the host.
-+
-+@kindex --error-poison-system-directories
-+@item --error-poison-system-directories
-+Give an error instead of a warning for @option{-L} options using
-+system directories when cross linking.
- @end table
- @c man end
-Index: b/ld/lexsup.c
-===================================================================
---- a/ld/lexsup.c
-+++ b/ld/lexsup.c
-@@ -498,6 +498,14 @@
-     TWO_DASHES },
-   { {"wrap", required_argument, NULL, OPTION_WRAP},
-     '\0', N_("SYMBOL"), N_("Use wrapper functions for SYMBOL"), 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)
-@@ -510,6 +518,7 @@
-   int ingroup = 0;
-   char *default_dirlist = NULL;
-   char *shortopts;
-+  char *BR_paranoid_env;
-   struct option *longopts;
-   struct option *really_longopts;
-   int last_optind;
-@@ -1427,9 +1436,21 @@
-               einfo (_("%P%X: --hash-size needs a numeric argument\n"));
-           }
-           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;
-       }
-     }
-+  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 ();
-Index: b/ld/ldlex.h
-===================================================================
---- a/ld/ldlex.h
-+++ b/ld/ldlex.h
-@@ -136,6 +136,8 @@
- #endif /* ENABLE_PLUGINS */
-   OPTION_DEFAULT_SCRIPT,
-   OPTION_PRINT_OUTPUT_FORMAT,
-+  OPTION_NO_POISON_SYSTEM_DIRECTORIES,
-+  OPTION_ERROR_POISON_SYSTEM_DIRECTORIES,
- };
- /* The initial parser states.  */
diff --git a/package/binutils/arc-2015.06/0001-PR-other-56780.patch b/package/binutils/arc-2015.06/0001-PR-other-56780.patch
new file mode 100644 (file)
index 0000000..b418a2f
--- /dev/null
@@ -0,0 +1,236 @@
+From 7827cdf59a1894abe18aa20043a63c8c875c3fce Mon Sep 17 00:00:00 2001
+From: DJ Delorie <dj@redhat.com>
+Date: Sat, 1 Jun 2013 01:01:44 +0000
+Subject: [PATCH] PR other/56780 merge from gcc
+
+binutils-gdb upstream a4818a052efb4cea976a03a2f7cb0b38b23d12d0
+
+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
+  rename patch name
+  squash the two upstream commits
+  Remove the ChangeLog]
+Signed-off-by: Romain Naour <romain.naour@openwide.fr>
+---
+ 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 0a5da31..4f40c72 100644
+--- a/libiberty/Makefile.in
++++ b/libiberty/Makefile.in
+@@ -354,19 +354,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 6e98352..44d1f78 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'
+@@ -5475,7 +5504,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
+@@ -5752,29 +5780,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 754b66a..04260ec 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
+@@ -379,7 +404,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
+@@ -490,27 +514,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/binutils/arc-2015.06/600-poison-system-directories.patch b/package/binutils/arc-2015.06/600-poison-system-directories.patch
new file mode 100644 (file)
index 0000000..8a3bdc6
--- /dev/null
@@ -0,0 +1,279 @@
+Patch adapted to binutils arc-4.8-R3 and extended to use
+BR_COMPILER_PARANOID_UNSAFE_PATH by Thomas Petazzoni.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Upstream-Status: Inappropriate [distribution: codesourcery]
+
+Patch originally created by Mark Hatle, forward-ported to
+binutils 2.21 by Scott Garman.
+
+purpose:  warn for uses of system directories when cross linking
+
+Code Merged from Sourcery G++ binutils 2.19 - 4.4-277
+
+2008-07-02  Joseph Myers  <joseph@codesourcery.com>
+
+    ld/
+    * ld.h (args_type): Add error_poison_system_directories.
+    * ld.texinfo (--error-poison-system-directories): Document.
+    * ldfile.c (ldfile_add_library_path): Check
+    command_line.error_poison_system_directories.
+    * ldmain.c (main): Initialize
+    command_line.error_poison_system_directories.
+    * lexsup.c (enum option_values): Add
+    OPTION_ERROR_POISON_SYSTEM_DIRECTORIES.
+    (ld_options): Add --error-poison-system-directories.
+    (parse_args): Handle new option.
+
+2007-06-13  Joseph Myers  <joseph@codesourcery.com>
+
+    ld/
+    * config.in: Regenerate.
+    * ld.h (args_type): Add poison_system_directories.
+    * ld.texinfo (--no-poison-system-directories): Document.
+    * ldfile.c (ldfile_add_library_path): Check
+    command_line.poison_system_directories.
+    * ldmain.c (main): Initialize
+    command_line.poison_system_directories.
+    * lexsup.c (enum option_values): Add
+    OPTION_NO_POISON_SYSTEM_DIRECTORIES.
+    (ld_options): Add --no-poison-system-directories.
+    (parse_args): Handle new option.
+
+2007-04-20  Joseph Myers  <joseph@codesourcery.com>
+
+    Merge from Sourcery G++ binutils 2.17:
+
+    2007-03-20  Joseph Myers  <joseph@codesourcery.com>
+    Based on patch by Mark Hatle <mark.hatle@windriver.com>.
+    ld/
+    * configure.in (--enable-poison-system-directories): New option.
+    * configure, config.in: Regenerate.
+    * ldfile.c (ldfile_add_library_path): If
+    ENABLE_POISON_SYSTEM_DIRECTORIES defined, warn for use of /lib,
+    /usr/lib, /usr/local/lib or /usr/X11R6/lib.
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+Index: b/ld/config.in
+===================================================================
+--- a/ld/config.in
++++ b/ld/config.in
+@@ -11,6 +11,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
+Index: b/ld/configure
+===================================================================
+--- a/ld/configure
++++ b/ld/configure
+@@ -773,6 +773,7 @@
+ enable_targets
+ enable_64_bit_bfd
+ with_sysroot
++enable_poison_system_directories
+ enable_gold
+ enable_got
+ enable_werror
+@@ -1428,6 +1429,8 @@
+                         (and sometimes confusing) to the casual installer
+   --enable-targets        alternative target configurations
+   --enable-64-bit-bfd     64-bit support (on hosts with narrower word sizes)
++  --enable-poison-system-directories
++                          warn for use of native system library directories
+   --enable-gold[=ARG]     build gold [ARG={default,yes,no}]
+   --enable-got=<type>     GOT handling scheme (target, single, negative,
+                           multigot)
+@@ -4338,7 +4341,18 @@
+ fi
++# Check whether --enable-poison-system-directories was given.
++if test "${enable_poison_system_directories+set}" = set; then :
++  enableval=$enable_poison_system_directories;
++else
++  enable_poison_system_directories=no
++fi
++
++if test "x${enable_poison_system_directories}" = "xyes"; then
++$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h
++
++fi
+ # Check whether --enable-got was given.
+ if test "${enable_got+set}" = set; then :
+Index: b/ld/configure.in
+===================================================================
+--- a/ld/configure.in
++++ b/ld/configure.in
+@@ -70,6 +70,16 @@
+ AC_SUBST(TARGET_SYSTEM_ROOT)
+ AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE)
++AC_ARG_ENABLE([poison-system-directories],
++         AS_HELP_STRING([--enable-poison-system-directories],
++                [warn for use of native system library directories]),,
++         [enable_poison_system_directories=no])
++if test "x${enable_poison_system_directories}" = "xyes"; then
++  AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES],
++       [1],
++       [Define to warn for use of native system library directories])
++fi
++
+ dnl Use --enable-gold to decide if this linker should be the default.
+ dnl "install_as_default" is set to false if gold is the default linker.
+ dnl "installed_linker" is the installed BFD linker name.
+Index: b/ld/ldfile.c
+===================================================================
+--- a/ld/ldfile.c
++++ b/ld/ldfile.c
+@@ -116,6 +116,23 @@
+     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.  */
+Index: b/ld/ld.h
+===================================================================
+--- a/ld/ld.h
++++ b/ld/ld.h
+@@ -203,6 +203,14 @@
+   /* If TRUE we'll just print the default output on stdout.  */
+   bfd_boolean print_output_format;
++  /* 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;
+Index: b/ld/ldmain.c
+===================================================================
+--- a/ld/ldmain.c
++++ b/ld/ldmain.c
+@@ -265,6 +265,8 @@
+   command_line.warn_search_mismatch = TRUE;
+   command_line.check_section_addresses = -1;
+   command_line.disable_target_specific_optimizations = -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
+Index: b/ld/ld.texinfo
+===================================================================
+--- a/ld/ld.texinfo
++++ b/ld/ld.texinfo
+@@ -2156,6 +2156,18 @@
+ Passing @code{none} for @var{style} disables the setting from any
+ @code{--build-id} options earlier on the command line.
++
++@kindex --no-poison-system-directories
++@item --no-poison-system-directories
++Do not warn for @option{-L} options using system directories such as
++@file{/usr/lib} when cross linking.  This option is intended for use
++in chroot environments when such directories contain the correct
++libraries for the target system rather than the host.
++
++@kindex --error-poison-system-directories
++@item --error-poison-system-directories
++Give an error instead of a warning for @option{-L} options using
++system directories when cross linking.
+ @end table
+ @c man end
+Index: b/ld/lexsup.c
+===================================================================
+--- a/ld/lexsup.c
++++ b/ld/lexsup.c
+@@ -498,6 +498,14 @@
+     TWO_DASHES },
+   { {"wrap", required_argument, NULL, OPTION_WRAP},
+     '\0', N_("SYMBOL"), N_("Use wrapper functions for SYMBOL"), 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)
+@@ -510,6 +518,7 @@
+   int ingroup = 0;
+   char *default_dirlist = NULL;
+   char *shortopts;
++  char *BR_paranoid_env;
+   struct option *longopts;
+   struct option *really_longopts;
+   int last_optind;
+@@ -1427,9 +1436,21 @@
+               einfo (_("%P%X: --hash-size needs a numeric argument\n"));
+           }
+           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;
+       }
+     }
++  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 ();
+Index: b/ld/ldlex.h
+===================================================================
+--- a/ld/ldlex.h
++++ b/ld/ldlex.h
+@@ -136,6 +136,8 @@
+ #endif /* ENABLE_PLUGINS */
+   OPTION_DEFAULT_SCRIPT,
+   OPTION_PRINT_OUTPUT_FORMAT,
++  OPTION_NO_POISON_SYSTEM_DIRECTORIES,
++  OPTION_ERROR_POISON_SYSTEM_DIRECTORIES,
+ };
+ /* The initial parser states.  */
index f662adcc626fc460b72383d4bfd13d9c1b4dcda8..6f45a9c622810bf24beac31a2a63bc15e69f316b 100644 (file)
@@ -4,4 +4,4 @@ sha512  dec753bbba008f1526b89cf1bd85feba78f362f5333ffdf93953fd131eb755976dec82a0
 sha512  5ec95ad47d49b12c4558a8db0ca2109d3ee1955e3776057f3330c4506f8f4d1cf5e505fbf8a16b98403a0fcdeaaf986fe0a22be6456247dbdace63ce1f776b12  binutils-2.24.tar.bz2
 sha512  49438970642f379978aba988e3d2e7b63dab6fd0b46d91f4100f083e87a84d242089daca58572245fe620457a77bbbe2d78588ff3fb79314e500d1a39bf96f30  binutils-2.25.tar.bz2
 # No hash for the ARC variant, comes from the github-helper:
-none   xxx  binutils-arc-2015.06-rc1.tar.gz
+none   xxx  binutils-arc-2015.06.tar.gz
index 009a9001f70dfcb869867eeafc4f30793f153c64..535c019567b2df576ab515e2f52daf926e0feec5 100644 (file)
@@ -9,7 +9,7 @@
 BINUTILS_VERSION = $(call qstrip,$(BR2_BINUTILS_VERSION))
 ifeq ($(BINUTILS_VERSION),)
 ifeq ($(BR2_arc),y)
-BINUTILS_VERSION = arc-2015.06-rc1
+BINUTILS_VERSION = arc-2015.06
 else
 BINUTILS_VERSION = 2.24
 endif
index 4501b322e2db590fa4d5dc9df66d2db31ff5d653..890e7289fe8556670210a7f6872e3670e2298cf1 100644 (file)
@@ -99,7 +99,7 @@ config BR2_GCC_VERSION
        default "4.8.5"     if BR2_GCC_VERSION_4_8_X
        default "4.9.3"     if BR2_GCC_VERSION_4_9_X
        default "5.1.0"     if BR2_GCC_VERSION_5_1_X
-       default "arc-2015.06-rc1" if BR2_GCC_VERSION_4_8_ARC
+       default "arc-2015.06" if BR2_GCC_VERSION_4_8_ARC
 
 config BR2_EXTRA_GCC_CONFIG_OPTIONS
        string "Additional gcc options"
diff --git a/package/gcc/arc-2015.06-rc1/100-libstdcxx-uclibc-c99.patch b/package/gcc/arc-2015.06-rc1/100-libstdcxx-uclibc-c99.patch
deleted file mode 100644 (file)
index 0d02ef0..0000000
+++ /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 <thomas.petazzoni@free-electrons.com>
-
-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
-@@ -2811,7 +2811,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 <ext/string_conversions.h>
-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<ctype<_CharT> >(__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<char*>(__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 <ext/string_conversions.h>
-Index: b/libstdc++-v3/include/tr1/cstdio
-===================================================================
---- a/libstdc++-v3/include/tr1/cstdio
-+++ b/libstdc++-v3/include/tr1/cstdio
-@@ -33,7 +33,7 @@
- #include <cstdio>
--#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
-@@ -138,7 +138,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-2015.06-rc1/851-PR-other-56780.patch b/package/gcc/arc-2015.06-rc1/851-PR-other-56780.patch
deleted file mode 100644 (file)
index feb4339..0000000
+++ /dev/null
@@ -1,244 +0,0 @@
-From afe990251bd9b3a063f03da31a3b8d139d033bc3 Mon Sep 17 00:00:00 2001
-From: ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
-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 <romain.naour@openwide.fr>
----
- 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-2015.06-rc1/910-gcc-poison-system-directories.patch b/package/gcc/arc-2015.06-rc1/910-gcc-poison-system-directories.patch
deleted file mode 100644 (file)
index 67b3799..0000000
+++ /dev/null
@@ -1,221 +0,0 @@
-From 160397ef3c3331099af028f1b8d3e085b07d88ad Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:59:00 +0400
-Subject: [PATCH 16/35] gcc: poison-system-directories
-
-Adapted to Buildroot and gcc arc-4.8-R3 by Thomas Petazzoni,
-especially the addition of the BR_COMPILER_PARANOID_UNSAFE_PATH
-environment variable.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
-Upstream-Status: Inappropriate [distribution: codesourcery]
----
- gcc/Makefile.in     |    2 +-
- gcc/common.opt      |    4 ++++
- gcc/config.in       |    6 ++++++
- gcc/configure       |   20 ++++++++++++++++++--
- gcc/configure.ac    |   10 ++++++++++
- gcc/doc/invoke.texi |    9 +++++++++
- gcc/gcc.c           |    2 ++
- gcc/incpath.c       |   19 +++++++++++++++++++
- 8 files changed, 69 insertions(+), 3 deletions(-)
-
-Index: b/gcc/common.opt
-===================================================================
---- a/gcc/common.opt
-+++ b/gcc/common.opt
-@@ -595,6 +595,10 @@
- Common Var(pedantic) Warning
- Issue warnings needed for strict compliance to the standard
-+Wpoison-system-directories
-+Common Var(flag_poison_system_directories) Init(1) Warning
-+Warn for -I and -L options using system directories if cross compiling
-+
- Wshadow
- Common Var(warn_shadow) Warning
- Warn when one local variable shadows another
-Index: b/gcc/config.in
-===================================================================
---- a/gcc/config.in
-+++ b/gcc/config.in
-@@ -138,6 +138,12 @@
- #endif
-+/* Define to warn for use of native system header directories */
-+#ifndef USED_FOR_TARGET
-+#undef ENABLE_POISON_SYSTEM_DIRECTORIES
-+#endif
-+
-+
- /* Define if you want all operations on RTL (the basic data structure of the
-    optimizer and back end) to be checked for dynamic type safety at runtime.
-    This is quite expensive. */
-Index: b/gcc/configure
-===================================================================
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -917,6 +917,7 @@
- with_system_zlib
- enable_maintainer_mode
- enable_version_specific_runtime_libs
-+enable_poison_system_directories
- enable_plugin
- enable_libquadmath_support
- with_linker_hash_style
-@@ -1630,6 +1631,8 @@
-   --enable-version-specific-runtime-libs
-                           specify that runtime libraries should be installed
-                           in a compiler-specific directory
-+  --enable-poison-system-directories
-+                          warn for use of native system header directories
-   --enable-plugin         enable plugin support
-   --disable-libquadmath-support
-                           disable libquadmath support for Fortran
-@@ -27103,6 +27106,19 @@
- 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
-+
- # Substitute configuration variables
-Index: b/gcc/configure.ac
-===================================================================
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -5063,6 +5063,16 @@
-                 [specify that runtime libraries should be
-                  installed in a compiler-specific directory])])
-+AC_ARG_ENABLE([poison-system-directories],
-+             AS_HELP_STRING([--enable-poison-system-directories],
-+                            [warn for use of native system header 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 header directories])
-+fi
-+
- # Substitute configuration variables
- AC_SUBST(subdirs)
- AC_SUBST(srcdir)
-Index: b/gcc/doc/invoke.texi
-===================================================================
---- a/gcc/doc/invoke.texi
-+++ b/gcc/doc/invoke.texi
-@@ -258,6 +258,7 @@
- -Woverlength-strings  -Wpacked  -Wpacked-bitfield-compat  -Wpadded @gol
- -Wparentheses  -Wpedantic-ms-format -Wno-pedantic-ms-format @gol
- -Wpointer-arith  -Wno-pointer-to-int-cast @gol
-+-Wno-poison-system-directories @gol
- -Wredundant-decls  -Wno-return-local-addr @gol
- -Wreturn-type  -Wsequence-point  -Wshadow @gol
- -Wsign-compare  -Wsign-conversion  -Wsizeof-pointer-memaccess @gol
-@@ -4025,6 +4026,14 @@
-  for most targets, it is made up of code and thus requires the stack
-  to be made executable in order for the program to work properly.
-+@item -Wno-poison-system-directories
-+@opindex Wno-poison-system-directories
-+Do not warn for @option{-I} or @option{-L} options using system
-+directories such as @file{/usr/include} when cross compiling.  This
-+option is intended for use in chroot environments when such
-+directories contain the correct headers and libraries for the target
-+system rather than the host.
-+
- @item -Wfloat-equal
- @opindex Wfloat-equal
- @opindex Wno-float-equal
-Index: b/gcc/gcc.c
-===================================================================
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -740,6 +740,8 @@
-    "%{fuse-ld=*:-fuse-ld=%*}\
-     %X %{o*} %{e*} %{N} %{n} %{r}\
-     %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}}\
-+    %{Wno-poison-system-directories:--no-poison-system-directories}\
-+    %{Werror=poison-system-directories:--error-poison-system-directories}\
-     %{static:} %{L*} %(mfwrap) %(link_libgcc) " SANITIZER_EARLY_SPEC " %o\
-     %{fopenmp|ftree-parallelize-loops=*:%:include(libgomp.spec)%(link_gomp)}\
-     %{fgnu-tm:%:include(libitm.spec)%(link_itm)}\
-@@ -3990,6 +3992,12 @@
-       gcc_assert (!compare_debug_opt);
-     }
-+  temp = getenv("BR_COMPILER_PARANOID_UNSAFE_PATH");
-+  if (temp && strlen(temp) > 0)
-+    {
-+      save_switch("-Werror=poison-system-directories", 0, NULL, false, true);
-+    }
-+
-   /* Set up the search paths.  We add directories that we expect to
-      contain GNU Toolchain components before directories specified by
-      the machine description so that we will find GNU components (like
-Index: b/gcc/incpath.c
-===================================================================
---- a/gcc/incpath.c
-+++ b/gcc/incpath.c
-@@ -28,6 +28,7 @@
- #include "intl.h"
- #include "incpath.h"
- #include "cppdefault.h"
-+#include "diagnostic-core.h"
- /* Microsoft Windows does not natively support inodes.
-    VMS has non-numeric inodes.  */
-@@ -382,6 +383,24 @@
-       }
-       fprintf (stderr, _("End of search list.\n"));
-     }
-+
-+#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES
-+  if (flag_poison_system_directories)
-+    {
-+       struct cpp_dir *p;
-+
-+       for (p = heads[QUOTE]; p; p = p->next)
-+         {
-+          if ((!strncmp (p->name, "/usr/include", 12))
-+              || (!strncmp (p->name, "/usr/local/include", 18))
-+              || (!strncmp (p->name, "/usr/X11R6/include", 18)))
-+            warning (OPT_Wpoison_system_directories,
-+                     "include location \"%s\" is unsafe for "
-+                     "cross-compilation",
-+                     p->name);
-+         }
-+    }
-+#endif
- }
- /* Use given -I paths for #include "..." but not #include <...>, and
-Index: b/gcc/config/arc/arc.h
-===================================================================
---- a/gcc/config/arc/arc.h
-+++ b/gcc/config/arc/arc.h
-@@ -205,6 +205,8 @@
- %{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\
-     %(linker) %l " LINK_PIE_SPEC "%X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} %{r}\
-     %{s} %{t} %{u*} %{x} %{z} %{Z} %{!A:%{!nostdlib:%{!nostartfiles:%S}}}\
-+    %{Wno-poison-system-directories:--no-poison-system-directories}\
-+    %{Werror=poison-system-directories:--error-poison-system-directories}\
-     %{static:} %{L*} %(mfwrap) %(link_libgcc) %o\
-     %{fopenmp:%:include(libgomp.spec)%(link_gomp)} %(mflib)\
-     %{fprofile-arcs|fprofile-generate|coverage:-lgcov}\
diff --git a/package/gcc/arc-2015.06/100-libstdcxx-uclibc-c99.patch b/package/gcc/arc-2015.06/100-libstdcxx-uclibc-c99.patch
new file mode 100644 (file)
index 0000000..0d02ef0
--- /dev/null
@@ -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 <thomas.petazzoni@free-electrons.com>
+
+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
+@@ -2811,7 +2811,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 <ext/string_conversions.h>
+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<ctype<_CharT> >(__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<char*>(__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 <ext/string_conversions.h>
+Index: b/libstdc++-v3/include/tr1/cstdio
+===================================================================
+--- a/libstdc++-v3/include/tr1/cstdio
++++ b/libstdc++-v3/include/tr1/cstdio
+@@ -33,7 +33,7 @@
+ #include <cstdio>
+-#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
+@@ -138,7 +138,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-2015.06/851-PR-other-56780.patch b/package/gcc/arc-2015.06/851-PR-other-56780.patch
new file mode 100644 (file)
index 0000000..feb4339
--- /dev/null
@@ -0,0 +1,244 @@
+From afe990251bd9b3a063f03da31a3b8d139d033bc3 Mon Sep 17 00:00:00 2001
+From: ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
+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 <romain.naour@openwide.fr>
+---
+ 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-2015.06/910-gcc-poison-system-directories.patch b/package/gcc/arc-2015.06/910-gcc-poison-system-directories.patch
new file mode 100644 (file)
index 0000000..67b3799
--- /dev/null
@@ -0,0 +1,221 @@
+From 160397ef3c3331099af028f1b8d3e085b07d88ad Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 08:59:00 +0400
+Subject: [PATCH 16/35] gcc: poison-system-directories
+
+Adapted to Buildroot and gcc arc-4.8-R3 by Thomas Petazzoni,
+especially the addition of the BR_COMPILER_PARANOID_UNSAFE_PATH
+environment variable.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Upstream-Status: Inappropriate [distribution: codesourcery]
+---
+ gcc/Makefile.in     |    2 +-
+ gcc/common.opt      |    4 ++++
+ gcc/config.in       |    6 ++++++
+ gcc/configure       |   20 ++++++++++++++++++--
+ gcc/configure.ac    |   10 ++++++++++
+ gcc/doc/invoke.texi |    9 +++++++++
+ gcc/gcc.c           |    2 ++
+ gcc/incpath.c       |   19 +++++++++++++++++++
+ 8 files changed, 69 insertions(+), 3 deletions(-)
+
+Index: b/gcc/common.opt
+===================================================================
+--- a/gcc/common.opt
++++ b/gcc/common.opt
+@@ -595,6 +595,10 @@
+ Common Var(pedantic) Warning
+ Issue warnings needed for strict compliance to the standard
++Wpoison-system-directories
++Common Var(flag_poison_system_directories) Init(1) Warning
++Warn for -I and -L options using system directories if cross compiling
++
+ Wshadow
+ Common Var(warn_shadow) Warning
+ Warn when one local variable shadows another
+Index: b/gcc/config.in
+===================================================================
+--- a/gcc/config.in
++++ b/gcc/config.in
+@@ -138,6 +138,12 @@
+ #endif
++/* Define to warn for use of native system header directories */
++#ifndef USED_FOR_TARGET
++#undef ENABLE_POISON_SYSTEM_DIRECTORIES
++#endif
++
++
+ /* Define if you want all operations on RTL (the basic data structure of the
+    optimizer and back end) to be checked for dynamic type safety at runtime.
+    This is quite expensive. */
+Index: b/gcc/configure
+===================================================================
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -917,6 +917,7 @@
+ with_system_zlib
+ enable_maintainer_mode
+ enable_version_specific_runtime_libs
++enable_poison_system_directories
+ enable_plugin
+ enable_libquadmath_support
+ with_linker_hash_style
+@@ -1630,6 +1631,8 @@
+   --enable-version-specific-runtime-libs
+                           specify that runtime libraries should be installed
+                           in a compiler-specific directory
++  --enable-poison-system-directories
++                          warn for use of native system header directories
+   --enable-plugin         enable plugin support
+   --disable-libquadmath-support
+                           disable libquadmath support for Fortran
+@@ -27103,6 +27106,19 @@
+ 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
++
+ # Substitute configuration variables
+Index: b/gcc/configure.ac
+===================================================================
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -5063,6 +5063,16 @@
+                 [specify that runtime libraries should be
+                  installed in a compiler-specific directory])])
++AC_ARG_ENABLE([poison-system-directories],
++             AS_HELP_STRING([--enable-poison-system-directories],
++                            [warn for use of native system header 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 header directories])
++fi
++
+ # Substitute configuration variables
+ AC_SUBST(subdirs)
+ AC_SUBST(srcdir)
+Index: b/gcc/doc/invoke.texi
+===================================================================
+--- a/gcc/doc/invoke.texi
++++ b/gcc/doc/invoke.texi
+@@ -258,6 +258,7 @@
+ -Woverlength-strings  -Wpacked  -Wpacked-bitfield-compat  -Wpadded @gol
+ -Wparentheses  -Wpedantic-ms-format -Wno-pedantic-ms-format @gol
+ -Wpointer-arith  -Wno-pointer-to-int-cast @gol
++-Wno-poison-system-directories @gol
+ -Wredundant-decls  -Wno-return-local-addr @gol
+ -Wreturn-type  -Wsequence-point  -Wshadow @gol
+ -Wsign-compare  -Wsign-conversion  -Wsizeof-pointer-memaccess @gol
+@@ -4025,6 +4026,14 @@
+  for most targets, it is made up of code and thus requires the stack
+  to be made executable in order for the program to work properly.
++@item -Wno-poison-system-directories
++@opindex Wno-poison-system-directories
++Do not warn for @option{-I} or @option{-L} options using system
++directories such as @file{/usr/include} when cross compiling.  This
++option is intended for use in chroot environments when such
++directories contain the correct headers and libraries for the target
++system rather than the host.
++
+ @item -Wfloat-equal
+ @opindex Wfloat-equal
+ @opindex Wno-float-equal
+Index: b/gcc/gcc.c
+===================================================================
+--- a/gcc/gcc.c
++++ b/gcc/gcc.c
+@@ -740,6 +740,8 @@
+    "%{fuse-ld=*:-fuse-ld=%*}\
+     %X %{o*} %{e*} %{N} %{n} %{r}\
+     %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}}\
++    %{Wno-poison-system-directories:--no-poison-system-directories}\
++    %{Werror=poison-system-directories:--error-poison-system-directories}\
+     %{static:} %{L*} %(mfwrap) %(link_libgcc) " SANITIZER_EARLY_SPEC " %o\
+     %{fopenmp|ftree-parallelize-loops=*:%:include(libgomp.spec)%(link_gomp)}\
+     %{fgnu-tm:%:include(libitm.spec)%(link_itm)}\
+@@ -3990,6 +3992,12 @@
+       gcc_assert (!compare_debug_opt);
+     }
++  temp = getenv("BR_COMPILER_PARANOID_UNSAFE_PATH");
++  if (temp && strlen(temp) > 0)
++    {
++      save_switch("-Werror=poison-system-directories", 0, NULL, false, true);
++    }
++
+   /* Set up the search paths.  We add directories that we expect to
+      contain GNU Toolchain components before directories specified by
+      the machine description so that we will find GNU components (like
+Index: b/gcc/incpath.c
+===================================================================
+--- a/gcc/incpath.c
++++ b/gcc/incpath.c
+@@ -28,6 +28,7 @@
+ #include "intl.h"
+ #include "incpath.h"
+ #include "cppdefault.h"
++#include "diagnostic-core.h"
+ /* Microsoft Windows does not natively support inodes.
+    VMS has non-numeric inodes.  */
+@@ -382,6 +383,24 @@
+       }
+       fprintf (stderr, _("End of search list.\n"));
+     }
++
++#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES
++  if (flag_poison_system_directories)
++    {
++       struct cpp_dir *p;
++
++       for (p = heads[QUOTE]; p; p = p->next)
++         {
++          if ((!strncmp (p->name, "/usr/include", 12))
++              || (!strncmp (p->name, "/usr/local/include", 18))
++              || (!strncmp (p->name, "/usr/X11R6/include", 18)))
++            warning (OPT_Wpoison_system_directories,
++                     "include location \"%s\" is unsafe for "
++                     "cross-compilation",
++                     p->name);
++         }
++    }
++#endif
+ }
+ /* Use given -I paths for #include "..." but not #include <...>, and
+Index: b/gcc/config/arc/arc.h
+===================================================================
+--- a/gcc/config/arc/arc.h
++++ b/gcc/config/arc/arc.h
+@@ -205,6 +205,8 @@
+ %{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\
+     %(linker) %l " LINK_PIE_SPEC "%X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} %{r}\
+     %{s} %{t} %{u*} %{x} %{z} %{Z} %{!A:%{!nostdlib:%{!nostartfiles:%S}}}\
++    %{Wno-poison-system-directories:--no-poison-system-directories}\
++    %{Werror=poison-system-directories:--error-poison-system-directories}\
+     %{static:} %{L*} %(mfwrap) %(link_libgcc) %o\
+     %{fopenmp:%:include(libgomp.spec)%(link_gomp)} %(mflib)\
+     %{fprofile-arcs|fprofile-generate|coverage:-lgcov}\
index 1506ad94374b8f87aa30202d4a3ab77f62dc3537..d3fe3638c307e34a8c0425d6ed27f17ec9d42f68 100644 (file)
@@ -9,4 +9,4 @@ sha512  9ac57377a6975fc7adac704ec81355262b9f537def6955576753b87715470a20ee6a2a31
 # From ftp://gcc.gnu.org/pub/gcc/releases/gcc-5.1.0/sha512.sum
 sha512  30f6a94d3adb25bc51fcaddf32a6c41429f569eeb9ed64330445b1296f99998fbfa03277b375be4f7b2b80f519910ef88e4149db7cd9031e2c61a49f501bde94  gcc-5.1.0.tar.bz2
 # No hash for the ARC variant, comes from the github-helper:
-none  xxx  gcc-arc-2015.06-rc1.tar.gz
+none  xxx  gcc-arc-2015.06.tar.gz
index d2469fccd0df66f673245d0cdd100e71ba4a8561..3207794299398e2b5dedeadfb359254850f52e27 100644 (file)
@@ -49,7 +49,7 @@ endif
 config BR2_GDB_VERSION
        string
        depends on BR2_PACKAGE_GDB || BR2_PACKAGE_HOST_GDB
-       default "arc-2015.06-rc1-gdb" if BR2_arc
+       default "arc-2015.06-gdb" if BR2_arc
        default "6be65fb56ea6694a9260733a536a023a1e2d4d57" if BR2_microblaze
        default "7.7.1"    if BR2_GDB_VERSION_7_7
        default "7.8.2"    if BR2_GDB_VERSION_7_8 || !BR2_PACKAGE_HOST_GDB
index cf397d85378fc86b400711d09442b3cf5e05b282..a970f0a68fd07e0c08d8851388d90992b593a128 100644 (file)
@@ -3,5 +3,5 @@ sha512  887b9b726dae8f6e3e5e41574460a67e4f9002b0d47bc985dcf63bdf3518397a90b6a208c
 sha512 face5bf1b4ce144fc8604fc84620beed956177a11fd632b4e41906fc7f632910b2b43a50e6cfdfd6cbd876ee527c813bddab8df29dc560a6c36694cdb8edc4e4        gdb-7.8.2.tar.xz
 sha512 eebdf88b24e52e792b8a4b89ea85790de72b462a7810b44975fdf4232c068f353b15506071f450102a9d4bcecdde8e93dc3748a10699b7f73f3e04fb2d9d8414        gdb-7.9.1.tar.xz
 # No hash for the ARC & microblaze variants, comes from the github-helper:
-none   xxx     gdb-arc-2015.06-rc1-gdb.tar.gz
+none   xxx     gdb-arc-2015.06-gdb.tar.gz
 none   xxx     gdb-6be65fb56ea6694a9260733a536a023a1e2d4d57.tar.gz
index eee5044c503e7faa039c40549edf96c5691664fa..e1cc3a7a01cf7c95e8b1911fa99e3140ca0dde32 100644 (file)
@@ -64,7 +64,7 @@ config BR2_USE_UCLIBC_SNAPSHOT
 config BR2_UCLIBC_VERSION_STRING
        string
        default "0.9.33.2"      if BR2_UCLIBC_VERSION_0_9_33
-       default "arc-2015.06-rc1" if BR2_UCLIBC_VERSION_ARC_GIT
+       default "arc-2015.06" if BR2_UCLIBC_VERSION_ARC_GIT
        default "1.0.4"         if BR2_UCLIBC_VERSION_NG
        default BR2_USE_UCLIBC_SNAPSHOT if BR2_UCLIBC_VERSION_SNAPSHOT
 
index 06e1661e27f38f1b3c0ff1c3d4337e3aabef0560..d8108846205ad10889fe8895a4eb4cf17a16f4b4 100644 (file)
@@ -5,7 +5,7 @@ sha256  62333167b79afb0b25a843513288c67b59547acf653e8fbe62ee64e71ebd1587        uClibc-0
 sha256  c037dbaea685380c75b112b5503778a90fa95ac524728770131aa17e29474915        uClibc-ng-1.0.4.tar.xz
 
 # No hash for the ARC variant, comes from the github-helper
-none   xxx     uClibc-arc-2015.06-rc1.tar.gz
+none   xxx     uClibc-arc-2015.06.tar.gz
 
 # No hash for this git snapshot
 none  xxx  uClibc-7bf35c8b7d4a1f97174eb49f47f33946b282114c.tar.gz