summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Schmidt2017-01-09 18:53:19 +0100
committerStefan Schmidt2017-01-09 18:53:19 +0100
commit5998021a3b68f5211eaffb0011bc8bfdb1789792 (patch)
tree7e7284c36c6ae2da36a32b7ed4cbf4366c2016e2
downloadaur-5998021a3b68f5211eaffb0011bc8bfdb1789792.tar.gz
Initial version
-rw-r--r--.SRCINFO28
-rw-r--r--.gitignore8
-rw-r--r--PKGBUILD88
-rw-r--r--pr66035.patch48
4 files changed, 172 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..b61736572e90
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,28 @@
+pkgbase = powerpc-linux-gnu-gcc-stage2
+ pkgdesc = The GNU Compiler Collection. Stage 2 for toolchain building (powerpc-linux-gnu)
+ pkgver = 6.1.1
+ pkgrel = 3
+ url = http://gcc.gnu.org
+ arch = i686
+ arch = x86_64
+ license = GPL
+ license = LGPL
+ license = FDL
+ license = custom
+ depends = powerpc-linux-gnu-binutils>=2.26.1-1
+ depends = powerpc-linux-gnu-glibc-headers>=2.23-5
+ depends = libmpc
+ depends = zlib
+ provides = powerpc-linux-gnu-gcc-stage1=6.1.1
+ conflicts = powerpc-linux-gnu-gcc-stage1
+ replaces = powerpc-linux-gnu-gcc-stage1
+ options = !emptydirs
+ options = !distcc
+ options = !strip
+ source = https://github.com/gcc-mirror/gcc/archive/1bbd3999.tar.gz
+ source = http://isl.gforge.inria.fr/isl-0.16.1.tar.bz2
+ md5sums = d4c4546f927b2984d66574b1b5cb817e
+ md5sums = ac1f25a0677912952718a51f5bc20f32
+
+pkgname = powerpc-linux-gnu-gcc-stage2
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..7eb1956e4830
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,8 @@
+*.pkg.*
+src/
+pkg/
+*.tar.gz
+*.tar.bz2
+*.sig
+*.sign
+*.part
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..9fe566fb6e5a
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,88 @@
+# Contributor: Alexander 'hatred' Drozdov <adrozdoff@gmail.com>
+# Contributor: toha257 <toha257@gmail.com>
+# Contributor: Allan McRae <allan@archlinux.org>
+# Contributor: Kevin Mihelich <kevin@archlinuxarm.org>
+# Contributor: Tavian Barnes <tavianator@tavianator.com>
+# Maintainer: Stefan Schmidt <thrimbor.github@gmail.com>
+
+_target="powerpc-linux-gnu"
+pkgname=${_target}-gcc-stage2
+pkgver=6.1.1
+_pkgver=6
+_islver=0.16.1
+pkgrel=3
+_commit=1bbd3999
+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.26.1-1" "${_target}-glibc-headers>=2.23-5" '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)
+md5sums=('d4c4546f927b2984d66574b1b5cb817e'
+ 'ac1f25a0677912952718a51f5bc20f32')
+
+prepare() {
+ mv gcc-${_commit}* gcc
+ cd ${srcdir}/gcc
+
+ # 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
+
+ # hack! - some configure tests for header files using "$CPP $CPPFLAGS"
+ sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" {libiberty,gcc}/configure
+
+ 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}/gcc/configure --prefix=/usr \
+ --program-prefix=${_target}- \
+ --with-local-prefix=/usr/${_target} \
+ --with-sysroot=/usr/${_target} \
+ --with-build-sysroot=/usr/${_target} \
+ --with-as=/usr/bin/${_target}-as \
+ --with-ld=/usr/bin/${_target}-ld \
+ --libdir=/usr/lib --libexecdir=/usr/lib \
+ --target=${_target} --host=${CHOST} --build=${CHOST} \
+ --disable-nls \
+ --enable-languages=c,c++ \
+ --disable-shared --disable-threads \
+ --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 \
+ --disable-lto --disable-plugin --enable-install-libiberty \
+ --with-linker-hash-style=gnu --enable-gnu-indirect-function \
+ --disable-multilib --disable-werror \
+ --enable-checking=release
+
+ make all-gcc all-target-libgcc
+}
+
+package() {
+ cd ${srcdir}/gcc-build
+
+ make DESTDIR=${pkgdir} install-gcc install-target-libgcc
+
+ 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-unneeded {} \; 2>/dev/null || true
+}
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));