diff options
author | Tavian Barnes | 2017-09-23 09:27:27 -0400 |
---|---|---|
committer | Tavian Barnes | 2017-09-23 09:27:27 -0400 |
commit | 390173b60899f4ef1c384cd8e9ce569c779ad192 (patch) | |
tree | 06bfa30c948c0fa84ebdf4d292c22dae48c7497a | |
parent | d9b3efdc40fd20096c828bfb14a162a08ead283c (diff) | |
download | aur-390173b60899f4ef1c384cd8e9ce569c779ad192.tar.gz |
Bump to 7.2.0-3
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | PKGBUILD | 45 | ||||
-rw-r--r-- | PR82155.patch | 119 |
3 files changed, 154 insertions, 28 deletions
@@ -1,9 +1,9 @@ # Generated by mksrcinfo v8 -# Tue Aug 15 00:44:24 UTC 2017 +# Sat Sep 23 13:27:05 UTC 2017 pkgbase = arm-linux-gnueabihf-gcc-stage2 pkgdesc = The GNU Compiler Collection. Stage 2 for toolchain building (arm-linux-gnueabihf) - pkgver = 7.1.1 - pkgrel = 4 + pkgver = 7.2.0 + pkgrel = 3 url = http://gcc.gnu.org arch = i686 arch = x86_64 @@ -11,22 +11,24 @@ pkgbase = arm-linux-gnueabihf-gcc-stage2 license = LGPL license = FDL license = custom - depends = arm-linux-gnueabihf-binutils>=2.28.0-4 - depends = arm-linux-gnueabihf-glibc-headers>=2.25-7 + depends = arm-linux-gnueabihf-binutils>=2.29.0-1 + depends = arm-linux-gnueabihf-glibc-headers>=2.26-4 depends = libmpc depends = zlib - provides = arm-linux-gnueabihf-gcc-stage1=7.1.1 + provides = arm-linux-gnueabihf-gcc-stage1=7.2.0 conflicts = arm-linux-gnueabihf-gcc-stage1 replaces = arm-linux-gnueabihf-gcc-stage1 options = !emptydirs options = !distcc options = !strip - source = https://github.com/gcc-mirror/gcc/archive/d791474f3fc2133fa0c310e566988b0cbdff321e.tar.gz + source = https://github.com/gcc-mirror/gcc/archive/1bd23ca8c30f4827c4bea23deedf7ca33a86ffb5.tar.gz source = http://isl.gforge.inria.fr/isl-0.18.tar.bz2 source = Revert-eeb6872bf.patch - md5sums = 22748db692c5e409b7f3fa9482faa9cb + source = PR82155.patch + md5sums = 1b6966a45fe43445ae7ae4ffd5d43df9 md5sums = 11436d6b205e516635b666090b94ab32 md5sums = e4c9c8b498b04c0f51d219d025ca8407 + md5sums = e77419f7d25aad0980c765012dc8c417 pkgname = arm-linux-gnueabihf-gcc-stage2 @@ -6,30 +6,32 @@ _target="arm-linux-gnueabihf" pkgname=${_target}-gcc-stage2 -pkgver=7.1.1 +pkgver=7.2.0 _pkgver=${pkgver:0:1} _islver=0.18 -pkgrel=4 -_commit=d791474f3fc2133fa0c310e566988b0cbdff321e +pkgrel=3 +_commit=1bd23ca8c30f4827c4bea23deedf7ca33a86ffb5 pkgdesc="The GNU Compiler Collection. Stage 2 for toolchain building (${_target})" -arch=('i686' 'x86_64') -license=('GPL' 'LGPL' 'FDL' 'custom') -url="http://gcc.gnu.org" -depends=("${_target}-binutils>=2.28.0-4" "${_target}-glibc-headers>=2.25-7" 'libmpc' 'zlib') -options=('!emptydirs' '!distcc' '!strip') +arch=(i686 x86_64) +license=(GPL LGPL FDL custom) +url='http://gcc.gnu.org' +depends=("${_target}-binutils>=2.29.0-1" "${_target}-glibc-headers>=2.26-4" libmpc zlib) +options=(!emptydirs !distcc !strip) conflicts=("${_target}-gcc-stage1") replaces=("${_target}-gcc-stage1") provides=("${_target}-gcc-stage1=${pkgver}") source=(https://github.com/gcc-mirror/gcc/archive/${_commit}.tar.gz http://isl.gforge.inria.fr/isl-${_islver}.tar.bz2 - Revert-eeb6872bf.patch) -md5sums=('22748db692c5e409b7f3fa9482faa9cb' + Revert-eeb6872bf.patch + PR82155.patch) +md5sums=('1b6966a45fe43445ae7ae4ffd5d43df9' '11436d6b205e516635b666090b94ab32' - 'e4c9c8b498b04c0f51d219d025ca8407') + 'e4c9c8b498b04c0f51d219d025ca8407' + 'e77419f7d25aad0980c765012dc8c417') prepare() { mv gcc-${_commit}* gcc - cd ${srcdir}/gcc + cd gcc # link isl for in-tree build ln -s ../isl-${_islver} isl @@ -43,18 +45,21 @@ prepare() { # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80717 patch -p1 -i ${srcdir}/Revert-eeb6872bf.patch - mkdir ${srcdir}/gcc-build + mkdir -p "$srcdir/gcc-build" + + # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82155 + patch -p1 -i ../PR82155.patch } build() { - cd ${srcdir}/gcc-build + cd gcc-build # using -pipe causes spurious test-suite failures # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48565 CFLAGS=${CFLAGS/-pipe/} CXXFLAGS=${CXXFLAGS/-pipe/} - ${srcdir}/gcc/configure --prefix=/usr \ + "$srcdir/gcc/configure" --prefix=/usr \ --program-prefix=${_target}- \ --with-local-prefix=/usr/${_target} \ --with-sysroot=/usr/${_target} \ @@ -97,14 +102,14 @@ build() { } package() { - cd ${srcdir}/gcc-build + cd gcc-build - make DESTDIR=${pkgdir} install-gcc install-target-libgcc + make DESTDIR="$pkgdir" install-gcc install-target-libgcc - rm -rf ${pkgdir}/usr/share + rm -rf "$pkgdir/usr/share" # strip it manually - strip ${pkgdir}/usr/bin/* 2>/dev/null || true - find ${pkgdir}/usr/lib -type f -exec /usr/bin/${_target}-strip \ + strip "$pkgdir/usr/bin/"* 2>/dev/null || true + find "$pkgdir/usr/lib" -type f -exec /usr/bin/${_target}-strip \ --strip-unneeded {} \; 2>/dev/null || true } diff --git a/PR82155.patch b/PR82155.patch new file mode 100644 index 000000000000..f55bb934c0b0 --- /dev/null +++ b/PR82155.patch @@ -0,0 +1,119 @@ +From: Pierre-Marie de Rodat <derodat at adacore dot com> +To: gcc-patches at gcc dot gnu dot org +Cc: Pierre-Marie de Rodat <derodat at adacore dot com> +Subject: [PATCH] [PR82155] Fix crash in dwarf2out_abstract_function +Date: Tue, 12 Sep 2017 08:00:03 +0200 +Message-Id: <20170912060003.32378-1-derodat@adacore.com> +X-IsSubscribed: yes + +Hello, + +This patch is an attempt to fix the crash reported in PR82155. + +When generating a C++ class method for a class that is itself nested in +a class method, dwarf2out_early_global_decl currently leaves the +existing context DIE as it is if it already exists. However, it is +possible that this call happens at a point where this context DIE is +just a declaration that is itself not located in its own context. + +>From there, if dwarf2out_early_global_decl is not called on any of the +FUNCTION_DECL in the context chain, DIEs will be left badly scoped and +some (such as the nested method) will be removed by the type pruning +machinery. As a consequence, dwarf2out_abstract_function will will +crash when called on the corresponding DECL because it asserts that the +DECL has a DIE. + +This patch fixes this crash making dwarf2out_early_global_decl process +context DIEs the same way we process abstract origins for FUNCTION_DECL: +if the corresponding DIE exists but is only a declaration, call +dwarf2out_decl anyway on it so that it is turned into a more complete +DIE and so that it is relocated in the proper context. + +Bootstrapped and regtested on x86_64-linux. The crash this addresses is +present both on trunk and on the gcc-7 branch: I suggest we commit this +patch on both branches. Ok to commit? Thank you in advance! + +gcc/ + + PR debug/82155 + * dwarf2out.c (dwarf2out_early_global_decl): Call dwarf2out_decl + on the FUNCTION_DECL function context if it has a DIE that is a + declaration. + +gcc/testsuite/ + + * g++.dg/pr82155.C: New testcase. +--- + gcc/dwarf2out.c | 10 ++++++++-- + gcc/testsuite/g++.dg/pr82155.C | 36 ++++++++++++++++++++++++++++++++++++ + 2 files changed, 44 insertions(+), 2 deletions(-) + create mode 100644 gcc/testsuite/g++.dg/pr82155.C + +diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c +index 00d6d951ba3..4cfc9c186af 100644 +--- a/gcc/dwarf2out.c ++++ b/gcc/dwarf2out.c +@@ -25500,10 +25500,16 @@ dwarf2out_early_global_decl (tree decl) + so that all nested DIEs are generated at the proper scope in the + first shot. */ + tree context = decl_function_context (decl); +- if (context != NULL && lookup_decl_die (context) == NULL) ++ if (context != NULL) + { ++ dw_die_ref context_die = lookup_decl_die (context); + current_function_decl = context; +- dwarf2out_decl (context); ++ ++ /* Avoid emitting DIEs multiple times, but still process CONTEXT ++ enough so that it lands in its own context. This avoids type ++ pruning issues later on. */ ++ if (context_die == NULL || is_declaration_die (context_die)) ++ dwarf2out_decl (context); + } + + /* Emit an abstract origin of a function first. This happens +diff --git a/gcc/testsuite/g++.dg/pr82155.C b/gcc/testsuite/g++.dg/pr82155.C +new file mode 100644 +index 00000000000..75d9b615f39 +--- /dev/null ++++ b/gcc/testsuite/g++.dg/pr82155.C +@@ -0,0 +1,36 @@ ++/* { dg-do compile { target c++11 } } */ ++/* { dg-options "-g -O2" } */ ++ ++template <typename a> struct b { a c; }; ++template <typename d> struct e { d *operator->(); }; ++template <typename d> class h { ++public: ++ typedef e<d> ag; ++}; ++class i { ++protected: ++ i(int); ++}; ++class j { ++ virtual void k(int) = 0; ++ ++public: ++ int f; ++ void l() { k(f); } ++}; ++struct m : i { ++ int cn; ++ m() : i(cn) { ++ struct n : j { ++ n() {} ++ void k(int) {} ++ }; ++ } ++}; ++struct o { ++ o() { ++ for (h<b<b<j *>>>::ag g;;) ++ g->c.c->l(); ++ } ++}; ++void fn1() { o(); } +-- +2.14.1 + |