summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes2015-09-14 11:32:58 -0400
committerTavian Barnes2015-09-14 11:32:58 -0400
commit3a5671495cdf92b9a077e918b2970c4fb4a33829 (patch)
treefdfd03204b890e07fe3d96461e775907728f82bf
downloadaur-3a5671495cdf92b9a077e918b2970c4fb4a33829.tar.gz
Import from https://github.com/tavianator/arch-rpi-cross.
-rw-r--r--.SRCINFO26
-rw-r--r--.gitignore8
-rw-r--r--PKGBUILD97
-rw-r--r--pr66035.patch48
4 files changed, 179 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..a6728867aab2
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,26 @@
+pkgbase = arm-linux-gnueabihf-gcc-stage1
+ pkgdesc = The GNU Compiler Collection. Stage 1 for toolchain building (arm-linux-gnueabihf)
+ pkgver = 5.2.0
+ pkgrel = 2
+ url = http://gcc.gnu.org
+ arch = i686
+ arch = x86_64
+ license = GPL
+ license = LGPL
+ license = FDL
+ license = custom
+ depends = arm-linux-gnueabihf-binutils>=2.25
+ depends = libmpc
+ depends = zlib
+ options = !emptydirs
+ options = !distcc
+ options = !strip
+ source = ftp://gcc.gnu.org/pub/gcc/releases/gcc-5.2.0/gcc-5.2.0.tar.bz2
+ source = http://isl.gforge.inria.fr/isl-0.14.1.tar.bz2
+ source = pr66035.patch
+ md5sums = a51bcfeb3da7dd4c623e27207ed43467
+ md5sums = 118d1a379abf7606a3334c98a8411c79
+ md5sums = 5b980076cd5fcbc3aff6014f306282dd
+
+pkgname = arm-linux-gnueabihf-gcc-stage1
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..fc606369d37f
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,8 @@
+*.pkg.*
+src/
+pkg/
+gcc-*.tar.bz2
+isl-*.tar.bz2
+*.sig
+*.sign
+*.part
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..4561369896cb
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,97 @@
+# Contributor: Alexander 'hatred' Drozdov <adrozdoff@gmail.com>
+# Contributor: toha257 <toha257@gmail.com>
+# Contributor: Allan McRae <allan@archlinux.org>
+# Contributor: Kevin Mihelich <kevin@archlinuxarm.org>
+# Maintainer: Tavian Barnes <tavianator@tavianator.com>
+
+_target="arm-linux-gnueabihf"
+pkgname=${_target}-gcc-stage1
+pkgver=5.2.0
+_pkgver=5
+_islver=0.14.1
+pkgrel=2
+pkgdesc="The GNU Compiler Collection. Stage 1 for toolchain building (${_target})"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL' 'custom')
+url="http://gcc.gnu.org"
+depends=("${_target}-binutils>=2.25" 'libmpc' 'zlib')
+options=('!emptydirs' '!distcc' '!strip')
+source=(ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.bz2
+ #ftp://gcc.gnu.org/pub/gcc/snapshots/${_snapshot}/gcc-${_snapshot}.tar.bz2
+ http://isl.gforge.inria.fr/isl-${_islver}.tar.bz2
+ pr66035.patch)
+md5sums=('a51bcfeb3da7dd4c623e27207ed43467'
+ '118d1a379abf7606a3334c98a8411c79'
+ '5b980076cd5fcbc3aff6014f306282dd')
+
+if [ -n "${_snapshot}" ]; then
+ _basedir=gcc-${_snapshot}
+else
+ _basedir=gcc-${pkgver}
+fi
+
+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
+
+ echo ${pkgver} > gcc/BASE-VER
+
+ # 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
+
+ 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 \
+ --program-prefix=${_target}- \
+ --with-local-prefix=/usr/${_target} \
+ --with-sysroot=/usr/${_target} \
+ --with-as=/usr/bin/${_target}-as \
+ --with-ld=/usr/bin/${_target}-ld \
+ --libdir=/usr/lib --libexecdir=/usr/lib \
+ --with-arch=armv6 --with-float=hard --with-fpu=vfp \
+ --target=${_target} --host=${CHOST} --build=${CHOST} \
+ --disable-nls --with-newlib \
+ --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 \
+ --with-default-libstdcxx-abi=gcc4-compatible
+
+ 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));