diff options
author | Rod Kay | 2015-08-25 00:13:24 +1000 |
---|---|---|
committer | Rod Kay | 2015-08-25 00:13:24 +1000 |
commit | 3d91392406d9af78305a0985ea509af33cbe09fc (patch) | |
tree | e83e6a95c4c6fd2c4289b671aa7d8282d23b3b02 | |
parent | 1769cb3a43f154d3a8b96675e18e3c61d8174a2e (diff) | |
download | aur-3d91392406d9af78305a0985ea509af33cbe09fc.tar.gz |
Updated to match gcc 5.2.0
-rw-r--r-- | PKGBUILD | 54 | ||||
-rw-r--r-- | pr66035.patch | 48 |
2 files changed, 77 insertions, 25 deletions
@@ -5,10 +5,9 @@ pkgver=5.1.0 pkgrel=1 pkgdesc="Provides internal GNAT compiler components in a library which is used by (at least) ASIS and GNATColl." -_islver=0.12.2 -_cloogver=0.18.1 -_snapshot=5.2-20150721 -_basedir=gcc-5-20150721 +_islver=0.14.1 +_basedir=gcc-5.2.0 + options=('!emptydirs') arch=('i686' 'x86_64') @@ -16,27 +15,30 @@ url="http://sourceforge.net/projects/gnatutil" license=('GPL V3.0 without any Runtime Exception') depends=('gcc-ada' 'xmlada' 'gprbuild' 'prepare_gnat_util') -makedepends=('binutils>=2.25' 'libmpc' 'gcc-ada') +makedepends=('binutils>=2.25' 'libmpc' 'gcc-ada' 'doxygen') source=(http://sourceforge.net/projects/gnatutil/files/5.1.0/gnat_util-5.1.0.tar.gz - http://ftp.tsukuba.wide.ad.jp/software/gcc/snapshots/5-20150721/gcc-5-20150721.tar.bz2 + ftp://gcc.gnu.org/pub/gcc/releases/gcc-5.2.0/gcc-5.2.0.tar.bz2 http://isl.gforge.inria.fr/isl-${_islver}.tar.bz2 - http://www.bastoul.net/cloog/pages/download/cloog-${_cloogver}.tar.gz) + pr66035.patch) md5sums=('4a7a6642bc5c3dfe67bfacf2d14206cc' - '2d9478d69f566492175a5b7af6d8dd25' - 'e039bfcfb6c2ab039b8ee69bf883e824' - 'e34fca0540d840e5d0f6427e98c92252') + 'a51bcfeb3da7dd4c623e27207ed43467' + '118d1a379abf7606a3334c98a8411c79' + '5b980076cd5fcbc3aff6014f306282dd') -prepare() { +prepare() +{ + ## Prepare for gcc-ada build (note: much of this section is derived from the gcc PKGBUILD). + # + cd ${srcdir}/${_basedir} - # link isl/cloog for in-tree builds + # link isl for in-tree build ln -s ../isl-${_islver} isl - ln -s ../cloog-${_cloogver} cloog # Do not run fixincludes sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in @@ -49,14 +51,17 @@ prepare() { # 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 + # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66035 + patch -p1 -i ${srcdir}/pr66035.patch + + mkdir ${srcdir}/gcc-build } build() { - ## Build gcc-ada (note: much of this section is derived from the gcc-ada PKGBUILD). + ## Build gcc-ada (note: much of this section is derived from the gcc PKGBUILD). # cd ${srcdir}/gcc-build @@ -70,18 +75,19 @@ build() --libdir=/usr/lib --libexecdir=/usr/lib \ --mandir=/usr/share/man --infodir=/usr/share/info \ --with-bugurl=https://bugs.archlinux.org/ \ - --enable-languages=ada \ - --enable-shared --enable-threads=posix \ - --with-system-zlib --enable-__cxa_atexit \ + --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-cloog-backend=isl \ --enable-lto --enable-plugin --enable-install-libiberty \ - --with-linker-hash-style=gnu \ + --with-linker-hash-style=gnu --enable-gnu-indirect-function \ --disable-multilib --disable-werror \ - --enable-checking=release - make -j7 + --enable-checking=release \ + --with-default-libstdcxx-abi=gcc4-compatible + + make ## Build gnat util. @@ -89,7 +95,7 @@ build() cd "$srcdir/$pkgname-$pkgver" - export GCC_SRC_BASE="$srcdir/gcc-5-20150721" + export GCC_SRC_BASE="$srcdir/gcc-5.2.0" export GCC_BLD_BASE="$srcdir/gcc-build" make @@ -102,5 +108,3 @@ package() cd "$srcdir/$pkgname-$pkgver" make prefix="$pkgdir/usr" install } - - 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)); |