summaryrefslogtreecommitdiff
path: root/cross
diff options
context:
space:
mode:
authorcoadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu>2015-06-04 09:44:17 -0300
committercoadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu>2015-06-04 09:44:17 -0300
commitd44fb52dd886e591fbb52c44e10742109541502c (patch)
tree1edace9c357c1fae25496db8ca1bffcb8dc9a746 /cross
parent00c476b594c415e80583ab285cd55dd2f7743cce (diff)
update cross-gcc
Diffstat (limited to 'cross')
-rw-r--r--cross/cross-gcc/PKGBUILD91
-rw-r--r--cross/cross-gcc/gcc-4.8-filename-output.patch17
-rw-r--r--cross/cross-gcc/gcc-4.9-isl-0.13-hack.patch71
-rw-r--r--cross/cross-gcc/pr65882.patch66
-rw-r--r--cross/cross-gcc/pr66035.patch48
5 files changed, 158 insertions, 135 deletions
diff --git a/cross/cross-gcc/PKGBUILD b/cross/cross-gcc/PKGBUILD
index 051cd64b3..3b9e5c4d3 100644
--- a/cross/cross-gcc/PKGBUILD
+++ b/cross/cross-gcc/PKGBUILD
@@ -1,5 +1,5 @@
-# Maintainer (Arch): Allan McRae <allan@archlinux.org>
# Maintainer: Márcio Silva (Parabola) <coadde@parabola.nu>
+# Maintainer (Arch): Allan McRae <allan@archlinux.org>
# toolchain build order: {kernel}-api-headers->glibc->binutils->gcc->binutils->glibc
@@ -122,30 +122,29 @@ fi
_pkgname=gcc
pkgname=$_target-$_pkgname
-pkgver=4.9.2
-_pkgver=4.9
-_islver=0.12.2
-_cloogver=0.18.1
-pkgrel=1
-#_snapshot=4.9-20140903
+pkgver=5.1.0
+_pkgver=5
+_islver=0.14.1
+pkgrel=4
+_snapshot=5-20150519
pkgdesc="The GNU Compiler Collection"
-arch=('i686' 'x86_64' 'mips64el')
+arch=('i686' 'x86_64' 'armv7h' 'aarch64' 'mips64el')
license=('GPL' 'LGPL' 'FDL' 'custom')
url="http://$_pkgname.gnu.org"
-makedepends=('binutils>=2.24' 'libmpc' 'doxygen')
+makedepends=('binutils>=2.25' 'libmpc' 'doxygen')
checkdepends=('dejagnu' 'inetutils')
options=('!emptydirs')
-source=(ftp://$_pkgname.gnu.org/pub/$_pkgname/releases/$_pkgname-${pkgver}/$_pkgname-${pkgver}.tar.bz2
- #ftp://$_pkgname.gnu.org/pub/$_pkgname/snapshots/${_snapshot}/$_pkgname-${_snapshot}.tar.bz2
+source=(#ftp://$_pkgname.gnu.org/pub/$_pkgname/releases/$_pkgname-${pkgver}/$_pkgname-${pkgver}.tar.bz2
+ ftp://$_pkgname.gnu.org/pub/$_pkgname/snapshots/${_snapshot}/$_pkgname-${_snapshot}.tar.bz2
http://isl.gforge.inria.fr/isl-${_islver}.tar.bz2
- http://www.bastoul.net/cloog/pages/download/cloog-${_cloogver}.tar.gz
- $_pkgname-4.8-filename-output.patch
+ pr65882.patch
+ pr66035.patch
$_pkgname-xtensa.patch::https://raw.githubusercontent.com/qca/open-ath9k-htc-firmware/1.3.2/local/patches/$_pkgname.patch
mips-kfreebsd-gnu.patch)
-md5sums=('4df8ee253b7f3863ad0b86359cd39c43'
- 'e039bfcfb6c2ab039b8ee69bf883e824'
- 'e34fca0540d840e5d0f6427e98c92252'
- '6810bb9b2252f03e6c98d9a671d94589'
+md5sums=('84f261b2f23e154ec6d9bd4149851a21'
+ '118d1a379abf7606a3334c98a8411c79'
+ '9a9cc98e916fd37c7b3dad50f29d2f48'
+ '5b980076cd5fcbc3aff6014f306282dd'
'81372ee980289a9f6df01dad31c64a63'
'43282cddb2080b1180f7b76d3a8a832c')
@@ -160,9 +159,8 @@ _libdir="usr/lib/$_pkgname/$_target/$pkgver"
prepare() {
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@' $_pkgname/Makefile.in
@@ -175,9 +173,11 @@ prepare() {
# hack! - some configure tests for header files using "$CPP $CPPFLAGS"
sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" {libiberty,$_pkgname}/configure
- # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57653
- # https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=9140d56f
- patch -p1 -i ${srcdir}/$_pkgname-4.8-filename-output.patch
+ # https://gcc.gnu.org/ml/gcc-patches/2015-04/msg01558.html
+ patch -p1 -i ${srcdir}/pr65882.patch
+
+ # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66035
+ patch -p1 -i ${srcdir}/pr66035.patch
# open-ath9k-htc-firmware patch on xtensa-unknown-elf
[[ $_target == xtensa-unknown-elf ]] && patch -p1 -i ${srcdir}/$_pkgname-xtensa.patch
@@ -199,29 +199,28 @@ build() {
${srcdir}/${_basedir}/configure --prefix=/usr \
--libdir=/usr/lib --libexecdir=/usr/lib \
- --mandir=/usr/share/man --infodir=/usr/share/info \
+ --mandir=/usr/share/man \
--with-bugurl=https://labs.parabola.nu/ \
- --enable-languages=c,c++,lto --disable-static \
- --enable-shared --enable-threads=posix \
- --with-system-zlib --enable-__cxa_atexit \
+ --enable-languages=c,c++,lto \
+ --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 --target=$_target --program-prefix=$_target-
+ --enable-checking=release \
+ --with-default-libstdcxx-abi=c++98 --disable-nls \
+ --target=$_target
make all-$_pkgname
}
package() {
pkgdesc="The GNU Compiler Collection - C and C++ frontends"
- depends=("$_target-binutils>=2.24" 'libmpc')
+ depends=("$_target-binutils>=2.25" 'libmpc')
groups=('cross-devel')
options=('staticlibs')
- provides=("$_pkgname=$pkgver")
- conflicts=("$_pkgname" "$_pkgname-ada" "$_pkgname-fortran" "$_pkgname-go" "$_pkgname-objc")
install=$_pkgname.install
cd ${srcdir}/$_pkgname-build
@@ -229,27 +228,23 @@ package() {
make -C $_pkgname DESTDIR=${pkgdir} install-driver install-cpp install-$_pkgname-ar \
c++.install-common install-headers install-plugin install-lto-wrapper
- install -m755 $_pkgname/gcov $pkgdir/usr/bin/
+ install -m755 $_pkgname/gcov $pkgdir/usr/bin/$_target-gcov
install -m755 -t $pkgdir/${_libdir}/ $_pkgname/{cc1,cc1plus,collect2,lto1}
make DESTDIR=${pkgdir} install-fixincludes
make -C $_pkgname DESTDIR=${pkgdir} install-mkheaders
make -C lto-plugin DESTDIR=${pkgdir} install
- make -C libiberty DESTDIR=${pkgdir} install
- # install PIC version of libiberty
- install -m644 ${srcdir}/$_pkgname-build/libiberty/pic/libiberty.a ${pkgdir}/usr/lib
-
- make -C $_pkgname DESTDIR=${pkgdir} install-man install-info
+ make -C $_pkgname DESTDIR=${pkgdir} install-man
make -C libcpp DESTDIR=${pkgdir} install
make -C $_pkgname DESTDIR=${pkgdir} install-po
# many packages expect this symlink
- ln -s $_pkgname ${pkgdir}/usr/bin/cc
+ ln -s $_target-$_pkgname ${pkgdir}/usr/bin/$_target-cc
# POSIX conformance launcher scripts for c89 and c99
- cat > $pkgdir/usr/bin/c89 <<"EOF"
+ cat > $pkgdir/usr/bin/$_target-c89 <<"EOF"
#!/bin/sh
fl="-std=c89"
for opt; do
@@ -261,8 +256,9 @@ for opt; do
done
exec gcc $fl ${1+"$@"}
EOF
+sed -i "s|exec gcc|exec $_target-gcc|" $pkgdir/usr/bin/$_target-c89
- cat > $pkgdir/usr/bin/c99 <<"EOF"
+ cat > $pkgdir/usr/bin/$_target-c99 <<"EOF"
#!/bin/sh
fl="-std=c99"
for opt; do
@@ -274,12 +270,13 @@ for opt; do
done
exec gcc $fl ${1+"$@"}
EOF
+sed -i "s|exec gcc|exec $_target-gcc|" $pkgdir/usr/bin/$_target-c99
+
+ chmod 755 $pkgdir/usr/bin/$_target-c{8,9}9
- chmod 755 $pkgdir/usr/bin/c{8,9}9
+ # Remove man documents that conflict with host version
+ rm -rf ${pkgdir}/usr/share/man/man7
- # link files
- for bin2 in c++ cpp g++ gcc gcc-ar gcc-nm gcc-ranlib; do
- ln -s $_target-$bin2 $pkgdir/usr/bin/$bin2; done
- for man in $(ls -1 $pkgdir/usr/share/man/man1); do
- ln -s $man $pkgdir/usr/share/man/man1/${man#$_target-}; done
+ # Remove unused dirs
+ rmdir ${pkgdir}/usr/{include,share/info}
}
diff --git a/cross/cross-gcc/gcc-4.8-filename-output.patch b/cross/cross-gcc/gcc-4.8-filename-output.patch
deleted file mode 100644
index 7c2ee0aa5..000000000
--- a/cross/cross-gcc/gcc-4.8-filename-output.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c
-index 968b703..3f8e6e6 100644
---- a/gcc/c-family/c-opts.c
-+++ b/gcc/c-family/c-opts.c
-@@ -1438,6 +1438,12 @@ c_finish_options (void)
- static void
- push_command_line_include (void)
- {
-+ /* This can happen if disabled by -imacros for example.
-+ Punt so that we don't set "<command-line>" as the filename for
-+ the header. */
-+ if (include_cursor > deferred_count)
-+ return;
-+
- if (!done_preinclude)
- {
- done_preinclude = true;
diff --git a/cross/cross-gcc/gcc-4.9-isl-0.13-hack.patch b/cross/cross-gcc/gcc-4.9-isl-0.13-hack.patch
deleted file mode 100644
index c2b95d952..000000000
--- a/cross/cross-gcc/gcc-4.9-isl-0.13-hack.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-diff -Naur gcc-4.9-20140604-old/gcc/graphite-clast-to-gimple.c gcc-4.9-20140604/gcc/graphite-clast-to-gimple.c
---- gcc-4.9-20140604-old/gcc/graphite-clast-to-gimple.c 2014-03-03 21:39:22.000000000 +1000
-+++ gcc-4.9-20140604/gcc/graphite-clast-to-gimple.c 2014-06-25 15:07:57.958697105 +1000
-@@ -28,6 +28,8 @@
- #include <isl/constraint.h>
- #include <isl/ilp.h>
- #include <isl/aff.h>
-+#include <isl/deprecated/int.h>
-+#include <isl/deprecated/ilp_int.h>
- #include <cloog/cloog.h>
- #include <cloog/isl/domain.h>
- #endif
-diff -Naur gcc-4.9-20140604-old/gcc/graphite-interchange.c gcc-4.9-20140604/gcc/graphite-interchange.c
---- gcc-4.9-20140604-old/gcc/graphite-interchange.c 2014-01-03 08:23:26.000000000 +1000
-+++ gcc-4.9-20140604/gcc/graphite-interchange.c 2014-06-25 15:10:06.882899243 +1000
-@@ -29,6 +29,9 @@
- #include <isl/map.h>
- #include <isl/union_map.h>
- #include <isl/ilp.h>
-+#include <isl/deprecated/int.h>
-+#include <isl/deprecated/ilp_int.h>
-+#include <isl/deprecated/constraint_int.h>
- #include <cloog/cloog.h>
- #include <cloog/isl/domain.h>
- #endif
-diff -Naur gcc-4.9-20140604-old/gcc/graphite-optimize-isl.c gcc-4.9-20140604/gcc/graphite-optimize-isl.c
---- gcc-4.9-20140604-old/gcc/graphite-optimize-isl.c 2014-01-03 08:23:26.000000000 +1000
-+++ gcc-4.9-20140604/gcc/graphite-optimize-isl.c 2014-06-25 15:16:57.038386166 +1000
-@@ -28,6 +28,8 @@
- #include <isl/band.h>
- #include <isl/aff.h>
- #include <isl/options.h>
-+#include <isl/deprecated/int.h>
-+#include <isl/deprecated/aff_int.h>
- #endif
-
- #include "system.h"
-@@ -373,7 +375,7 @@
- {
- for (i = ScheduleDimensions - 1 ; i >= 0 ; i--)
- {
-- if (isl_band_member_is_zero_distance (Band, i))
-+ if (isl_band_member_is_coincident (Band, i))
- {
- isl_map *TileMap;
- isl_union_map *TileUMap;
-diff -Naur gcc-4.9-20140604-old/gcc/graphite-poly.c gcc-4.9-20140604/gcc/graphite-poly.c
---- gcc-4.9-20140604-old/gcc/graphite-poly.c 2014-01-03 08:23:26.000000000 +1000
-+++ gcc-4.9-20140604/gcc/graphite-poly.c 2014-06-25 15:18:01.207157796 +1000
-@@ -28,6 +28,8 @@
- #include <isl/constraint.h>
- #include <isl/ilp.h>
- #include <isl/aff.h>
-+#include <isl/deprecated/int.h>
-+#include <isl/deprecated/ilp_int.h>
- #include <cloog/cloog.h>
- #include <cloog/isl/domain.h>
- #endif
-diff -Naur gcc-4.9-20140604-old/gcc/graphite-sese-to-poly.c gcc-4.9-20140604/gcc/graphite-sese-to-poly.c
---- gcc-4.9-20140604-old/gcc/graphite-sese-to-poly.c 2014-04-08 20:59:40.000000000 +1000
-+++ gcc-4.9-20140604/gcc/graphite-sese-to-poly.c 2014-06-25 15:19:46.575140398 +1000
-@@ -26,6 +26,9 @@
- #include <isl/union_map.h>
- #include <isl/constraint.h>
- #include <isl/aff.h>
-+#include <isl/deprecated/int.h>
-+#include <isl/deprecated/aff_int.h>
-+#include <isl/deprecated/constraint_int.h>
- #include <cloog/cloog.h>
- #include <cloog/cloog.h>
- #include <cloog/isl/domain.h>
diff --git a/cross/cross-gcc/pr65882.patch b/cross/cross-gcc/pr65882.patch
new file mode 100644
index 000000000..673712b2b
--- /dev/null
+++ b/cross/cross-gcc/pr65882.patch
@@ -0,0 +1,66 @@
+diff --git a/gcc/cp/call.c b/gcc/cp/call.c
+index 7bdf236..689d542 100644
+--- a/gcc/cp/call.c
++++ b/gcc/cp/call.c
+@@ -5677,8 +5677,9 @@ build_new_op_1 (location_t loc, enum tree_code code, int flags, tree arg1,
+ case TRUTH_ORIF_EXPR:
+ case TRUTH_AND_EXPR:
+ case TRUTH_OR_EXPR:
+- warn_logical_operator (loc, code, boolean_type_node,
+- code_orig_arg1, arg1, code_orig_arg2, arg2);
++ if (complain & tf_warning)
++ warn_logical_operator (loc, code, boolean_type_node,
++ code_orig_arg1, arg1, code_orig_arg2, arg2);
+ /* Fall through. */
+ case GT_EXPR:
+ case LT_EXPR:
+@@ -5686,8 +5687,9 @@ build_new_op_1 (location_t loc, enum tree_code code, int flags, tree arg1,
+ case LE_EXPR:
+ case EQ_EXPR:
+ case NE_EXPR:
+- if ((code_orig_arg1 == BOOLEAN_TYPE)
+- ^ (code_orig_arg2 == BOOLEAN_TYPE))
++ if ((complain & tf_warning)
++ && ((code_orig_arg1 == BOOLEAN_TYPE)
++ ^ (code_orig_arg2 == BOOLEAN_TYPE)))
+ maybe_warn_bool_compare (loc, code, arg1, arg2);
+ /* Fall through. */
+ case PLUS_EXPR:
+diff --git a/gcc/testsuite/g++.dg/diagnostic/inhibit-warn.C b/gcc/testsuite/g++.dg/diagnostic/inhibit-warn.C
+new file mode 100644
+index 0000000..5655eb4
+--- /dev/null
++++ b/gcc/testsuite/g++.dg/diagnostic/inhibit-warn.C
+@@ -0,0 +1,32 @@
++// PR c++/65882
++// { dg-do compile { target c++11 } }
++// { dg-options "-Wbool-compare" }
++
++// Check that we don't ICE because of reentering error reporting routines while
++// evaluating template parameters
++
++template<typename>
++struct type_function {
++ static constexpr bool value = false;
++};
++
++template<bool>
++struct dependent_type {
++ typedef int type;
++};
++
++template<typename T>
++typename dependent_type<(5 > type_function<T>::value)>::type
++bar();
++
++template<typename T>
++typename dependent_type<(5 > type_function<T>::value)>::type
++foo()
++{
++ return bar<int>();
++}
++
++int main()
++{
++ foo<int>();
++}
diff --git a/cross/cross-gcc/pr66035.patch b/cross/cross-gcc/pr66035.patch
new file mode 100644
index 000000000..c51822ca1
--- /dev/null
+++ b/cross/cross-gcc/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));