[arch-commits] Commit in gcc/trunk (4 files)
Allan McRae
allan at archlinux.org
Sun May 3 03:09:44 UTC 2015
Date: Sunday, May 3, 2015 @ 05:09:44
Author: allan
Revision: 238373
new upstream snapshop + additional patches
Added:
gcc/trunk/pr65801.patch
gcc/trunk/pr65822.patch
gcc/trunk/pr65873.patch
Modified:
gcc/trunk/PKGBUILD
---------------+
PKGBUILD | 36 ++++++++++++++++++++++++------
pr65801.patch | 54 +++++++++++++++++++++++++++++++++++++++++++++
pr65822.patch | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
pr65873.patch | 17 ++++++++++++++
4 files changed, 166 insertions(+), 7 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2015-05-02 18:25:47 UTC (rev 238372)
+++ PKGBUILD 2015-05-03 03:09:44 UTC (rev 238373)
@@ -9,7 +9,7 @@
_pkgver=5
_islver=0.14.1
pkgrel=1
-#_snapshot=5.1.0-RC-20150412
+_snapshot=5-20150428
pkgdesc="The GNU Compiler Collection"
arch=('i686' 'x86_64')
license=('GPL' 'LGPL' 'FDL' 'custom')
@@ -17,11 +17,17 @@
makedepends=('binutils>=2.25' 'libmpc' 'gcc-ada' 'doxygen')
checkdepends=('dejagnu' 'inetutils')
options=('!emptydirs')
-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)
-md5sums=('d5525b1127d07d215960e6051c5da35e'
- '118d1a379abf7606a3334c98a8411c79')
+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
+ pr65801.patch
+ pr65822.patch
+ pr65873.patch)
+md5sums=('6068bb8e23caa1172a127026e05ed311'
+ '118d1a379abf7606a3334c98a8411c79'
+ '0e0ab8f824573f51733aaeee84254df6'
+ '9a9cc98e916fd37c7b3dad50f29d2f48'
+ 'cad91055efb6e20919fb81aff1600d8e')
if [ -n "${_snapshot}" ]; then
_basedir=gcc-${_snapshot}
@@ -48,6 +54,15 @@
# hack! - some configure tests for header files using "$CPP $CPPFLAGS"
sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" {libiberty,gcc}/configure
+ # commit 346ee8b5
+ patch -p1 -i ${srcdir}/pr65801.patch
+
+ # https://gcc.gnu.org/ml/gcc-patches/2015-04/msg01558.html
+ patch -p1 -i ${srcdir}/pr65822.patch
+
+ # commit a64b35493
+ patch -p1 -i ${srcdir}/pr65873.patch
+
mkdir ${srcdir}/gcc-build
}
@@ -64,7 +79,7 @@
--mandir=/usr/share/man --infodir=/usr/share/info \
--with-bugurl=https://bugs.archlinux.org/ \
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ \
- --enable-shared --enable-threads=posix \
+ --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 \
@@ -112,6 +127,7 @@
libgomp \
libitm \
libquadmath \
+ libmpx \
libsanitizer/{a,l,ub}san \
libstdc++-v3/src \
libvtv; do
@@ -168,7 +184,9 @@
make DESTDIR=${pkgdir} install-fixincludes
make -C gcc DESTDIR=${pkgdir} install-mkheaders
+
make -C lto-plugin DESTDIR=${pkgdir} install
+ ln -s /usr/lib/gcc/$CHOST/${pkgver}/liblto_plugin.so ${pkgdir}/usr/lib/bfd-plugins/
make -C $CHOST/libcilkrts DESTDIR=${pkgdir} install-nodist_toolexeclibHEADERS \
install-nodist_cilkincludeHEADERS
@@ -304,6 +322,10 @@
make DESTDIR=${pkgdir} install-gotools
+ # fix conflicts with go package
+ mv ${pkgdir}/usr/bin/{,gcc-}go
+ mv ${pkgdir}/usr/bin/{,gcc-}gofmt
+
# Install Runtime Library Exception
install -d ${pkgdir}/usr/share/licenses/gcc-go/
ln -s ../gcc-libs/RUNTIME.LIBRARY.EXCEPTION ${pkgdir}/usr/share/licenses/gcc-go/
Added: pr65801.patch
===================================================================
--- pr65801.patch (rev 0)
+++ pr65801.patch 2015-05-03 03:09:44 UTC (rev 238373)
@@ -0,0 +1,54 @@
+diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c
+index 80a6939..884957b 100644
+--- a/gcc/cp/typeck2.c
++++ b/gcc/cp/typeck2.c
+@@ -957,9 +957,13 @@ check_narrowing (tree type, tree init, tsubst_flags_t complain)
+ }
+ }
+ else if (complain & tf_error)
+- error_at (EXPR_LOC_OR_LOC (init, input_location),
+- "narrowing conversion of %qE from %qT to %qT inside { }",
+- init, ftype, type);
++ {
++ global_dc->pedantic_errors = 1;
++ pedwarn (EXPR_LOC_OR_LOC (init, input_location), OPT_Wnarrowing,
++ "narrowing conversion of %qE from %qT to %qT inside { }",
++ init, ftype, type);
++ global_dc->pedantic_errors = flag_pedantic_errors;
++ }
+ }
+
+ return cxx_dialect == cxx98 || ok;
+diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
+index 520c2c5..4ef8f7f 100644
+--- a/gcc/doc/invoke.texi
++++ b/gcc/doc/invoke.texi
+@@ -2703,10 +2703,10 @@ int i = @{ 2.2 @}; // error: narrowing from double to int
+
+ This flag is included in @option{-Wall} and @option{-Wc++11-compat}.
+
+-With @option{-std=c++11}, @option{-Wno-narrowing} suppresses for
+-non-constants the diagnostic required by the standard. Note that this
+-does not affect the meaning of well-formed code; narrowing conversions
+-are still considered ill-formed in SFINAE context.
++With @option{-std=c++11}, @option{-Wno-narrowing} suppresses the diagnostic
++required by the standard. Note that this does not affect the meaning
++of well-formed code; narrowing conversions are still considered
++ill-formed in SFINAE context.
+
+ @item -Wnoexcept @r{(C++ and Objective-C++ only)}
+ @opindex Wnoexcept
+diff --git a/gcc/testsuite/g++.dg/cpp0x/Wnarrowing2.C b/gcc/testsuite/g++.dg/cpp0x/Wnarrowing2.C
+new file mode 100644
+index 0000000..fc806f9
+--- /dev/null
++++ b/gcc/testsuite/g++.dg/cpp0x/Wnarrowing2.C
+@@ -0,0 +1,5 @@
++// PR c++/65801
++// { dg-do compile { target c++11 } }
++// { dg-options "-Wno-narrowing" }
++
++static struct zai { unsigned int x; } x = {-1};
+--
+2.3.6
+
Added: pr65822.patch
===================================================================
--- pr65822.patch (rev 0)
+++ pr65822.patch 2015-05-03 03:09:44 UTC (rev 238373)
@@ -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>();
++}
Added: pr65873.patch
===================================================================
--- pr65873.patch (rev 0)
+++ pr65873.patch 2015-05-03 03:09:44 UTC (rev 238373)
@@ -0,0 +1,17 @@
+diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c
+index 565c5e3..1427761 100644
+--- a/gcc/ipa-inline.c
++++ b/gcc/ipa-inline.c
+@@ -439,9 +439,6 @@ can_inline_edge_p (struct cgraph_edge *e, bool report,
+ == !opt_for_fn (callee->decl, optimize) || !always_inline))
+ || check_match (flag_wrapv)
+ || check_match (flag_trapv)
+- /* Strictly speaking only when the callee contains memory
+- accesses that are not using alias-set zero anyway. */
+- || check_maybe_down (flag_strict_aliasing)
+ /* Strictly speaking only when the callee uses FP math. */
+ || check_maybe_up (flag_rounding_math)
+ || check_maybe_up (flag_trapping_math)
+--
+2.3.6
+
More information about the arch-commits
mailing list