From 6899683948c66a81ae470efc0869ea01e489e9cd Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Wed, 30 Sep 2015 17:55:16 +0100 Subject: [PATCH] Resync files in the binutils repository that are maintained in the gcc repository. . 2015-08-23 Francois-Xavier Coudert PR libfortran/54572 * Makefile.def: Make libgfortran depend on libbacktrace. * Makefile.in: Regenerate. 2015-08-12 Tom de Vries PR other/67092 PR other/67098 * configure.ac: Remove --with_host_libstdcxx support. * configure: Regenerate. 2015-08-10 Thomas Schwinge Jakub Jelinek * configure.ac (noconfigdirs): Don't add "target-libgomp" for target nvptx*-*-*. * configure: Regenerate. include 2015-08-14 Pierre-Marie de Rodat * dwarf2.def (DW_AT_GNU_bias): New attribute. 2015-08-14 Pierre-Marie de Rodat * dwarf2.def (DW_AT_GNU_numerator, DW_AT_GNU_denominator): New attributes. libiberty 2015-08-15 Ian Lance Taylor * cp-demangle.c (d_abi_tags): Preserve di->last_name across any ABI tags. --- ChangeLog | 24 +++++++++++++++++++++ Makefile.def | 1 + Makefile.in | 1 + configure | 30 ++++++--------------------- configure.ac | 25 ++++++---------------- include/ChangeLog | 13 ++++++++++++ include/dwarf2.def | 7 +++++++ libiberty/ChangeLog | 9 ++++++++ libiberty/cp-demangle.c | 8 +++++++ libiberty/testsuite/demangle-expected | 6 ++++++ 10 files changed, 81 insertions(+), 43 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1d080fc56d8..13897992cc3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,27 @@ +2015-09-30 Nick Clifton + + Import the following patches from the GCC mainline: + + 2015-08-23 Francois-Xavier Coudert + + PR libfortran/54572 + * Makefile.def: Make libgfortran depend on libbacktrace. + * Makefile.in: Regenerate. + + 2015-08-12 Tom de Vries + + PR other/67092 + PR other/67098 + * configure.ac: Remove --with_host_libstdcxx support. + * configure: Regenerate. + + 2015-08-10 Thomas Schwinge + Jakub Jelinek + + * configure.ac (noconfigdirs): Don't add "target-libgomp" for target + nvptx*-*-*. + * configure: Regenerate. + 2015-08-07 H.J. Lu Sync with GCC diff --git a/Makefile.def b/Makefile.def index 01445e4ff6a..8b4dad99160 100644 --- a/Makefile.def +++ b/Makefile.def @@ -597,6 +597,7 @@ dependencies = { module=all-target-winsup; on=all-target-libtermcap; }; dependencies = { module=configure-target-newlib; on=all-binutils; }; dependencies = { module=configure-target-newlib; on=all-ld; }; dependencies = { module=configure-target-libgfortran; on=all-target-libquadmath; }; +dependencies = { module=configure-target-libgfortran; on=all-target-libbacktrace; }; languages = { language=c; gcc-check-target=check-gcc; }; languages = { language=c++; gcc-check-target=check-c++; diff --git a/Makefile.in b/Makefile.in index 13f3740e9f6..bc2bae6d7fa 100644 --- a/Makefile.in +++ b/Makefile.in @@ -50921,6 +50921,7 @@ all-target-winsup: maybe-all-target-libtermcap configure-target-newlib: maybe-all-binutils configure-target-newlib: maybe-all-ld configure-target-libgfortran: maybe-all-target-libquadmath +configure-target-libgfortran: maybe-all-target-libbacktrace # Dependencies for target modules on other target modules are diff --git a/configure b/configure index 6d7152eac67..eca5e6f747d 100755 --- a/configure +++ b/configure @@ -772,7 +772,6 @@ with_gmp_dir with_gmp with_gmp_include with_gmp_lib -with_host_libstdcxx with_stage1_libs with_stage1_ldflags with_boot_libs @@ -1540,8 +1539,6 @@ Optional Packages: --with-gmp-lib=PATH/lib --with-gmp-include=PATH specify directory for installed GMP include files --with-gmp-lib=PATH specify directory for the installed GMP library - --with-host-libstdcxx=L use linker arguments L to link with libstdc++ when - linking with PPL --with-stage1-libs=LIBS libraries for stage1 --with-stage1-ldflags=FLAGS linker flags for stage1 @@ -3168,9 +3165,8 @@ if test x$enable_static_libjava != xyes ; then fi -# Disable libgomp on non POSIX hosted systems. +# Enable libgomp by default on hosted POSIX systems, and a few others. if test x$enable_libgomp = x ; then - # Enable libgomp by default on hosted POSIX systems. case "${target}" in *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu) ;; @@ -3180,6 +3176,8 @@ if test x$enable_libgomp = x ; then ;; *-*-darwin* | *-*-aix*) ;; + nvptx*-*-*) + ;; *) noconfigdirs="$noconfigdirs target-libgomp" ;; @@ -3917,7 +3915,6 @@ case "${target}" in noconfigdirs="$noconfigdirs gdb" ;; nvptx*-*-*) - # nvptx is just a compiler noconfigdirs="$noconfigdirs target-libssp target-libstdc++-v3 target-libobjc" ;; or1k*-*-*) @@ -5849,20 +5846,6 @@ fi -# Allow host libstdc++ to be specified for static linking with PPL. - -# Check whether --with-host-libstdcxx was given. -if test "${with_host_libstdcxx+set}" = set; then : - withval=$with_host_libstdcxx; -fi - - -case $with_host_libstdcxx in - no|yes) - as_fn_error "-with-host-libstdcxx needs an argument" "$LINENO" 5 - ;; -esac - # Libraries to use for stage1 or when not bootstrapping. # Check whether --with-stage1-libs was given. @@ -5873,7 +5856,7 @@ if test "${with_stage1_libs+set}" = set; then : stage1_libs=$withval fi else - stage1_libs=$with_host_libstdcxx + stage1_libs= fi @@ -5899,8 +5882,7 @@ fi -# Libraries to use for stage2 and later builds. This defaults to the -# argument passed to --with-host-libstdcxx. +# Libraries to use for stage2 and later builds. # Check whether --with-boot-libs was given. if test "${with_boot_libs+set}" = set; then : @@ -5910,7 +5892,7 @@ if test "${with_boot_libs+set}" = set; then : poststage1_libs=$withval fi else - poststage1_libs=$with_host_libstdcxx + poststage1_libs= fi diff --git a/configure.ac b/configure.ac index fbc49ce5b80..92412618916 100644 --- a/configure.ac +++ b/configure.ac @@ -529,9 +529,8 @@ if test x$enable_static_libjava != xyes ; then fi AC_SUBST(EXTRA_CONFIGARGS_LIBJAVA) -# Disable libgomp on non POSIX hosted systems. +# Enable libgomp by default on hosted POSIX systems, and a few others. if test x$enable_libgomp = x ; then - # Enable libgomp by default on hosted POSIX systems. case "${target}" in *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu) ;; @@ -541,6 +540,8 @@ if test x$enable_libgomp = x ; then ;; *-*-darwin* | *-*-aix*) ;; + nvptx*-*-*) + ;; *) noconfigdirs="$noconfigdirs target-libgomp" ;; @@ -1257,7 +1258,6 @@ case "${target}" in noconfigdirs="$noconfigdirs gdb" ;; nvptx*-*-*) - # nvptx is just a compiler noconfigdirs="$noconfigdirs target-libssp target-libstdc++-v3 target-libobjc" ;; or1k*-*-*) @@ -1697,18 +1697,6 @@ AC_SUBST(extra_mpc_gmp_configure_flags) AC_SUBST(extra_mpc_mpfr_configure_flags) AC_SUBST(extra_isl_gmp_configure_flags) -# Allow host libstdc++ to be specified for static linking with PPL. -AC_ARG_WITH(host-libstdcxx, -[AS_HELP_STRING([--with-host-libstdcxx=L], - [use linker arguments L to link with libstdc++ - when linking with PPL])]) - -case $with_host_libstdcxx in - no|yes) - AC_MSG_ERROR([-with-host-libstdcxx needs an argument]) - ;; -esac - # Libraries to use for stage1 or when not bootstrapping. AC_ARG_WITH(stage1-libs, [AS_HELP_STRING([--with-stage1-libs=LIBS], [libraries for stage1])], @@ -1717,7 +1705,7 @@ AC_ARG_WITH(stage1-libs, else stage1_libs=$withval fi], -[stage1_libs=$with_host_libstdcxx]) +[stage1_libs=]) AC_SUBST(stage1_libs) # Linker flags to use for stage1 or when not bootstrapping. @@ -1737,8 +1725,7 @@ AC_ARG_WITH(stage1-ldflags, fi]) AC_SUBST(stage1_ldflags) -# Libraries to use for stage2 and later builds. This defaults to the -# argument passed to --with-host-libstdcxx. +# Libraries to use for stage2 and later builds. AC_ARG_WITH(boot-libs, [AS_HELP_STRING([--with-boot-libs=LIBS], [libraries for stage2 and later])], [if test "$withval" = "no" -o "$withval" = "yes"; then @@ -1746,7 +1733,7 @@ AC_ARG_WITH(boot-libs, else poststage1_libs=$withval fi], -[poststage1_libs=$with_host_libstdcxx]) +[poststage1_libs=]) AC_SUBST(poststage1_libs) # Linker flags to use for stage2 and later builds. diff --git a/include/ChangeLog b/include/ChangeLog index 99a8bd91097..e4914ed18f4 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,16 @@ +2015-09-30 Nick Clifton + + Import the following patches from the GCC mainline: + + 2015-08-14 Pierre-Marie de Rodat + + * dwarf2.def (DW_AT_GNU_bias): New attribute. + + 2015-08-14 Pierre-Marie de Rodat + + * dwarf2.def (DW_AT_GNU_numerator, DW_AT_GNU_denominator): New + attributes. + 2015-09-26 James Bowman * opcode/ft32.h: Add instruction macros FT32_*() diff --git a/include/dwarf2.def b/include/dwarf2.def index e61cfbeb407..2dfee5666de 100644 --- a/include/dwarf2.def +++ b/include/dwarf2.def @@ -404,6 +404,13 @@ DW_AT (DW_AT_VMS_rtnbeg_pd_address, 0x2201) See http://gcc.gnu.org/wiki/DW_AT_GNAT_descriptive_type . */ DW_AT (DW_AT_use_GNAT_descriptive_type, 0x2301) DW_AT (DW_AT_GNAT_descriptive_type, 0x2302) +/* Rational constant extension. + See https://gcc.gnu.org/wiki/DW_AT_GNU_numerator_denominator . */ +DW_TAG (DW_AT_GNU_numerator, 0x2303) +DW_TAG (DW_AT_GNU_denominator, 0x2304) +/* Biased integer extension. + See https://gcc.gnu.org/wiki/DW_AT_GNU_bias . */ +DW_TAG (DW_AT_GNU_bias, 0x2305) /* UPC extension. */ DW_AT (DW_AT_upc_threads_scaled, 0x3210) /* PGI (STMicroelectronics) extensions. */ diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index f2abfc95f11..5b9a8cf2d9c 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,12 @@ +2015-09-30 Nick Clifton + + Import the following patches from the GCC mainline: + + 2015-08-15 Ian Lance Taylor + + * cp-demangle.c (d_abi_tags): Preserve di->last_name across any + ABI tags. + 2015-08-11 Iain Buclaw * d-demangle.c (dlang_parse_real): Remove call to strtod. diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c index 2988b6bcb01..fb1c4e5e9d5 100644 --- a/libiberty/cp-demangle.c +++ b/libiberty/cp-demangle.c @@ -1302,7 +1302,12 @@ d_encoding (struct d_info *di, int top_level) static struct demangle_component * d_abi_tags (struct d_info *di, struct demangle_component *dc) { + struct demangle_component *hold_last_name; char peek; + + /* Preserve the last name, so the ABI tag doesn't clobber it. */ + hold_last_name = di->last_name; + while (peek = d_peek_char (di), peek == 'B') { @@ -1311,6 +1316,9 @@ d_abi_tags (struct d_info *di, struct demangle_component *dc) tag = d_source_name (di); dc = d_make_comp (di, DEMANGLE_COMPONENT_TAGGED_NAME, dc, tag); } + + di->last_name = hold_last_name; + return dc; } diff --git a/libiberty/testsuite/demangle-expected b/libiberty/testsuite/demangle-expected index 6ea64aef859..205fd761d83 100644 --- a/libiberty/testsuite/demangle-expected +++ b/libiberty/testsuite/demangle-expected @@ -4359,3 +4359,9 @@ f(std::string[abi:foo], std::string[abi:foo]) --format=gnu-v3 _Z18IndirectExternCallIPU7stdcallU7regparmILi3EEFviiEiEvT_T0_S3_ void IndirectExternCall stdcall*)(int, int), int>(void ( regparm<3> stdcall*)(int, int), int, void ( regparm<3> stdcall*)(int, int)) +# +# ABI tags used to confuse the constructor name calculation. +--format=gnu-v3 --no-params +_ZNSt8ios_base7failureB5cxx11C1EPKcRKSt10error_code +std::ios_base::failure[abi:cxx11]::failure(char const*, std::error_code const&) +std::ios_base::failure[abi:cxx11]::failure -- 2.30.2