diff options
author | Tavian Barnes | 2015-09-14 11:42:07 -0400 |
---|---|---|
committer | Tavian Barnes | 2015-09-14 11:42:07 -0400 |
commit | 0de536bff646c56b22706fca1876faa2e0c1a16a (patch) | |
tree | 49de439ac08e2e8f3061dd78867794f94649a455 | |
download | aur-0de536bff646c56b22706fca1876faa2e0c1a16a.tar.gz |
Import from https://github.com/tavianator/arch-rpi-cross.
-rw-r--r-- | .SRCINFO | 36 | ||||
-rw-r--r-- | .gitignore | 8 | ||||
-rw-r--r-- | PKGBUILD | 105 | ||||
-rw-r--r-- | pr66035.patch | 48 |
4 files changed, 197 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..f4d100ada253 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,36 @@ +pkgbase = arm-linux-gnueabihf-gcc + pkgdesc = The GNU Compiler Collection (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 + checkdepends = dejagnu + checkdepends = inetutils + depends = arm-linux-gnueabihf-binutils>=2.25 + depends = arm-linux-gnueabihf-glibc + depends = libmpc + depends = elfutils + depends = zlib + provides = arm-linux-gnueabihf-gcc-stage1=5.2.0 + provides = arm-linux-gnueabihf-gcc-stage2=5.2.0 + conflicts = arm-linux-gnueabihf-gcc-stage1 + conflicts = arm-linux-gnueabihf-gcc-stage2 + replaces = arm-linux-gnueabihf-gcc-stage1 + replaces = arm-linux-gnueabihf-gcc-stage2 + 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 + 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..2913d6ca144b --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,105 @@ +# 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" +pkgver=5.2.0 +_pkgver=5 +_islver=0.14.1 +pkgrel=2 +#_snapshot=5-20150623 +pkgdesc="The GNU Compiler Collection (${_target})" +arch=('i686' 'x86_64') +license=('GPL' 'LGPL' 'FDL' 'custom') +url="http://gcc.gnu.org" +depends=("${_target}-binutils>=2.25" "${_target}-glibc" 'libmpc' 'elfutils' 'zlib') +checkdepends=('dejagnu' 'inetutils') +options=('!emptydirs' '!distcc' '!strip') +conflicts=("${_target}-gcc-stage1" "${_target}-gcc-stage2") +replaces=("${_target}-gcc-stage1" "${_target}-gcc-stage2") +provides=("${_target}-gcc-stage1=${pkgver}" "${_target}-gcc-stage2=${pkgver}") +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 \ + --enable-languages=c,c++ \ + --enable-shared --enable-threads=posix \ + --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=gcc4-compatible + + #--enable-languages=c,c++,fortran,go,lto,objc,obj-c++ \ + + make +} + +package() { + cd ${srcdir}/gcc-build + + make DESTDIR=${pkgdir} install-gcc install-target-libgcc \ + install-target-libstdc++-v3 + + 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)); |