From d30a8e0729b55b469d1f63ee074655cf21ae84c1 Mon Sep 17 00:00:00 2001 From: Magnus Granberg Date: Tue, 23 Aug 2016 22:24:01 +0200 Subject: Bump gcc 6 to 6.2 --- eclass/toolchain.eclass | 116 ++++++++++++++++++++++++----------------- sys-devel/gcc/Manifest | 6 +-- sys-devel/gcc/gcc-6.2.0.ebuild | 39 ++++++++++++++ 3 files changed, 111 insertions(+), 50 deletions(-) create mode 100644 sys-devel/gcc/gcc-6.2.0.ebuild diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index 247dcee6..130e952e 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -131,7 +131,7 @@ else LICENSE="GPL-2+ LGPL-2.1+ FDL-1.1+" fi -IUSE="multislot regression-test vanilla" +IUSE="regression-test vanilla" IUSE_DEF=( nls nptl ) if [[ ${PN} != "kgcc64" && ${PN} != gcc-* ]] ; then @@ -152,9 +152,9 @@ if [[ ${PN} != "kgcc64" && ${PN} != gcc-* ]] ; then # versions which we dropped. Since graphite was also experimental in # the older versions, we don't want to bother supporting it. #448024 tc_version_is_at_least 4.8 && IUSE+=" graphite" IUSE_DEF+=( sanitize ) - tc_version_is_at_least 4.9 && IUSE+=" cilk" - tc_version_is_at_least 5.0 && IUSE+=" jit pch" - tc_version_is_at_least 6.0 && IUSE+=" pie +ssp" + tc_version_is_at_least 4.9 && IUSE+=" cilk +vtv" + tc_version_is_at_least 5.0 && IUSE+=" jit mpx" + tc_version_is_at_least 6.0 && IUSE+=" pie +ssp +pch" fi IUSE+=" ${IUSE_DEF[*]/#/+}" @@ -627,20 +627,47 @@ do_gcc_PIE_patches() { # configure to build with the hardened GCC specs as the default make_gcc_hard() { - # Gcc >= 6.X we don't need to sed in Makefile - # It have configurations options to turn pie/ssp on as default + local gcc_hard_flags="" + # Gcc >= 6.X we can use configurations options to turn pie/ssp on as default if tc_version_is_at_least 6.0 ; then - if use hardened ; then - # rebrand to make bug reports easier - BRANDING_GCC_PKGVERSION=${BRANDING_GCC_PKGVERSION/Gentoo/Gentoo Hardened} - fi if use pie ; then einfo "Updating gcc to use automatic PIE building ..." fi if use ssp ; then einfo "Updating gcc to use automatic SSP building ..." fi - return 1 + if use hardened ; then + # Will add some optimatizion as default. + gcc_hard_flags+=" -DHARDENED_OPTIMATIZON" + # rebrand to make bug reports easier + BRANDING_GCC_PKGVERSION=${BRANDING_GCC_PKGVERSION/Gentoo/Gentoo Hardened} + fi + else + if use hardened ; then + # rebrand to make bug reports easier + BRANDING_GCC_PKGVERSION=${BRANDING_GCC_PKGVERSION/Gentoo/Gentoo Hardened} + if hardened_gcc_works ; then + einfo "Updating gcc to use automatic PIE + SSP building ..." + gcc_hard_flags+=" -DEFAULT_PIE_SSP" + elif hardened_gcc_works pie ; then + einfo "Updating gcc to use automatic PIE building ..." + ewarn "SSP has not been enabled by default" + gcc_hard_flags+=" -DEFAULT_PIE" + elif hardened_gcc_works ssp ; then + einfo "Updating gcc to use automatic SSP building ..." + ewarn "PIE has not been enabled by default" + gcc_hard_flags+=" -DEFAULT_SSP" + else + # do nothing if hardened isn't supported, but don't die either + ewarn "hardened is not supported for this arch in this gcc version" + return 0 + fi + else + if hardened_gcc_works ssp ; then + einfo "Updating gcc to use automatic SSP building ..." + gcc_hard_flags+=" -DEFAULT_SSP" + fi + fi fi # we want to be able to control the pie patch logic via something other @@ -651,36 +678,8 @@ make_gcc_hard() { # Need to add HARD_CFLAGS to ALL_CXXFLAGS on >= 4.7 if tc_version_is_at_least 4.7 ; then sed -e '/^ALL_CXXFLAGS/iHARD_CFLAGS = ' \ - -e 's|^ALL_CXXFLAGS = |ALL_CXXFLAGS = $(HARD_CFLAGS) |' \ - -i "${S}"/gcc/Makefile.in - fi - - # defaults to enable for all toolchains - local gcc_hard_flags="" - if use hardened ; then - if hardened_gcc_works ; then - einfo "Updating gcc to use automatic PIE + SSP building ..." - gcc_hard_flags+=" -DEFAULT_PIE_SSP" - elif hardened_gcc_works pie ; then - einfo "Updating gcc to use automatic PIE building ..." - ewarn "SSP has not been enabled by default" - gcc_hard_flags+=" -DEFAULT_PIE" - elif hardened_gcc_works ssp ; then - einfo "Updating gcc to use automatic SSP building ..." - ewarn "PIE has not been enabled by default" - gcc_hard_flags+=" -DEFAULT_SSP" - else - # do nothing if hardened isn't supported, but don't die either - ewarn "hardened is not supported for this arch in this gcc version" - return 0 - fi - # rebrand to make bug reports easier - BRANDING_GCC_PKGVERSION=${BRANDING_GCC_PKGVERSION/Gentoo/Gentoo Hardened} - else - if hardened_gcc_works ssp ; then - einfo "Updating gcc to use automatic SSP building ..." - gcc_hard_flags+=" -DEFAULT_SSP" - fi + -e 's|^ALL_CXXFLAGS = |ALL_CXXFLAGS = $(HARD_CFLAGS) |' \ + -i "${S}"/gcc/Makefile.in fi sed -i \ @@ -1187,6 +1186,17 @@ toolchain_src_configure() { confgcc+=( $(use_enable cilk libcilkrts) ) fi + if in_iuse mpx ; then + confgcc+=( $(use_enable mpx libmpx) ) + fi + + if in_iuse vtv ; then + confgcc+=( + $(use_enable vtv vtable-verify) + $(use_enable vtv libvtv) + ) + fi + # newer gcc's come with libquadmath, but only fortran uses # it, so auto punt it when we don't care if tc_version_is_at_least 4.6 && ! is_fortran ; then @@ -1756,13 +1766,29 @@ toolchain_src_install() { if ! is_crosscompile ; then insinto "${DATAPATH}" newins "${GCC_FILESDIR}"/awk/fixlafiles.awk-no_gcc_la fixlafiles.awk || die - find "${D}/${LIBPATH}" -name libstdc++.la -type f -delete - find "${D}/${LIBPATH}" -name 'lib*san.la' -type f -delete #487550 #546700 exeinto "${DATAPATH}" doexe "${GCC_FILESDIR}"/fix_libtool_files.sh || die doexe "${GCC_FILESDIR}"/c{89,99} || die fi + find "${D}/${LIBPATH}" \ + '(' \ + -name libstdc++.la -o \ + -name libstdc++fs.la -o \ + -name libsupc++.la -o \ + -name libcc1.la -o \ + -name libcc1plugin.la -o \ + -name 'libgomp.la' -o \ + -name 'libgomp-plugin-*.la' -o \ + -name libgfortran.la -o \ + -name libgfortranbegin.la -o \ + -name libmpx.la -o \ + -name libmpxwrappers.la -o \ + -name libitm.la -o \ + -name libvtv.la -o \ + -name 'lib*san.la' \ + ')' -type f -delete + # Use gid of 0 because some stupid ports don't have # the group 'root' set to gid 0. Send to /dev/null # for people who are testing as non-root. @@ -2122,10 +2148,6 @@ should_we_gcc_config() { local curr_branch_ver=$(get_version_component_range 1-2 ${curr_config_ver}) - # If we're using multislot, just run gcc-config if we're installing - # to the same profile as the current one. - use multislot && return $([[ ${curr_config_ver} == ${GCC_CONFIG_VER} ]]) - if [[ ${curr_branch_ver} == ${GCC_BRANCH_VER} ]] ; then return 0 else diff --git a/sys-devel/gcc/Manifest b/sys-devel/gcc/Manifest index 9cb5457c..f001a821 100644 --- a/sys-devel/gcc/Manifest +++ b/sys-devel/gcc/Manifest @@ -6,7 +6,7 @@ AUX fix_libtool_files.sh 1528 SHA256 ed1fd90b31c2865fa78e24166f5523dfd8a79baa932 AUX gcc-configure-LANG.patch 2052 SHA256 63de6d2dcfe14f21d147abeb1390405b9220c03f8e968f482d4b4c1cf279c88b SHA512 a694c7ac2f45cc657097ff5b0cf1356ac88a9c06035c9ba15167e9d444844d0d8a478eb1b9b62195dd063774f79697b9148b9cdb6c261640b472c291061b2129 WHIRLPOOL 3cc1ec912fb192ff1058de5b93e49a994ba30d1501a932290dd5b3df1cd783875621cda56edeb41894cd5fa10c04917e693a40a60be8d742ddd7992bf5d8afeb AUX gcc-configure-texinfo.patch 337 SHA256 74b73a7ecec2d88889876b4db480cd173632f49d5396bb8e5b3c93673f9b5b98 SHA512 a15fba8bf2ff02bdeca54d6f186bfa08c1079c6a8ba0a3beef154483ce5c1b8c497e7ffeec32371968f0037e0ff8384609eb0c367d0155a4e5a7eef8aad084d5 WHIRLPOOL 39d008aad06f7621e4e5db15f5e85a59e583b43f8d247029bd4944466bb60a9795bda157d185c45c329294078e282703a243aad5c468d90c77665dd6336870d4 DIST ecj-4.5.jar 1470676 SHA256 98fd128f1d374d9e42fd9d4836bdd249c6d511ebc6c0df17fbc1b9df96c3d781 SHA512 d4e1bf7538ace56e3d69fa91da5bbd16c272923b4de0a9d8dee23ea2b75f9f38c603de72fc4061df49285c450b63f3df211cee5270e9fffc5447445d1a9c9e4e WHIRLPOOL db54206cfd5eba935e707b8d36ebac40f3c4ed3c1f06ede794288cbdd9c7da9d90c0898e8c98b383af276ea4c1b40c861ebd9e1fc1dce712946184321339d3ad -DIST gcc-6.1.0-patches-1.1.tar.bz2 7157 SHA256 9c9e31c7b46c055183cecae34a8b7c58a0ac729c57b66823fdd2af5ef2c53528 SHA512 fc3d596ae6209277974722df9e48a17984737931de60c205eebb3f47dff9fda0ec64ff4b4ee06c848b1c07e1fe465cf30919f3ece88ad1b296bdf3d6b23ecb8f WHIRLPOOL 964046b054823995b9697ba4b0679a7cfce5b3a1cfc898f1b18d423b491f6ae75339f9c929d8411e262bba3f45d999d1f0c09f9cd7b1409bc9e8d535316ba452 -DIST gcc-6.1.0.tar.bz2 99267556 SHA256 09c4c85cabebb971b1de732a0219609f93fc0af5f86f6e437fd8d7f832f1a351 SHA512 eeed3e2018b8c012aabce419e8d718fde701e5c3c179b4486c61ba46e5736eecc8fccdd18b01fcd973a42c6ad3116dbbe2ee247fe3757d622d373f93ebaf8d2e WHIRLPOOL fa11fca6c85a31f7c896f0ded40a9208a8588c2b3fddd2cca51f440c712ff83374528b7d1571f8d98dad96e24cb5b14b6af624ef42aff2a85ae99e8621c9b479 -EBUILD gcc-6.1.0.ebuild 890 SHA256 ca1b7146ee53d9a67150ccf6691942bcddc80b7efeba0c3f36b32140130617d0 SHA512 abb9d8b6bb1b3cda590020c50a60b8ca61678041f36f38101265fae1528fee8d558a2bfca8543b29639575e1ba23cebc2277f4032971ffdac631c0209c2b64c9 WHIRLPOOL fc17a91194571caa574a7d0983c680eedda630ab809642659dbcc7e8af9e07db41f1070d549bb48e61f0101667aceace6a65df3dbdf3cfdb4e1db25c44e28d12 +DIST gcc-6.2.0-patches-1.0.tar.bz2 5712 SHA256 7ada7f5ce163347cb8d6470a793133fcdfdc682b85c089a200d52769f224ab31 SHA512 7d715e210a3dc122dfff82ff34a2d456b9f1c70e21e28b533287eef26b6b7b29453e390f85ae3d5cc3f5eee751c207fde08085cb2021366d2cb3a20e8b0fdd61 WHIRLPOOL a8581cb522a4140883e36a2f5cd9395b9b6891d20795f42e1f829184330d996fa6bbc16eee3ac21a253dcf2f34d038b9c8ed211ec563394455dfa49c4b6a7bc1 +DIST gcc-6.2.0.tar.bz2 99778648 SHA256 9944589fc722d3e66308c0ce5257788ebd7872982a718aa2516123940671b7c5 SHA512 1e8b826a3d44b9d5899309894e20c03abeb352bf3d273b8ad63af814c0ee2911f1a83ce1cd4cdd2d1cb0b3e3c34e9b7ae1b2ab83dfc649ee817ab05247c76198 WHIRLPOOL 8a96e0424c7410d8826319758ed92f1674099cf17d0590bf71328ef2bb9913f9fa8452016c509c48c93f4bf8ed811a24fffa1b6e475b5c1633d167ad844f1dca +EBUILD gcc-6.2.0.ebuild 890 SHA256 755fe3b5c86101eaf9d2e15826ebce0ca11a943908998676d4bc1c7793d13895 SHA512 348a61a6809ba2fcf69cbef18311c6c7e8f44a461e11a293ff570c13b52eeff51df55b9366b426c98328dcadfbb7502917e3b09f1075cd78976025a5f1defb7e WHIRLPOOL 0d6ce067b7155d7b53902f48ea79d96c7a70a402ea8489571d45c4e3cf76640ec3186abbb8f7a16b1bb14893e82eabaa66f1e96b7bb79fdb9d26d1e772f43fb6 MISC metadata.xml 2060 SHA256 d26702ed650c681a31224be69fd3c438b30dfea8dded375bb8e247cc8339002f SHA512 9fd87d445ee42ffc7d779940b509cb256d3b31ef492b1598ce340f5037843c1134781b75d3b4dbc14e6e0c1410a980f5c183232e2f953ef087157def0f1fd43f WHIRLPOOL 06b4d43b1ed66b5b054ff4a4cb3ba18f09e4348ae49cac963915bde0bfa22b43d89c5dadc241a36cdaad40274a595ea12468885ad0683f2f93e58dfa03984eb0 diff --git a/sys-devel/gcc/gcc-6.2.0.ebuild b/sys-devel/gcc/gcc-6.2.0.ebuild new file mode 100644 index 00000000..b425590b --- /dev/null +++ b/sys-devel/gcc/gcc-6.2.0.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +PATCH_VER="1.0" +#UCLIBC_VER="1.0" + +# Hardened gcc 4 stuff +#PIE_VER="0.6.5" +#SPECS_VER="0.2.0" +#SPECS_GCC_VER="4.4.3" +# arch/libc configurations known to be stable with {PIE,SSP}-by-default +#PIE_GLIBC_STABLE="x86 amd64 mips ppc ppc64 arm ia64" +#PIE_UCLIBC_STABLE="x86 arm amd64 mips ppc ppc64" +#SSP_STABLE="amd64 x86 mips ppc ppc64 arm" +# uclibc need tls and nptl support for SSP support +# uclibc need to be >= 0.9.33 +#SSP_UCLIBC_STABLE="x86 amd64 mips ppc ppc64 arm" +#end Hardened stuff + +inherit toolchain + +KEYWORDS="" + +RDEPEND="" +DEPEND="${RDEPEND} + elibc_glibc? ( >=sys-libs/glibc-2.8 ) + >=${CATEGORY}/binutils-2.20" + +if [[ ${CATEGORY} != cross-* ]] ; then + PDEPEND="${PDEPEND} elibc_glibc? ( >=sys-libs/glibc-2.8 )" +fi + +src_prepare() { + + toolchain_src_prepare +} -- cgit v1.2.3