diff options
author | James Harvey | 2015-07-07 16:21:31 -0400 |
---|---|---|
committer | James Harvey | 2015-07-07 16:21:31 -0400 |
commit | e97bbf85ae2bf893d270d6242926fbc56dd6aa85 (patch) | |
tree | 70d9082871fc43d3d95019160fec817705e025e0 | |
download | aur-e97bbf85ae2bf893d270d6242926fbc56dd6aa85.tar.gz |
Uses upstream gdb master (temporarily 2015-07-01 source - see PKGBUILD comments. As closely as possible matches core's gcc-5.1.0-5 build process.
-rw-r--r-- | .SRCINFO | 83 | ||||
-rw-r--r-- | PKGBUILD | 361 | ||||
-rw-r--r-- | gcc-ada.install | 20 | ||||
-rw-r--r-- | gcc-fortran.install | 16 | ||||
-rw-r--r-- | gcc-go.install | 20 | ||||
-rw-r--r-- | gcc-libs.install | 16 | ||||
-rw-r--r-- | gcc.install | 20 | ||||
-rw-r--r-- | gcc.libstdc++-v3.python.dot.fix.patch | 33 | ||||
-rw-r--r-- | pr66035.patch | 48 |
9 files changed, 617 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..62c159d257ce --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,83 @@ +pkgbase = gcc-git + pkgdesc = The GNU Compiler Collection (developmental version) + pkgver = 6.0.0.r139654.12dcc3b + pkgrel = 1 + url = http://gcc.gnu.org + arch = i686 + arch = x86_64 + license = GPL + license = LGPL + license = FDL + license = custom + checkdepends = dejagnu + checkdepends = inetutils + makedepends = binutils>=2.25 + makedepends = libmpc + makedepends = gcc-ada + makedepends = doxygen + makedepends = git + depends = zlib, + depends = libmpc + options = !emptydirs + source = git://gcc.gnu.org/git/gcc.git + source = http://isl.gforge.inria.fr/isl-0.14.1.tar.bz2 + source = pr66035.patch + source = gcc.libstdc++-v3.python.dot.fix.patch + md5sums = SKIP + md5sums = 118d1a379abf7606a3334c98a8411c79 + md5sums = 5b980076cd5fcbc3aff6014f306282dd + md5sums = 7de06deb9ee0c10454219a319e62e4dc + +pkgname = gcc-git + pkgdesc = The GNU Compiler Collection - C and C++ frontends (developmental version) + install = gcc.install + groups = base-devel + depends = gcc-libs-git=6.0.0.r139654.12dcc3b-1 + depends = binutils>=2.25 + depends = libmpc + provides = gcc + conflicts = gcc + options = staticlibs + +pkgname = gcc-libs-git + pkgdesc = Runtime libraries shipped by GCC (developmental version) + install = gcc-libs.install + groups = base + depends = glibc>=2.21 + provides = gcc-libs + conflicts = gcc-libs + options = !emptydirs + options = !strip + +pkgname = gcc-fortran-git + pkgdesc = Fortran front-end for GCC (developmental version) + install = gcc-fortran.install + depends = gcc-git=6.0.0.r139654.12dcc3b-1 + provides = gcc-fortran + conflicts = gcc-fortran + options = !emptydirs + +pkgname = gcc-objc-git + pkgdesc = Objective-C front-end for GCC (developmental version) + depends = gcc-git=6.0.0.r139654.12dcc3b-1 + provides = gcc-objc + conflicts = gcc-objc + +pkgname = gcc-ada-git + pkgdesc = Ada front-end for GCC (GNAT) (developmental version) + install = gcc-ada.install + depends = gcc-git=6.0.0.r139654.12dcc3b-1 + provides = gcc-ada + conflicts = gcc-ada + options = staticlibs + options = !emptydirs + +pkgname = gcc-go-git + pkgdesc = Go front-end for GCC (developmental version) + install = gcc-go.install + depends = gcc-git=6.0.0.r139654.12dcc3b-1 + provides = gcc-go + conflicts = go, + conflicts = gcc-go + options = !emptydirs + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..c8032470319f --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,361 @@ +# $Id$ +# Original Core Repo +# ================== +# Maintainer: Allan McRae <allan@archlinux.org> + +# Modifications to Use Git Master Source +# ====================================== +# Maintainer: James Harvey <jamespharvey20@gmail.com> +# * This PKGBUILD as closely as possible matches core's gcc 5.1.0-5 +# * Builds from git commit 12dcc3b7 (2015-07-01 02:15:32 UTC), rather than master, because after that the default standard changes, causing many errors +# * The volumous test suite failures ("UNRESOLVED:", "FAIL:") occur during building core's 5.1.0-5, so the problem is upstream from here +# * Core's 5.1.0-5 pr65882.patch is omitted, because it is git commit 1774df35 +# * Core's 5.1.0-5 pr66647.patch is omitted, because it is git commit fa4f365b +# * gcc.libstdc++-v3.python.dot.fix.patch is added, to fix an accidentical misnaming of gdb.py +# * Addition of zlib and libmpc depends, due to new /usr/lib/gcc/x86_64-unknown-linux-gnu/6.0.0/gnat1 +# * All namcap warnings are identical, as of 6.0.0.r139654.12dcc3b, except: +# * Error of a missing custom license directory of /usr/share/licenses/gcc*-git +# * Symlink /usr/lib/bfd-plugins/liblto_plugin.so points to non-existing /usr/lib/gcc/x86_64-unknown-linux-gnu/6.0.0.r139654.12dcc3b/liblto_plugin.so +# * _pkgver_base is hard coded at the moment to 6.0.0; can't parse from source at that point + +# toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc +# NOTE: libtool requires rebuilt with each new gcc version + +pkgname=('gcc-git' 'gcc-libs-git' 'gcc-fortran-git' 'gcc-objc-git' 'gcc-ada-git' 'gcc-go-git') +_pkgname=gcc +pkgver=6.0.0.r139654.12dcc3b +_pkgver_base=6.0.0 +_pkgver=6 +# Bug report upstream. As of 2015-07-07, gcc master is incompatible with isl ver 0.15, starting with compilation errors in gcc/graphite-poly.h +_islver=0.14.1 +pkgrel=1 + +pkgdesc="The GNU Compiler Collection (developmental version)" +arch=('i686' 'x86_64') +license=('GPL' 'LGPL' 'FDL' 'custom') +url="http://gcc.gnu.org" +depends=('zlib', 'libmpc') +makedepends=('binutils>=2.25' 'libmpc' 'gcc-ada' 'doxygen' 'git') +checkdepends=('dejagnu' 'inetutils') +options=('!emptydirs') +source=(git://gcc.gnu.org/git/gcc.git + http://isl.gforge.inria.fr/isl-${_islver}.tar.bz2 + pr66035.patch + gcc.libstdc++-v3.python.dot.fix.patch) +md5sums=('SKIP' + '118d1a379abf7606a3334c98a8411c79' + '5b980076cd5fcbc3aff6014f306282dd' + '7de06deb9ee0c10454219a319e62e4dc') + +_basedir=${_pkgname} + +_libdir="usr/lib/gcc/$CHOST/$_pkgver_base" + +pkgver() { + cd ${srcdir}/gcc + # new work needed for beyond this point, default standard changed + git checkout 12dcc3b7405a43e28010b2f5c186bf6f5f809397 > /dev/null 2>&1 + echo $(cat gcc/BASE-VER).r$(git rev-list --count HEAD).$(git rev-parse --short HEAD) +} + +prepare() { + cd ${srcdir}/${_basedir} + + # link isl for in-tree build + ln -s ../isl-${_islver} isl + + # Do not run fixincludes + sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in + + # Arch Linux installs x86_64 libraries /lib + [[ $CARCH == "x86_64" ]] && sed -i '/m64=/s/lib64/lib/' gcc/config/i386/t-linux64 + + # hack! - some configure tests for header files using "$CPP $CPPFLAGS" + sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" {libiberty,gcc}/configure + + # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66035 + patch -p1 -i ${srcdir}/pr66035.patch + + # Submitted upstream - Fixes misnaming of gdb.py file due to addition of libstdc++fs library + patch -p0 -i ${srcdir}/gcc.libstdc++-v3.python.dot.fix.patch + + mkdir ${srcdir}/gcc-build +} + +build() { + cd ${srcdir}/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}/${_basedir}/configure --prefix=/usr \ + --libdir=/usr/lib --libexecdir=/usr/lib \ + --mandir=/usr/share/man --infodir=/usr/share/info \ + --with-bugurl=https://bugs.archlinux.org/ \ + --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ \ + --enable-shared --enable-threads=posix --enable-libmpx \ + --with-system-zlib --with-isl --enable-__cxa_atexit \ + --disable-libunwind-exceptions --enable-clocale=gnu \ + --disable-libstdcxx-pch --disable-libssp \ + --enable-gnu-unique-object --enable-linker-build-id \ + --enable-lto --enable-plugin --enable-install-libiberty \ + --with-linker-hash-style=gnu --enable-gnu-indirect-function \ + --disable-multilib --disable-werror \ + --enable-checking=release \ + --with-default-libstdcxx-abi=c++98 + + make + + # make documentation + make -C $CHOST/libstdc++-v3/doc doc-man-doxygen +} + +check() { + cd ${srcdir}/gcc-build + + # increase stack size to prevent test failures + # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31827 + ulimit -s 32768 + + # do not abort on error as some are "expected" + make -k check || true + ${srcdir}/${_basedir}/contrib/test_summary +} + +package_gcc-libs-git() +{ + pkgdesc="Runtime libraries shipped by GCC (developmental version)" + groups=('base') + depends=('glibc>=2.21') + provides=('gcc-libs') + conflicts=('gcc-libs') + options=('!emptydirs' '!strip') + install=gcc-libs.install + + cd ${srcdir}/gcc-build + + make -C $CHOST/libgcc DESTDIR=${pkgdir} install-shared + rm ${pkgdir}/${_libdir}/libgcc_eh.a + + for lib in libatomic \ + libcilkrts \ + libgfortran \ + libgomp \ + libitm \ + libquadmath \ + libsanitizer/{a,l,ub}san \ + libstdc++-v3/src \ + libvtv; do + make -C $CHOST/$lib DESTDIR=${pkgdir} install-toolexeclibLTLIBRARIES + done + + [[ $CARCH == "x86_64" ]] && \ + make -C $CHOST/libsanitizer/tsan DESTDIR=${pkgdir} install-toolexeclibLTLIBRARIES + + make -C $CHOST/libobjc DESTDIR=${pkgdir} install-libs + + make -C $CHOST/libstdc++-v3/po DESTDIR=${pkgdir} install + + make -C $CHOST/libmpx DESTDIR=${pkgdir} install + rm ${pkgdir}/usr/lib/libmpx.spec + + for lib in libgomp \ + libitm \ + libquadmath; do + make -C $CHOST/$lib DESTDIR=${pkgdir} install-info + done + + # Install Runtime Library Exception + install -Dm644 ${srcdir}/${_basedir}/COPYING.RUNTIME \ + ${pkgdir}/usr/share/licenses/gcc-libs/RUNTIME.LIBRARY.EXCEPTION +} + +package_gcc-git() +{ + pkgdesc="The GNU Compiler Collection - C and C++ frontends (developmental version)" + depends=("gcc-libs-git=$pkgver-$pkgrel" 'binutils>=2.25' 'libmpc') + provides=('gcc') + conflicts=('gcc') + groups=('base-devel') + options=('staticlibs') + install=gcc.install + + cd ${srcdir}/gcc-build + + make -C gcc DESTDIR=${pkgdir} install-driver install-cpp install-gcc-ar \ + c++.install-common install-headers install-plugin install-lto-wrapper + + install -m755 -t $pkgdir/usr/bin/ gcc/gcov{,-tool} + install -m755 -t $pkgdir/${_libdir}/ gcc/{cc1,cc1plus,collect2,lto1} + + make -C $CHOST/libgcc DESTDIR=${pkgdir} install + rm ${pkgdir}/usr/lib/libgcc_s.so* + + make -C $CHOST/libstdc++-v3/src DESTDIR=${pkgdir} install + make -C $CHOST/libstdc++-v3/include DESTDIR=${pkgdir} install + make -C $CHOST/libstdc++-v3/libsupc++ DESTDIR=${pkgdir} install + make -C $CHOST/libstdc++-v3/python DESTDIR=${pkgdir} install + + make DESTDIR=${pkgdir} install-libcc1 + install -d $pkgdir/usr/share/gdb/auto-load/usr/lib + mv $pkgdir/usr/lib/libstdc++.so.6.*-gdb.py \ + $pkgdir/usr/share/gdb/auto-load/usr/lib/ + rm ${pkgdir}/usr/lib/libstdc++.so* + + make DESTDIR=${pkgdir} install-fixincludes + make -C gcc DESTDIR=${pkgdir} install-mkheaders + + make -C lto-plugin DESTDIR=${pkgdir} install + install -dm755 ${pkgdir}/usr/lib/bfd-plugins/ + ln -s /usr/lib/gcc/$CHOST/${pkgver}/liblto_plugin.so \ + ${pkgdir}/usr/lib/bfd-plugins/ + + make -C $CHOST/libcilkrts DESTDIR=${pkgdir} install-nodist_toolexeclibHEADERS \ + install-nodist_cilkincludeHEADERS + make -C $CHOST/libgomp DESTDIR=${pkgdir} install-nodist_toolexeclibHEADERS \ + install-nodist_libsubincludeHEADERS + make -C $CHOST/libitm DESTDIR=${pkgdir} install-nodist_toolexeclibHEADERS + make -C $CHOST/libquadmath DESTDIR=${pkgdir} install-nodist_libsubincludeHEADERS + make -C $CHOST/libsanitizer DESTDIR=${pkgdir} install-nodist_{saninclude,toolexeclib}HEADERS + make -C $CHOST/libsanitizer/asan DESTDIR=${pkgdir} install-nodist_toolexeclibHEADERS + make -C $CHOST/libmpx DESTDIR=${pkgdir} install-nodist_toolexeclibHEADERS + + make -C libiberty DESTDIR=${pkgdir} install + # install PIC version of libiberty + install -m644 ${srcdir}/gcc-build/libiberty/pic/libiberty.a ${pkgdir}/usr/lib + + make -C gcc DESTDIR=${pkgdir} install-man install-info + rm ${pkgdir}/usr/share/man/man1/{gccgo,gfortran}.1 + rm ${pkgdir}/usr/share/info/{gccgo,gfortran,gnat-style,gnat_rm,gnat_ugn}.info + + make -C libcpp DESTDIR=${pkgdir} install + make -C gcc DESTDIR=${pkgdir} install-po + + # many packages expect this symlink + ln -s gcc ${pkgdir}/usr/bin/cc + + # POSIX conformance launcher scripts for c89 and c99 + cat > $pkgdir/usr/bin/c89 <<"EOF" +#!/bin/sh +fl="-std=c89" +for opt; do + case "$opt" in + -ansi|-std=c89|-std=iso9899:1990) fl="";; + -std=*) echo "`basename $0` called with non ANSI/ISO C option $opt" >&2 + exit 1;; + esac +done +exec gcc $fl ${1+"$@"} +EOF + + cat > $pkgdir/usr/bin/c99 <<"EOF" +#!/bin/sh +fl="-std=c99" +for opt; do + case "$opt" in + -std=c99|-std=iso9899:1999) fl="";; + -std=*) echo "`basename $0` called with non ISO C99 option $opt" >&2 + exit 1;; + esac +done +exec gcc $fl ${1+"$@"} +EOF + + chmod 755 $pkgdir/usr/bin/c{8,9}9 + + # install the libstdc++ man pages + make -C $CHOST/libstdc++-v3/doc DESTDIR=$pkgdir doc-install-man + + # Install Runtime Library Exception + install -d ${pkgdir}/usr/share/licenses/gcc/ + ln -s ../gcc-libs/RUNTIME.LIBRARY.EXCEPTION ${pkgdir}/usr/share/licenses/gcc/ +} + +package_gcc-fortran-git() +{ + pkgdesc="Fortran front-end for GCC (developmental version)" + depends=("gcc-git=$pkgver-$pkgrel") + provides=('gcc-fortran') + conflicts=('gcc-fortran') + options=('!emptydirs') + install=gcc-fortran.install + + cd ${srcdir}/gcc-build + make -C $CHOST/libgfortran DESTDIR=$pkgdir install-{caf,my}execlibLTLIBRARIES \ + install-{toolexeclibDATA,nodist_fincludeHEADERS} + make -C $CHOST/libgomp DESTDIR=$pkgdir install-nodist_fincludeHEADERS + make -C gcc DESTDIR=$pkgdir fortran.install-{common,man,info} + install -Dm755 gcc/f951 $pkgdir/${_libdir}/f951 + + ln -s gfortran ${pkgdir}/usr/bin/f95 + + # Install Runtime Library Exception + install -d ${pkgdir}/usr/share/licenses/gcc-fortran/ + ln -s ../gcc-libs/RUNTIME.LIBRARY.EXCEPTION ${pkgdir}/usr/share/licenses/gcc-fortran/ +} + +package_gcc-objc-git() +{ + pkgdesc="Objective-C front-end for GCC (developmental version)" + depends=("gcc-git=$pkgver-$pkgrel") + provides=('gcc-objc') + conflicts=('gcc-objc') + + cd ${srcdir}/gcc-build + make DESTDIR=$pkgdir -C $CHOST/libobjc install-headers + install -dm755 $pkgdir/${_libdir} + install -m755 gcc/cc1obj{,plus} $pkgdir/${_libdir}/ + + # Install Runtime Library Exception + install -d ${pkgdir}/usr/share/licenses/gcc-objc/ + ln -s ../gcc-libs/RUNTIME.LIBRARY.EXCEPTION ${pkgdir}/usr/share/licenses/gcc-objc/ +} + +package_gcc-ada-git() +{ + pkgdesc="Ada front-end for GCC (GNAT) (developmental version)" + depends=("gcc-git=$pkgver-$pkgrel") + provides=('gcc-ada') + conflicts=('gcc-ada') + options=('staticlibs' '!emptydirs') + install=gcc-ada.install + + cd ${srcdir}/gcc-build/gcc + make DESTDIR=$pkgdir ada.install-{common,info} + install -m755 gnat1 $pkgdir/${_libdir} + + ln -s gcc ${pkgdir}/usr/bin/gnatgcc + + # insist on dynamic linking, but keep static libraries because gnatmake complains + mv ${pkgdir}/${_libdir}/adalib/libgna{rl,t}-${_pkgver}.so ${pkgdir}/usr/lib + ln -s libgnarl-${_pkgver}.so ${pkgdir}/usr/lib/libgnarl.so + ln -s libgnat-${_pkgver}.so ${pkgdir}/usr/lib/libgnat.so + rm ${pkgdir}/${_libdir}/adalib/libgna{rl,t}.so + + # Install Runtime Library Exception + install -d ${pkgdir}/usr/share/licenses/gcc-ada/ + ln -s ../gcc-libs/RUNTIME.LIBRARY.EXCEPTION ${pkgdir}/usr/share/licenses/gcc-ada/ +} + +package_gcc-go-git() +{ + pkgdesc="Go front-end for GCC (developmental version)" + depends=("gcc-git=$pkgver-$pkgrel") + provides=('gcc-go') + conflicts=('go', 'gcc-go') + options=('!emptydirs') + install=gcc-go.install + + cd ${srcdir}/gcc-build + make -C $CHOST/libgo DESTDIR=$pkgdir install-exec-am + make -C gcc DESTDIR=$pkgdir go.install-{common,man,info} + install -Dm755 gcc/go1 $pkgdir/${_libdir}/go1 + + make DESTDIR=${pkgdir} install-gotools + + # Install Runtime Library Exception + install -d ${pkgdir}/usr/share/licenses/gcc-go/ + ln -s ../gcc-libs/RUNTIME.LIBRARY.EXCEPTION ${pkgdir}/usr/share/licenses/gcc-go/ +} diff --git a/gcc-ada.install b/gcc-ada.install new file mode 100644 index 000000000000..df0553a4f4b7 --- /dev/null +++ b/gcc-ada.install @@ -0,0 +1,20 @@ +infodir=usr/share/info +filelist=(gnat-style.info gnat_rm.info gnat_ugn.info) + +post_install() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info $infodir/$file.gz $infodir/dir 2> /dev/null + done +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null + done +} diff --git a/gcc-fortran.install b/gcc-fortran.install new file mode 100644 index 000000000000..b15d89a97668 --- /dev/null +++ b/gcc-fortran.install @@ -0,0 +1,16 @@ +infodir=usr/share/info +file="gfortran.info" + +post_install() { + [ -x usr/bin/install-info ] || return 0 + install-info $infodir/$file.gz $infodir/dir 2> /dev/null +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null +} diff --git a/gcc-go.install b/gcc-go.install new file mode 100644 index 000000000000..7dc50dee5a92 --- /dev/null +++ b/gcc-go.install @@ -0,0 +1,20 @@ +infodir=usr/share/info +filelist=(gccgo.info) + +post_install() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info $infodir/$file.gz $infodir/dir 2> /dev/null + done +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null + done +} diff --git a/gcc-libs.install b/gcc-libs.install new file mode 100644 index 000000000000..23553b8f0b10 --- /dev/null +++ b/gcc-libs.install @@ -0,0 +1,16 @@ +infodir=usr/share/info +filelist=(libgomp.info libquadmath.info) + +post_upgrade() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info $infodir/$file.gz $infodir/dir 2> /dev/null + done +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null + done +} diff --git a/gcc.install b/gcc.install new file mode 100644 index 000000000000..3407a5e1f37c --- /dev/null +++ b/gcc.install @@ -0,0 +1,20 @@ +infodir=usr/share/info +filelist=(cpp.info cppinternals.info gcc.info gccinstall.info gccint.info) + +post_install() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info $infodir/$file.gz $infodir/dir 2> /dev/null + done +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null + done +} diff --git a/gcc.libstdc++-v3.python.dot.fix.patch b/gcc.libstdc++-v3.python.dot.fix.patch new file mode 100644 index 000000000000..59d8f49a0495 --- /dev/null +++ b/gcc.libstdc++-v3.python.dot.fix.patch @@ -0,0 +1,33 @@ +Index: libstdc++-v3/python/Makefile.am +=================================================================== +--- libstdc++-v3/python/Makefile.am (revision 225409) ++++ libstdc++-v3/python/Makefile.am (working copy) +@@ -45,11 +45,11 @@ + @$(mkdir_p) $(DESTDIR)$(toolexeclibdir) + ## We want to install gdb.py as SOMETHING-gdb.py. SOMETHING is the + ## full name of the final library. We want to ignore symlinks, the +-## .la file, and any previous -gdb.py file. This is inherently +-## fragile, but there does not seem to be a better option, because +-## libtool hides the real names from us. ++## .la file, any previous -gdb.py file, and libstdc++fs*. This is ++## inherently fragile, but there does not seem to be a better option, ++## because libtool hides the real names from us. + @here=`pwd`; cd $(DESTDIR)$(toolexeclibdir); \ +- for file in libstdc++*; do \ ++ for file in libstdc++.*; do \ + case $$file in \ + *-gdb.py) ;; \ + *.la) ;; \ +Index: libstdc++-v3/python/Makefile.in +=================================================================== +--- libstdc++-v3/python/Makefile.in (revision 225409) ++++ libstdc++-v3/python/Makefile.in (working copy) +@@ -547,7 +547,7 @@ + install-data-local: gdb.py + @$(mkdir_p) $(DESTDIR)$(toolexeclibdir) + @here=`pwd`; cd $(DESTDIR)$(toolexeclibdir); \ +- for file in libstdc++*; do \ ++ for file in libstdc++.*; do \ + case $$file in \ + *-gdb.py) ;; \ + *.la) ;; \ diff --git a/pr66035.patch b/pr66035.patch new file mode 100644 index 000000000000..c51822ca1f2c --- /dev/null +++ b/pr66035.patch @@ -0,0 +1,48 @@ +--- a/gcc/fortran/trans-expr.c ++++ a/gcc/fortran/trans-expr.c +@@ -6897,6 +6897,30 @@ alloc_scalar_allocatable_for_subcomponent_assignment (stmtblock_t *block, + TREE_TYPE (tmp), tmp, + fold_convert (TREE_TYPE (tmp), size)); + } ++ else if (cm->ts.type == BT_CLASS) ++ { ++ gcc_assert (expr2->ts.type == BT_CLASS || expr2->ts.type == BT_DERIVED); ++ if (expr2->ts.type == BT_DERIVED) ++ { ++ tmp = gfc_get_symbol_decl (gfc_find_vtab (&expr2->ts)); ++ tmp = gfc_build_addr_expr (NULL_TREE, tmp); ++ size = fold_convert (size_type_node, gfc_vptr_size_get (tmp)); ++ } ++ else ++ { ++ gfc_expr *e2vtab; ++ gfc_se se; ++ e2vtab = gfc_find_and_cut_at_last_class_ref (expr2); ++ gfc_add_vptr_component (e2vtab); ++ gfc_add_size_component (e2vtab); ++ gfc_init_se (&se, NULL); ++ gfc_conv_expr (&se, e2vtab); ++ gfc_add_block_to_block (block, &se.pre); ++ size = fold_convert (size_type_node, se.expr); ++ gfc_free_expr (e2vtab); ++ } ++ size_in_bytes = size; ++ } + else + { + /* Otherwise use the length in bytes of the rhs. */ +@@ -7068,6 +7092,14 @@ gfc_trans_subcomponent_assign (tree dest, gfc_component * cm, gfc_expr * expr, + tmp = gfc_build_memcpy_call (tmp, se.expr, size); + gfc_add_expr_to_block (&block, tmp); + } ++ else if (cm->ts.type == BT_CLASS && expr->ts.type == BT_CLASS) ++ { ++ tmp = gfc_copy_class_to_class (se.expr, dest, integer_one_node, ++ CLASS_DATA (cm)->attr.unlimited_polymorphic); ++ gfc_add_expr_to_block (&block, tmp); ++ gfc_add_modify (&block, gfc_class_vptr_get (dest), ++ gfc_class_vptr_get (se.expr)); ++ } + else + gfc_add_modify (&block, tmp, + fold_convert (TREE_TYPE (tmp), se.expr)); |