From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id AE1A1138222 for ; Tue, 3 May 2016 08:51:35 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 25CF721C002; Tue, 3 May 2016 08:51:33 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id AEC4121C002 for ; Tue, 3 May 2016 08:51:32 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3C35F34082B for ; Tue, 3 May 2016 08:51:31 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E0CA1331 for ; Tue, 3 May 2016 08:51:27 +0000 (UTC) From: "Anthony G. Basile" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Anthony G. Basile" Message-ID: <1462265520.1b84859faa3792c2f3431945c48b07d25bc055cb.blueness@gentoo> Subject: [gentoo-commits] proj/musl:master commit in: eclass/ X-VCS-Repository: proj/musl X-VCS-Files: eclass/toolchain.eclass X-VCS-Directories: eclass/ X-VCS-Committer: blueness X-VCS-Committer-Name: Anthony G. Basile X-VCS-Revision: 1b84859faa3792c2f3431945c48b07d25bc055cb X-VCS-Branch: master Date: Tue, 3 May 2016 08:51:27 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: daabd813-0eb1-48f7-94d9-ad53a2436afd X-Archives-Hash: 6949a10f5d30e9c8fe6b331df8b0f456 commit: 1b84859faa3792c2f3431945c48b07d25bc055cb Author: Anthony G. Basile gentoo org> AuthorDate: Tue May 3 08:52:00 2016 +0000 Commit: Anthony G. Basile gentoo org> CommitDate: Tue May 3 08:52:00 2016 +0000 URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=1b84859f toolchain.eclass: add gcc 6 support eclass/toolchain.eclass | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index a272810..1192f62 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -153,7 +153,7 @@ if [[ ${PN} != "kgcc64" && ${PN} != gcc-* ]] ; then # 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" + tc_version_is_at_least 5.0 && IUSE+=" jit pch" tc_version_is_at_least 6.0 && IUSE+=" pie +ssp" fi @@ -626,6 +626,23 @@ 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 + 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 + fi + # we want to be able to control the pie patch logic via something other # than ALL_CFLAGS... sed -e '/^ALL_CFLAGS/iHARD_CFLAGS = ' \ @@ -899,6 +916,11 @@ toolchain_src_configure() { confgcc+=( --enable-libstdcxx-time ) fi + # Support to disable pch when building libstdcxx + if tc_version_is_at_least 5.0 && ! use pch ; then + confgcc+=( --disable-libstdcxx-pch ) + fi + # The jit language requires this. is_jit && confgcc+=( --enable-host-shared ) @@ -1915,6 +1937,11 @@ create_gcc_env_entry() { } copy_minispecs_gcc_specs() { + # on gcc 6 we don't need minispecs + if tc_version_is_at_least 6.0 ; then + return 0 + fi + # setup the hardenedno* specs files and the vanilla specs file. if hardened_gcc_works ; then create_gcc_env_entry hardenednopiessp @@ -2263,6 +2290,10 @@ hardened_gcc_is_stable() { } want_minispecs() { + # on gcc 6 we don't need minispecs + if tc_version_is_at_least 6.0 ; then + return 0 + fi if tc_version_is_at_least 4.3.2 && use hardened ; then if ! want_pie ; then ewarn "PIE_VER or SPECS_VER is not defined in the GCC ebuild."