diff --git a/srcpkgs/gcc/patches/gcc-4.8-filename-output.patch b/srcpkgs/gcc/patches/gcc-4.8-filename-output.patch new file mode 100644 index 00000000000..2d97c0c84e8 --- /dev/null +++ b/srcpkgs/gcc/patches/gcc-4.8-filename-output.patch @@ -0,0 +1,19 @@ +http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57653 + +--- gcc/c-family/c-opts.c (revision 200330) ++++ gcc/c-family/c-opts.c (working copy) +@@ -1338,10 +1338,14 @@ c_finish_options (void) + + /* Give CPP the next file given by -include, if any. */ + static void + push_command_line_include (void) + { ++ // This can happen if disabled by -imacros for example. ++ if (include_cursor > deferred_count) ++ return; ++ + if (!done_preinclude) + { + done_preinclude = true; + if (flag_hosted && std_inc && !cpp_opts->preprocessed) + { diff --git a/srcpkgs/gcc/patches/gcc-4.9-tree-ssa-threadedge.patch b/srcpkgs/gcc/patches/gcc-4.9-tree-ssa-threadedge.patch new file mode 100644 index 00000000000..ef1751b6cf7 --- /dev/null +++ b/srcpkgs/gcc/patches/gcc-4.9-tree-ssa-threadedge.patch @@ -0,0 +1,40 @@ +http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60902 + +--- gcc/tree-ssa-threadedge.c 2014/04/23 17:53:56 209715 ++++ gcc/tree-ssa-threadedge.c 2014/04/23 18:04:46 209716 +@@ -387,7 +387,34 @@ + && (gimple_code (stmt) != GIMPLE_CALL + || gimple_call_lhs (stmt) == NULL_TREE + || TREE_CODE (gimple_call_lhs (stmt)) != SSA_NAME)) +- continue; ++ { ++ /* STMT might still have DEFS and we need to invalidate any known ++ equivalences for them. ++ ++ Consider if STMT is a GIMPLE_ASM with one or more outputs that ++ feeds a conditional inside a loop. We might derive an equivalence ++ due to the conditional. */ ++ tree op; ++ ssa_op_iter iter; ++ ++ if (backedge_seen) ++ FOR_EACH_SSA_TREE_OPERAND (op, stmt, iter, SSA_OP_DEF) ++ { ++ /* This call only invalidates equivalences created by ++ PHI nodes. This is by design to keep the cost of ++ of invalidation reasonable. */ ++ invalidate_equivalences (op, stack, src_map, dst_map); ++ ++ /* However, conditionals can imply values for real ++ operands as well. And those won't be recorded in the ++ maps. In fact, those equivalences may be recorded totally ++ outside the threading code. We can just create a new ++ temporary NULL equivalence here. */ ++ record_temporary_equivalence (op, NULL_TREE, stack); ++ } ++ ++ continue; ++ } + + /* The result of __builtin_object_size depends on all the arguments + of a phi node. Temporarily using only one edge produces invalid diff --git a/srcpkgs/gcc/template b/srcpkgs/gcc/template index ebfe48e2471..f3760e855c7 100644 --- a/srcpkgs/gcc/template +++ b/srcpkgs/gcc/template @@ -2,7 +2,7 @@ pkgname=gcc _majorver=4.9 version=${_majorver}.0 -revision=5 +revision=6 short_desc="The GNU C Compiler" maintainer="Juan RP " homepage="http://gcc.gnu.org" @@ -11,14 +11,18 @@ distfiles="http://ftp.gnu.org/pub/gnu/gcc/gcc-$version/gcc-$version.tar.bz2" checksum=b9b047a97bade9c1c89970bc8e211ff57b7b8998a1730a80a653d329f8ed1257 lib32disabled=yes -hostmakedepends="perl flex" -makedepends="zlib-devel libmpc-devel>=1.0.1_2 ppl-devel>=1.0 cloog-devel isl-devel" +bootstrap=yes + +if [ "$CHROOT_READY" ]; then + hostmakedepends="perl flex" +fi +makedepends="zlib-devel libmpc-devel>=1.0.1_2 cloog-devel>=0.18" depends="binutils" # mudflap is gone in 4.9 -replaces="libmudflap>=0 libmudflap-devel>=0" +replaces="libmudflap>=0 libmudflap-devel>=0 chroot-gcc>=0" -if [ -z "$CROSS_BUILD" ]; then +if [ "$CHROOT_READY" -a -z "$CROSS_BUILD" ]; then # Required by gcj hostmakedepends+=" zip unzip" fi @@ -63,19 +67,32 @@ do_configure() { _args+=" --enable-java-gc=boehm --enable-fast-character" fi - ./configure --prefix=/usr --mandir=/usr/share/man \ + if [ -z "$CHROOT_READY" ]; then + export LD_LIBRARY_PATH="${XBPS_MASTERDIR}/usr/lib" + _args+=" --with-gmp=${XBPS_MASTERDIR}/usr" + _args+=" --with-mpfr=${XBPS_MASTERDIR}/usr" + _args+=" --with-isl=${XBPS_MASTERDIR}/usr" + _args+=" --with-mpc=${XBPS_MASTERDIR}/usr" + _args+=" --with-cloog=${XBPS_MASTERDIR}/usr" + _langs="c,c++,lto" + fi + + CONFIG_SHELL=/bin/bash \ + ./configure --prefix=/usr --mandir=/usr/share/man \ --infodir=/usr/share/info --libexecdir=/usr/lib \ - --enable-clocale=gnu --disable-bootstrap --libdir=/usr/lib \ + --enable-clocale=gnu --libdir=/usr/lib \ --enable-threads=posix --enable-__cxa_atexit --disable-multilib \ - --disable-rpath --with-system-zlib --enable-shared --enable-lto \ + --with-system-zlib --enable-shared --enable-lto \ --enable-linker-build-id --enable-gnu-unique-object \ --enable-checking=release --disable-libstdcxx-pch \ - --with-ppl --enable-cloog-backend=isl --enable-libstdcxx-time \ - --enable-tls --with-linker-hash-style=gnu \ + --enable-cloog-backend=isl --with-linker-hash-style=gnu \ --enable-languages=${_langs} ${_args} } do_build() { + if [ -z "$CHROOT_READY" ]; then + export LD_LIBRARY_PATH="${XBPS_MASTERDIR}/usr/lib" + fi make ${makejobs} } @@ -143,8 +160,8 @@ do_install() { fi } -# Disabled packages in cross builds. -if [ -z "$CROSS_BUILD" ]; then +# Disabled packages in bootstrap/cross builds. +if [ "$CHROOT_READY" -a -z "$CROSS_BUILD" ]; then gcc-gcj_package() { lib32disabled=yes @@ -224,25 +241,6 @@ gcc-objc_package() { } } -libcilkrts-devel_package() { - depends="libcilkrts>=${_majorver}" - short_desc+=" - Intel(R) Cilk(TM) Plus runtime library - development files" - pkg_install() { - vmove usr/lib/gcc/${_triplet}/${_majorver}/include/cilk - vmove "usr/lib/gcc/${_triplet}/${_majorver}/plugin/include/cilk*" - vmove usr/lib/libcilkrts.so - vmove usr/lib/libcilkrts.a - vmove usr/lib/libcilkrts.spec - } -} - -libcilkrts_package() { - short_desc+=" - Intel(R) Cilk(TM) Plus runtime library" - pkg_install() { - vmove usr/lib/libcilkrts.so.* - } -} - libgcj-devel_package() { short_desc+=" - Java library - development files" pkg_install() { @@ -325,22 +323,26 @@ libobjc_package() { } } -libquadmath-devel_package() { - depends="libquadmath>=${_majorver}" - short_desc+=" - quadmath library - development files" +fi # !CHROOT_READY || !CROSS_BUILD + +if [ "$XBPS_TARGET_MACHINE" = "i686" -o "$XBPS_TARGET_MACHINE" = "x86_64" ]; then + +libcilkrts-devel_package() { + depends="libcilkrts>=${_majorver}" + short_desc+=" - Intel(R) Cilk(TM) Plus runtime library - development files" pkg_install() { - vmove "usr/lib/gcc/${_triplet}/${_majorver}/include/quadmath*" - vmove "usr/lib/libquadmath*.a" - vmove usr/share/info/libquadmath.info - touch ${PKGDESTDIR}/usr/share/info/dir + vmove usr/lib/gcc/${_triplet}/${_majorver}/include/cilk + vmove "usr/lib/gcc/${_triplet}/${_majorver}/plugin/include/cilk*" + vmove usr/lib/libcilkrts.so + vmove usr/lib/libcilkrts.a + vmove usr/lib/libcilkrts.spec } } -libquadmath_package() { - short_desc+=" - quadmath library" +libcilkrts_package() { + short_desc+=" - Intel(R) Cilk(TM) Plus runtime library" pkg_install() { - vmove "usr/lib/libquadmath.so*" - vinstall ${wrksrc}/COPYING.RUNTIME 644 usr/share/licenses/$pkgname RUNTIME.LIBRARY.EXCEPTION + vmove usr/lib/libcilkrts.so.* } } @@ -360,7 +362,7 @@ libvtv_package() { } } -fi # !CROSS_BUILD +fi # !x86 libatomic-devel_package() { depends="libatomic>=${_majorver}" @@ -388,6 +390,7 @@ libgcc_package() { } libgomp-devel_package() { + replaces="chroot-gcc>=0" depends="libgomp>=${_majorver}" short_desc+=" - OpenMP v4.0 library - development files" pkg_install() { @@ -402,7 +405,7 @@ libgomp-devel_package() { libgomp_package() { short_desc+=" - OpenMP v4.0 library" - replaces="gcc>=4.6.3<4.6.3_3" + replaces="gcc>=4.6.3<4.6.3_3 chroot-gcc>=0" pkg_install() { vmove "usr/lib/libgomp*.so.*" vinstall ${wrksrc}/COPYING.RUNTIME 644 usr/share/licenses/$pkgname RUNTIME.LIBRARY.EXCEPTION @@ -430,6 +433,25 @@ libitm_package() { } +libquadmath-devel_package() { + depends="libquadmath>=${_majorver}" + short_desc+=" - quadmath library - development files" + pkg_install() { + vmove "usr/lib/gcc/${_triplet}/${_majorver}/include/quadmath*" + vmove "usr/lib/libquadmath*.a" + vmove usr/share/info/libquadmath.info + touch ${PKGDESTDIR}/usr/share/info/dir + } +} + +libquadmath_package() { + short_desc+=" - quadmath library" + pkg_install() { + vmove "usr/lib/libquadmath.so*" + vinstall ${wrksrc}/COPYING.RUNTIME 644 usr/share/licenses/$pkgname RUNTIME.LIBRARY.EXCEPTION + } +} + libsanitizer-devel_package() { depends="libsanitizer>=${_majorver}" short_desc+=" - Sanitizer libraries - development files" @@ -466,6 +488,7 @@ libssp_package() { } libstdc++-devel_package() { + replaces="chroot-gcc>=0" depends="libstdc++>=${_majorver}" short_desc+=" - Standard C++ Library - development files" pkg_install() { @@ -476,6 +499,7 @@ libstdc++-devel_package() { } libstdc++_package() { + replaces="chroot-gcc>=0" short_desc+=" - Standard C++ Library" pkg_install() { vmove "usr/lib/libstdc++.so*" @@ -487,6 +511,7 @@ libstdc++_package() { gcc-c++_package() { lib32disabled=yes + replaces="chroot-gcc>=0" depends="gcc>=${_majorver} libstdc++-devel>=${_majorver}" short_desc+=" - C++ support" pkg_install() {