[gentoo-commits] repo/gentoo:master commit in: eclass/, sys-devel/gcc/
commit: 395166713e5f118988b25b9476e36cddb6fb0fbb Author: Sam James gentoo org> AuthorDate: Mon Dec 2 01:37:49 2024 + Commit: Sam James gentoo org> CommitDate: Mon Dec 2 01:38:36 2024 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=39516671 toolchain.eclass: rename libdiagnostics -> libgdiagnostics This was only added last week so no transition/compatibility stuff here. It was renamed upstream because Debian reported a library called libdiagnostics already existed. Signed-off-by: Sam James gentoo.org> eclass/toolchain.eclass| 8 sys-devel/gcc/metadata.xml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index 114a008b700f..be8bfcddfafd 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -338,7 +338,7 @@ if [[ ${PN} != kgcc64 && ${PN} != gcc-* ]] ; then # it was disabled in 13. tc_version_is_at_least 14.0.0_pre20230423 ${PV} && IUSE+=" rust" TC_FEATURES+=( rust ) tc_version_is_at_least 14.2.1_p20241026 ${PV} && IUSE+=" time64" - tc_version_is_at_least 15.0.0_pre20241124 ${PV} && IUSE+=" libdiagnostics" + tc_version_is_at_least 15.0.0_pre20241124 ${PV} && IUSE+=" libgdiagnostics" fi if tc_version_is_at_least 10; then @@ -1836,8 +1836,8 @@ toolchain_src_configure() { gcc_shell="${BROOT}"/bin/sh fi - if is_jit || _tc_use_if_iuse libdiagnostics ; then - einfo "Configuring shared gcc for JIT/libdiagnostics" + if is_jit || _tc_use_if_iuse libgdiagnostics ; then + einfo "Configuring shared gcc for JIT/libgdiagnostics" local confgcc_jit=( "${confgcc[@]}" @@ -1874,7 +1874,7 @@ toolchain_src_configure() { ) if tc_version_is_at_least 15.0.0_pre20241124 ${PV} ; then - confgcc_jit+=( $(use_enable libdiagnostics) ) + confgcc_jit+=( $(use_enable libgdiagnostics) ) fi if tc_version_is_at_least 13.1 ; then diff --git a/sys-devel/gcc/metadata.xml b/sys-devel/gcc/metadata.xml index eeb3aa4d7aa0..9b51b891ae5e 100644 --- a/sys-devel/gcc/metadata.xml +++ b/sys-devel/gcc/metadata.xml @@ -77,7 +77,7 @@ Add support for the framework for loop optimizations based on a polyhedral intermediate representation Use accelerated 128-bit IEEE long double ABI (ppc64le only) Enable libgccjit so other applications can embed gcc for Just-In-Time compilation. - Provide libdiagnostics (https://gcc.gnu.org/wiki/libdiagnostics). This also installs the 'sarif-replay' tool. + Provide libgdiagnostics (https://gcc.gnu.org/wiki/libgdiagnostics). This also installs the 'sarif-replay' tool. Build SSP support into a dedicated library rather than use the code in the C library (DO NOT ENABLE THIS IF YOU DON'T KNOW WHAT IT DOES) Build using Link Time Optimizations (LTO).
[gentoo-commits] repo/gentoo:master commit in: eclass/, sys-devel/gcc/
commit: 70f21b8bd7fd130067ab5d4798371ae0ef7c6ea6 Author: Sam James gentoo org> AuthorDate: Tue Apr 18 09:45:34 2023 + Commit: Sam James gentoo org> CommitDate: Tue Apr 18 09:46:00 2023 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=70f21b8b toolchain.eclass: wire up modula-2 frontend support for GCC 13; disable Rust for 13 - Wire up modula-2 frontend support for GCC 13 as USE=modula2 - Drop Rust for GCC 13, upstream are going to make it fatal for configure for 13.1, but may revisit for 13.2 (not sure how likely that is, though, it depends on how much ends up backported). Rust will be available for GCC 14 though. We will revisit if changes occur, of course. Signed-off-by: Sam James gentoo.org> eclass/toolchain.eclass| 9 - sys-devel/gcc/metadata.xml | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index 66cf8e88f9b2..ba83cad72cb2 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -280,7 +280,8 @@ if [[ ${PN} != kgcc64 && ${PN} != gcc-* ]] ; then tc_version_is_at_least 12 && IUSE+=" ieee-long-double" tc_version_is_at_least 12.2.1_p20221203 ${PV} && IUSE+=" default-znow" tc_version_is_at_least 12.2.1_p20221203 ${PV} && IUSE+=" default-stack-clash-protection" - tc_version_is_at_least 13.0.0_pre20221211 ${PV} && IUSE+=" rust" + tc_version_is_at_least 13.0.0_pre20221218 ${PV} && IUSE+=" modula2" + tc_version_is_at_least 14.0.0_pre20230423 ${PV} && IUSE+=" rust" fi if tc_version_is_at_least 10; then @@ -1045,6 +1046,7 @@ toolchain_src_configure() { is_f77 && GCC_LANG+=",f77" is_f95 && GCC_LANG+=",f95" is_ada && GCC_LANG+=",ada" + is_modula2 && GCC_LANG+=",m2" is_rust && GCC_LANG+=",rust" confgcc+=( --enable-languages=${GCC_LANG} ) @@ -2744,6 +2746,11 @@ is_objcxx() { _tc_use_if_iuse cxx && _tc_use_if_iuse objc++ } +is_modula2() { + gcc-lang-supported m2 || return 1 + _tc_use_if_iuse cxx && _tc_use_if_iuse modula2 +} + is_rust() { gcc-lang-supported rust || return 1 _tc_use_if_iuse rust diff --git a/sys-devel/gcc/metadata.xml b/sys-devel/gcc/metadata.xml index da28d6809a07..a0aff53697da 100644 --- a/sys-devel/gcc/metadata.xml +++ b/sys-devel/gcc/metadata.xml @@ -74,6 +74,7 @@ other programs with LTO. This USE flag is for whether GCC itself is built and optimized with LTO. + Build the GCC Modula-2 language frontend. Enable support for Intel Memory Protection Extensions (MPX) Enable support for Native POSIX Threads Library, the new threading module (requires linux-2.6 or better usually) Build support for the Objective C code language
[gentoo-commits] repo/gentoo:master commit in: eclass/, sys-devel/gcc/
commit: bc0ab18a5714c4867f7cd42631b44f541d9f4aa1 Author: Georgy Yakovlev gentoo org> AuthorDate: Wed Nov 30 18:23:39 2022 + Commit: Georgy Yakovlev gentoo org> CommitDate: Sun Dec 4 22:20:45 2022 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bc0ab18a eclass/toolchain.eclass: add USE=ieee-long-double for sys-devel/gcc Bug: https://bugs.gentoo.org/882815 Signed-off-by: Georgy Yakovlev gentoo.org> eclass/toolchain.eclass| 8 sys-devel/gcc/metadata.xml | 1 + 2 files changed, 9 insertions(+) diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index f3989ad8b6e6..3841379f94ca 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -277,6 +277,7 @@ if [[ ${PN} != kgcc64 && ${PN} != gcc-* ]] ; then tc_version_is_at_least 10 && IUSE+=" zstd" TC_FEATURES+=( zstd ) tc_version_is_at_least 11 && IUSE+=" valgrind" TC_FEATURES+=( valgrind ) tc_version_is_at_least 11 && IUSE+=" custom-cflags" + tc_version_is_at_least 12 && IUSE+=" ieee-long-double" tc_version_is_at_least 12.99 && IUSE+=" default-znow" tc_version_is_at_least 12.99 && IUSE+=" default-stack-clash-protection" fi @@ -1326,6 +1327,13 @@ toolchain_src_configure() { # - bug #704784 # - https://gcc.gnu.org/PR93157 [[ ${CTARGET} == powerpc64-*-musl ]] && confgcc+=( --with-abi=elfv2 ) + + if in_iuse ieee-long-double; then + # musl requires 64-bit long double, not IBM double-double or IEEE quad. + if [[ ${CTARGET} == powerpc64le-*-gnu ]]; then + use ieee-long-double && confgcc+=( --with-long-double-format=ieee ) + fi + fi ;; riscv) # Add --with-abi flags to set default ABI diff --git a/sys-devel/gcc/metadata.xml b/sys-devel/gcc/metadata.xml index 7277b7cace85..8c2257393b78 100644 --- a/sys-devel/gcc/metadata.xml +++ b/sys-devel/gcc/metadata.xml @@ -14,6 +14,7 @@ Enable fixed-point arithmetic support for MIPS targets in gcc (Warning: significantly increases compile time!) Build the GCC Go language frontend. Add support for the framework for loop optimizations based on a polyhedral intermediate representation + Use accelerated 128-bit IEEE long double ABI (ppc64le only) Enable libgccjit so other applications can embed gcc for Just-In-Time compilation. Build SSP support into a dedicated library rather than use the code in the C library (DO NOT ENABLE THIS IF YOU DON'T KNOW WHAT IT DOES) Build using Link Time Optimizations (LTO)
[gentoo-commits] repo/gentoo:master commit in: eclass/, sys-devel/gcc/
commit: 4c40c60b01e775ec9a5807615d28a932063d Author: Sam James gentoo org> AuthorDate: Thu Jun 2 08:08:12 2022 + Commit: Sam James gentoo org> CommitDate: Thu Jun 2 08:09:40 2022 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c40c60b toolchain.eclass: introduce TOOLCHAIN_PATCH_DEV The PMS-legality of trying every entry in SRC_URI is questionable, so let's follow the model we use in some other places like the binutils + glibc ebuilds, and just add a variable for the developer hosting the patchset for an ebuild. We use an array in toolchain.eclass because it's easier. We also fall back to the old behaviour if TOOLCHAIN_PATCH_DEV is not set. Signed-off-by: Sam James gentoo.org> eclass/toolchain.eclass | 34 +--- sys-devel/gcc/gcc-10.3.0-r2.ebuild | 3 ++- sys-devel/gcc/gcc-10.3.1_p20211126.ebuild| 1 + sys-devel/gcc/gcc-10.3.1_p20220526.ebuild| 1 + sys-devel/gcc/gcc-10.4..ebuild | 1 + sys-devel/gcc/gcc-11.2.0.ebuild | 3 ++- sys-devel/gcc/gcc-11.2.1_p20220115.ebuild| 1 + sys-devel/gcc/gcc-11.3.0.ebuild | 1 + sys-devel/gcc/gcc-11.3.1_p20220527.ebuild| 1 + sys-devel/gcc/gcc-11.4..ebuild | 1 + sys-devel/gcc/gcc-12.1.0.ebuild | 1 + sys-devel/gcc/gcc-12.1.1_p20220528-r1.ebuild | 1 + sys-devel/gcc/gcc-12.1.1_p20220528.ebuild| 1 + sys-devel/gcc/gcc-12.2..ebuild | 1 + sys-devel/gcc/gcc-13.0.0_pre20220529.ebuild | 1 + sys-devel/gcc/gcc-13.0..ebuild | 1 + sys-devel/gcc/gcc-8.5.0-r1.ebuild| 3 ++- sys-devel/gcc/gcc-9.4.0.ebuild | 3 ++- sys-devel/gcc/gcc-9.5.0.ebuild | 1 + 19 files changed, 53 insertions(+), 7 deletions(-) diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index 4db0acd592a5..d91544797fe8 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -90,6 +90,11 @@ tc_version_is_between() { # for 13.0, we don't want to create new patchsets for every single 13.0 snapshot, # so just grab patches from git each time if this variable is set). +# @ECLASS_VARIABLE: TOOLCHAIN_PATCH_DEV +# @DEFAULT_UNSET +# @DESCRIPTION: +# Indicate the developer who hosts the patchset for an ebuild. + # @ECLASS_VARIABLE: GCC_PV # @INTERNAL # @DESCRIPTION: @@ -286,6 +291,9 @@ DEPEND="${RDEPEND}" if tc_has_feature gcj ; then DEPEND+=" gcj? ( + app-arch/zip + app-arch/unzip + >=media-libs/libart_lgpl-2.1 awt? ( x11-base/xorg-proto x11-libs/libXt @@ -295,9 +303,6 @@ if tc_has_feature gcj ; then x11-libs/pango virtual/pkgconfig ) - >=media-libs/libart_lgpl-2.1 - app-arch/zip - app-arch/unzip ) " fi @@ -359,6 +364,29 @@ if [[ ${TOOLCHAIN_SET_S} == yes ]] ; then fi gentoo_urls() { + # slyfox's distfiles are mirrored to sam's devspace + declare -A devspace_urls=( + [soap]=HTTP~soap/distfiles/URI + [sam]=HTTP~sam/distfiles/sys-devel/gcc/URI + [slyfox]=HTTP~sam/distfiles/URI + [tamiko]=HTTP~tamiko/distfiles/URI + [zorry]=HTTP~zorry/patches/gcc/URI + [vapier]=HTTP~vapier/dist/URI + [blueness]=HTTP~blueness/dist/URI + ) + + # Newer ebuilds should set TOOLCHAIN_PATCH_DEV and we'll just + # return the full URL from the array. + local devspace_url=${devspace_urls[${TOOLCHAIN_PATCH_DEV}]} + if [[ -n ${TOOLCHAIN_PATCH_DEV} && -n ${devspace_url} ]] ; then + local devspace_url_exp=${devspace_url//HTTP/https:\/\/dev.gentoo.org\/} + devspace_url_exp=${devspace_url_exp//URI/$1} + echo ${devspace_url_exp} + return + fi + + # But we keep the old fallback list for compatibility with + # older ebuilds (overlays etc). local devspace=" HTTP~soap/distfiles/URI HTTP~sam/distfiles/URI diff --git a/sys-devel/gcc/gcc-10.3.0-r2.ebuild b/sys-devel/gcc/gcc-10.3.0-r2.ebuild index 0fc4ea78dc7a..d62162f1a68d 100644 --- a/sys-devel/gcc/gcc-10.3.0-r2.ebuild +++ b/sys-devel/gcc/gcc-10.3.0-r2.ebuild @@ -1,8 +1,9 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI="7" +TOOLCHAIN_PATCH_DEV="slyfox" PATCH_VER="3" MUSL_VER="1" diff --git a/sys-devel/gcc/gcc-10.3.1_p20211126.ebuild b/sys-devel/gcc/gcc-10.3.1_p20211126.ebuild index 9cd4a9d0c988..a41f76a5ad3c 100644 --- a/sys-devel/gcc/gcc-10.3.1_p20211126.ebuild +++ b/sys-devel/gcc/gcc-
[gentoo-commits] repo/gentoo:master commit in: eclass/, sys-devel/gcc/
commit: d0da2d0ede93b9d4a2f97725f47d7c9bf3d9eaf2 Author: Sam James gentoo org> AuthorDate: Thu Jun 2 06:51:44 2022 + Commit: Sam James gentoo org> CommitDate: Thu Jun 2 07:15:41 2022 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d0da2d0e toolchain.eclass: fetch patches from git for ebuilds Saves us spinning a new patchset all the time, especially for e.g. 13 which won't have a release for a long time. Suggested-by: WANG Xuerui gentoo.org> Signed-off-by: Sam James gentoo.org> eclass/toolchain.eclass| 23 --- sys-devel/gcc/gcc-12.2..ebuild | 2 -- sys-devel/gcc/gcc-13.0..ebuild | 6 ++ 3 files changed, 22 insertions(+), 9 deletions(-) diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index 33306d3d92b1..90e596f94561 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -26,7 +26,7 @@ tc_is_live() { } if tc_is_live ; then - EGIT_REPO_URI="https://gcc.gnu.org/git/gcc.git"; + EGIT_REPO_URI="https://gcc.gnu.org/git/gcc.git https://github.com/gcc-mirror/gcc"; # Naming style: # gcc-10.1.0_pre -> gcc-10-branch # Note that the micro version is required or lots of stuff will break. @@ -505,6 +505,23 @@ toolchain_pkg_setup() { toolchain_src_unpack() { if tc_is_live ; then git-r3_src_unpack + + if [[ -z ${PATCH_VER} ]] && ! use vanilla ; then + local gcc_patches_repo="https://anongit.gentoo.org/git/proj/gcc-patches.git https://github.com/gentoo/gcc-patches"; + # If we weren't given a patchset number, pull it from git too. + einfo "Fetching patchset from git as PATCH_VER is unset" + EGIT_REPO_URI=${gcc_patches_repo} EGIT_BRANCH="master" \ + EGIT_CHECKOUT_DIR="${WORKDIR}"/patch.tmp \ + git-r3_src_unpack + + mkdir "${WORKDIR}"/patch || die + mv "${WORKDIR}"/patch.tmp/${PATCH_GCC_VER}/gentoo/* "${WORKDIR}"/patch || die + + if [[ -n ${MUSL_VER} || -d "${WORKDIR}"/musl ]] && [[ ${CTARGET} == *musl* ]] ; then + mkdir "${WORKDIR}"/musl || die + mv "${WORKDIR}"/patch.tmp/${PATCH_GCC_VER}/musl/* "${WORKDIR}"/musl || die + fi + fi fi default_src_unpack @@ -596,13 +613,13 @@ toolchain_src_prepare() { do_gcc_gentoo_patches() { if ! use vanilla ; then - if [[ -n ${PATCH_VER} ]] ; then + if [[ -n ${PATCH_VER} || -d "${WORKDIR}"/patch ]] ; then einfo "Applying Gentoo patches ..." eapply "${WORKDIR}"/patch/*.patch BRANDING_GCC_PKGVERSION="${BRANDING_GCC_PKGVERSION} p${PATCH_VER}" fi - if [[ -n ${MUSL_VER} ]] && [[ ${CTARGET} == *musl* ]] ; then + if [[ -n ${MUSL_VER} || -d "${WORKDIR}"/musl ]] && [[ ${CTARGET} == *musl* ]] ; then if [[ ${CATEGORY} == cross-* ]] ; then # We don't want to apply some patches when cross-compiling. if [[ -d "${WORKDIR}"/musl/nocross ]] ; then diff --git a/sys-devel/gcc/gcc-12.2..ebuild b/sys-devel/gcc/gcc-12.2..ebuild index e3d8d3c19867..14cde425d874 100644 --- a/sys-devel/gcc/gcc-12.2..ebuild +++ b/sys-devel/gcc/gcc-12.2..ebuild @@ -3,9 +3,7 @@ EAPI=8 -PATCH_VER="7" PATCH_GCC_VER="12.1.0" -MUSL_VER="4" MUSL_GCC_VER="12.1.0" if [[ $(ver_cut 3) == ]] ; then diff --git a/sys-devel/gcc/gcc-13.0..ebuild b/sys-devel/gcc/gcc-13.0..ebuild index a9ec2dbc272b..fa2f56b460d6 100644 --- a/sys-devel/gcc/gcc-13.0..ebuild +++ b/sys-devel/gcc/gcc-13.0..ebuild @@ -3,10 +3,8 @@ EAPI=8 -PATCH_VER="5" -PATCH_GCC_VER="12.0.0" -MUSL_VER="4" -MUSL_GCC_VER="12.0.0" +PATCH_GCC_VER="13.1.0" +MUSL_GCC_VER="13.1.0" if [[ $(ver_cut 3) == ]] ; then MY_PV_2=$(ver_cut 2)
[gentoo-commits] repo/gentoo:master commit in: eclass/, sys-devel/gcc/files/, dev-lang/gnat-gpl/files/
commit: eaa3057f4602c72ef847775109663cd03578d0f9 Author: Sergei Trofimovich gentoo org> AuthorDate: Wed Aug 19 08:26:15 2020 + Commit: Sergei Trofimovich gentoo org> CommitDate: Wed Aug 19 08:26:15 2020 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eaa3057f toolchain.eclass: stop installing /usr/bin/c89 and /usr/bin/c99 Ownership of /usr/bin/c89 and /usr/bin/c99 was switched to sys-devel/gcc-config-2.3.1. Closes: https://bugs.gentoo.org/728722 Signed-off-by: Sergei Trofimovich gentoo.org> dev-lang/gnat-gpl/files/c89 | 20 dev-lang/gnat-gpl/files/c99 | 21 - eclass/toolchain.eclass | 15 --- sys-devel/gcc/files/c89 | 20 sys-devel/gcc/files/c99 | 21 - 5 files changed, 97 deletions(-) diff --git a/dev-lang/gnat-gpl/files/c89 b/dev-lang/gnat-gpl/files/c89 deleted file mode 100644 index cee0325f50f..000 --- a/dev-lang/gnat-gpl/files/c89 +++ /dev/null @@ -1,20 +0,0 @@ -#! /bin/sh - -# Call the appropriate C compiler with options to accept ANSI/ISO C -# The following options are the same (as of gcc-2.95): -# -ansi -# -std=c89 -# -std=iso9899:1990 - -for i; do -case "$i" in - -ansi|-std=c89|-std=iso9899:1990) - ;; - -std=*) - echo >&2 "`basename $0` called with non ANSI/ISO C90 option $i" - exit 1 - ;; -esac -done - -exec gcc -std=c89 -pedantic -U_FORTIFY_SOURCE "$@" diff --git a/dev-lang/gnat-gpl/files/c99 b/dev-lang/gnat-gpl/files/c99 deleted file mode 100644 index c9542095e38..000 --- a/dev-lang/gnat-gpl/files/c99 +++ /dev/null @@ -1,21 +0,0 @@ -#! /bin/sh - -# Call the appropriate C compiler with options to accept ANSI/ISO C -# The following options are the same (as of gcc-3.3): -# -std=c99 -# -std=c9x -# -std=iso9899:1999 -# -std=iso9899:199x - -for i; do -case "$i" in - -std=c9[9x]|-std=iso9899:199[9x]) - ;; - -ansi|-std=*) - echo >&2 "`basename $0` called with non ANSI/ISO C99 option $i" - exit 1 - ;; -esac -done - -exec gcc -std=c99 -pedantic -U_FORTIFY_SOURCE ${1+"$@"} diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index 7a4364af4e6..db02ee6be50 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -1785,11 +1785,6 @@ toolchain_src_install() { # prune empty dirs left behind find "${ED}" -depth -type d -delete 2>/dev/null - if ! is_crosscompile && [[ ${PN} != "kgcc64" ]] ; then - exeinto "${DATAPATH#${EPREFIX}}" - doexe "${FILESDIR}"/c{89,99} || die - fi - # libstdc++.la: Delete as it doesn't add anything useful: g++ itself # handles linkage correctly in the dynamic & static case. It also just # causes us pain: any C++ progs/libs linking with libtool will gain a @@ -2096,11 +2091,6 @@ toolchain_pkg_postinst() { rm -f "${EROOT%/}"/sbin/fix_libtool_files.sh rm -f "${EROOT%/}"/usr/sbin/fix_libtool_files.sh rm -f "${EROOT%/}"/usr/share/gcc-data/fixlafiles.awk - - mkdir -p "${EROOT%/}"/usr/bin - # Since these aren't critical files and portage sucks with - # handling of binpkgs, don't require these to be found - cp "${ROOT%/}${DATAPATH}"/c{89,99} "${EROOT%/}"/usr/bin/ 2>/dev/null fi } @@ -2110,11 +2100,6 @@ toolchain_pkg_postrm() { eselect compiler-shadow clean all fi - # to make our lives easier (and saner), we do the fix_libtool stuff here. - # rather than checking SLOT's and trying in upgrade paths, we just see if - # the common libstdc++.la exists in the ${LIBPATH} of the gcc that we are - # unmerging. if it does, that means this was a simple re-emerge. - # clean up the cruft left behind by cross-compilers if is_crosscompile ; then if [[ -z $(ls "${EROOT%/}"/etc/env.d/gcc/${CTARGET}* 2>/dev/null) ]] ; then diff --git a/sys-devel/gcc/files/c89 b/sys-devel/gcc/files/c89 deleted file mode 100644 index cee0325f50f..000 --- a/sys-devel/gcc/files/c89 +++ /dev/null @@ -1,20 +0,0 @@ -#! /bin/sh - -# Call the appropriate C compiler with options to accept ANSI/ISO C -# The following options are the same (as of gcc-2.95): -# -ansi -# -std=c89 -# -std=iso9899:1990 - -for i; do -case "$i" in - -ansi|-std=c89|-std=iso9899:1990) - ;; - -std=*) - echo >&2 "`basename $0` called with non ANSI/ISO C90 option $i" - exit 1 - ;; -esac -done - -exec gcc -std=c89 -pedantic -U_FORTIFY_SOURCE "$@" diff --git a/sys-devel/gcc/files/c99 b/sys-devel/gcc/files/c99 deleted file mode 100644 index c9542095e38..000 --- a/sys-devel/gcc/files/c99 +++ /dev/null @@ -1,21 +0,0 @@ -#! /bin/sh - -# Call the appropriate
[gentoo-commits] repo/gentoo:master commit in: eclass/, sys-devel/gcc/files/awk/, sys-devel/gcc/files/, ...
commit: 92e383747ffc633ff6e85a02bf8cdb856eb1bcdc Author: Sergei Trofimovich gentoo org> AuthorDate: Fri Jun 19 18:15:21 2020 + Commit: Sergei Trofimovich gentoo org> CommitDate: Fri Jun 19 20:52:43 2020 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=92e38374 toolchain.eclass: drop fix_libtool_files.sh fixlafiles.awk can mangle two things in .la fils: 1. patch reference 'from .../libstdc++.la' to '-lstdc++' 2. change ${CHOST} when user switches CHOST and rebuilds the system [1.] is not relevant since gcc-4 in Gentoo where we started deleting libstdc++.la on gcc installation. Nothing should embed libstdc++.la paths anymore. [2.] is a rare one-off step that has a lot more caveats than just .la file patching. Generally .la files are tracked by package manager and should not be changed after they are installed on disk. 'fix_libtool_files.sh' breaks that invariant. On top of that portage's FEATURES=fixlafiles removes nested .la files references. Let's remove 'fix_libtool_files.sh' and 'fixlafiles.awk' completely. If really needed we can reintroduce it as a separate tool. Closes: https://bugs.gentoo.org/722554 Closes: https://bugs.gentoo.org/657330 Signed-off-by: Sergei Trofimovich gentoo.org> .../gnat-gpl/files/awk/fixlafiles.awk-no_gcc_la| 334 - dev-lang/gnat-gpl/files/fix_libtool_files.sh | 66 eclass/toolchain.eclass| 40 +-- sys-devel/gcc/files/awk/fixlafiles.awk | 313 --- sys-devel/gcc/files/awk/fixlafiles.awk-no_gcc_la | 334 - sys-devel/gcc/files/fix_libtool_files.sh | 66 6 files changed, 9 insertions(+), 1144 deletions(-) diff --git a/dev-lang/gnat-gpl/files/awk/fixlafiles.awk-no_gcc_la b/dev-lang/gnat-gpl/files/awk/fixlafiles.awk-no_gcc_la deleted file mode 100644 index 066c8d21681..000 --- a/dev-lang/gnat-gpl/files/awk/fixlafiles.awk-no_gcc_la +++ /dev/null @@ -1,334 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# -# Helper functions -# -function printn(string) { - printf("%s", string) -} -function einfo(string) { - printf(" \033[32;01m*\033[0m %s\n", string) -} -function einfon(string) { - printf(" \033[32;01m*\033[0m %s", string) -} -function ewarn(string) { - printf(" \033[33;01m*\033[0m %s\n", string) -} -function ewarnn(string) { - printf(" \033[33;01m*\033[0m %s", string) -} -function eerror(string) { - printf(" \033[31;01m*\033[0m %s\n", string) -} - -# -# assert(condition, errmsg) -# assert that a condition is true. Otherwise exit. -# -function assert(condition, string) { - if (! condition) { - printf("%s:%d: assertion failed: %s\n", - FILENAME, FNR, string) > "/dev/stderr" - _assert_exit = 1 - exit 1 - } -} - -# -# system(command, return) -# wrapper that normalizes return codes ... -# -function dosystem(command, ret) { - ret = 0 - ret = system(command) - if (ret == 0) - return 1 - else - return 0 -} - -# -# parse_ld_conf(config_file) -# -function parse_ld_conf(conf,pipe, ldsoconf_data, CHILD, y) { - pipe = "cd /etc; cat " conf " | sort 2>/dev/null" - while(((pipe) | getline ldsoconf_data) > 0) { - if (ldsoconf_data ~ /^[[:space:]]*#/) - continue - if (ldsoconf_data == "") - continue - - # Handle the "include" keyword - if (ldsoconf_data ~ /^include /) { - sub(/^include /, "", ldsoconf_data) - parse_ld_conf(ldsoconf_data) - continue - } - - # Remove any trailing comments - sub(/#.*$/, "", ldsoconf_data) - # Remove any trailing spaces - sub(/[[:space:]]+$/, "", ldsoconf_data) - # Eat duplicate slashes - sub(/\/\//, "/", ldsoconf_data) - # Prune trailing / - sub(/\/$/, "", ldsoconf_data) - - # - # Drop the directory if its a child directory of - # one that was already added ... - # For example, if we have: - # /usr/lib /usr/libexec /usr/lib/mozilla /usr/lib/nss - # We really just want to save /usr/lib /usr/libexec - # - CHILD = 0 - for (y in DIRLIST) { - if (ldsoconf_data ~ "^" DIRLIST[y] "(/|$)") { - CHILD = 1 - break - } - } - if (CHILD) continue - - DIRLIST[++LIBCOUNT] = ldsoconf_data - } - close(pipe) -} - -BEGIN { - # - # Get our variables from environment -
[gentoo-commits] repo/gentoo:master commit in: eclass/, sys-devel/gcc/files/
commit: dfcb2b58bf94dc20eed8aa9780fc64df70710b6e Author: Sergei Trofimovich gentoo org> AuthorDate: Sat Oct 19 18:55:57 2019 + Commit: Sergei Trofimovich gentoo org> CommitDate: Sat Oct 19 21:20:32 2019 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dfcb2b58 toolchain.eclass: port to EAPI=7 Signed-off-by: Sergei Trofimovich gentoo.org> eclass/toolchain.eclass | 6 -- sys-devel/gcc/files/gcc-configure-texinfo.patch | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index 32483555b05..6f70d806100 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -2,7 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 # Maintainer: Toolchain Ninjas -# @SUPPORTED_EAPIS: 5 6 +# @SUPPORTED_EAPIS: 5 6 7 DESCRIPTION="The GNU Compiler Collection" HOMEPAGE="https://gcc.gnu.org/"; @@ -27,6 +27,7 @@ FEATURES=${FEATURES/multilib-strict/} case ${EAPI:-0} in 0|1|2|3|4*) die "Need to upgrade to at least EAPI=5" ;; 5*|6) inherit eapi7-ver ;; + 7) ;; *) die "I don't speak EAPI ${EAPI}." ;; esac EXPORT_FUNCTIONS pkg_pretend pkg_setup src_unpack src_prepare src_configure \ @@ -512,6 +513,7 @@ tc_apply_patches() { # Note: even for EAPI=6 we used 'epatch' semantics. To avoid # breaking existing ebuilds use 'eapply' only in EAPI=7 or later. 5*|6) epatch "$@" ;; + 7) eapply "$@" ;; *) die "Update apply_patches() for ${EAPI}." ;; esac } @@ -527,7 +529,7 @@ toolchain_src_prepare() { case ${EAPI:-0} in 5*) epatch_user;; - 6) eapply_user ;; + 6|7) eapply_user ;; *) die "Update toolchain_src_prepare() for ${EAPI}." ;; esac diff --git a/sys-devel/gcc/files/gcc-configure-texinfo.patch b/sys-devel/gcc/files/gcc-configure-texinfo.patch index ddc098ddbd5..99e90998a46 100644 --- a/sys-devel/gcc/files/gcc-configure-texinfo.patch +++ b/sys-devel/gcc/files/gcc-configure-texinfo.patch @@ -4,8 +4,8 @@ that it violates the cheesy version grep. http://bugs.gentoo.org/198182 configure -+++ configure +--- a/configure b/configure @@ -3573,6 +3573,6 @@ : else
[gentoo-commits] repo/gentoo:master commit in: eclass/, sys-devel/gcc/
commit: ee307a9f5d9e77ce1dbb3655d4ba7f12fffaf554 Author: Shane Peelar gmail com> AuthorDate: Wed May 8 18:55:53 2019 + Commit: Sergei Trofimovich gentoo org> CommitDate: Mon May 13 22:38:22 2019 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ee307a9f {sys-devel/gcc,dev-lang/gnat-gpl}: add a USE for building GCC with LTO Bug: https://bugs.gentoo.org/685634 Signed-off-by: Shane Peelar gmail.com> Signed-off-by: Sergei Trofimovich gentoo.org> eclass/toolchain.eclass| 6 ++ sys-devel/gcc/metadata.xml | 1 + 2 files changed, 7 insertions(+) diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index 17850db4304..9df8ecf69be 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -174,6 +174,7 @@ if [[ ${PN} != "kgcc64" && ${PN} != gcc-* ]] ; then tc_version_is_at_least 8.0 && IUSE+=" systemtap" TC_FEATURES+=(systemtap) tc_version_is_at_least 9.0 && IUSE+=" d" + tc_version_is_at_least 9.1 && IUSE+=" lto" fi SLOT="${GCC_CONFIG_VER}" @@ -993,6 +994,11 @@ toolchain_src_configure() { confgcc+=( --enable-libstdcxx-time ) fi + # Build compiler using LTO + if tc_version_is_at_least 9.1 && use_if_iuse lto ; then + confgcc+=( --with-build-config=bootstrap-lto ) + fi + # Support to disable pch when building libstdcxx if tc_version_is_at_least 6.0 && ! use_if_iuse pch ; then confgcc+=( --disable-libstdcxx-pch ) diff --git a/sys-devel/gcc/metadata.xml b/sys-devel/gcc/metadata.xml index d70e7213148..1b47b03d910 100644 --- a/sys-devel/gcc/metadata.xml +++ b/sys-devel/gcc/metadata.xml @@ -21,6 +21,7 @@ This will slow down the compiler a bit as it forces all of the toolchain to be shared libs. Build SSP support into a dedicated library rather than use the code in the C library (DO NOT ENABLE THIS IF YOU DON'T KNOW WHAT IT DOES) +Build using Link Time Optimizations (LTO) Enable support for Intel Memory Protection Extensions (MPX) Add support for mudflap, a pointer use checking library Disable PIE support (NOT FOR GENERAL USE)
[gentoo-commits] repo/gentoo:master commit in: eclass/, sys-devel/gcc/
commit: ee9917f9bef7e0cd837113745cd4d2329e9e9c51 Author: Matthias Maier gentoo org> AuthorDate: Sun May 7 15:18:14 2017 + Commit: Matthias Maier gentoo org> CommitDate: Sun May 7 15:18:29 2017 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ee9917f9 sys-devel/gcc: add 7.1.0 to the tree, bug #617260 Package-Manager: Portage-2.3.5, Repoman-2.3.2 eclass/toolchain.eclass| 3 ++- sys-devel/gcc/Manifest | 2 ++ sys-devel/gcc/gcc-7.1.0.ebuild | 24 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index 890df65612e..acdd4013141 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -233,7 +233,8 @@ S=$( gentoo_urls() { local devspace="HTTP~vapier/dist/URI HTTP~rhill/dist/URI - HTTP~zorry/patches/gcc/URI HTTP~blueness/dist/URI" + HTTP~zorry/patches/gcc/URI HTTP~blueness/dist/URI + HTTP~tamiko/distfiles/URI" devspace=${devspace//HTTP/https:\/\/dev.gentoo.org\/} echo mirror://gentoo/$1 ${devspace//URI/$1} } diff --git a/sys-devel/gcc/Manifest b/sys-devel/gcc/Manifest index 802ab57f887..ec349203129 100644 --- a/sys-devel/gcc/Manifest +++ b/sys-devel/gcc/Manifest @@ -55,4 +55,6 @@ DIST gcc-5.4.0-uclibc-patches-1.0.tar.bz2 3731 SHA256 a3145faa6c81c0753ba754b735 DIST gcc-5.4.0.tar.bz2 95661481 SHA256 608df76dec2d34de6558249d8af4cbee21eceddbcb580d666f7a5a583ca3303a SHA512 2941cc950c8f2409a314df497631f9b0266211aa74746c1839c46e04f1c7c299afe2528d1ef16ea39def408a644ba48f97519ec7a7dd37d260c3e9423514265b WHIRLPOOL ec81c8143e48bc8d9d0bbdc0fa3ca553c805193f53ac46c86127b54565894780dd97281485e396a130567464c753f043458c8e450018c957813f50ff90a40708 DIST gcc-6.3.0-patches-1.0.tar.bz2 7596 SHA256 6c880468ffa4ad2b324fd18c762dbdf10646089c8ab865c228e166f99a0e049c SHA512 8fc96086bd3da3726687ee9d180d3b5d0a7d5814141d44eac8eb01566a783ec780c8fb8f55f75d6e9c9006b2e407e20cdb5835d541b0b66a47dd60642861734c WHIRLPOOL b1bce94d6134db6c9aff4298c6c7af003e39d0411aa40cd027d2c7d6a256971c81fb557e85b25f1107e9a474cb7d772c3bc62a7a4ab7ff7fca5eeae5b2ca0c94 DIST gcc-6.3.0.tar.bz2 99903185 SHA256 f06ae7f3f790fbf0f018f6d40e844451e6bc3b7bc96e128e63b09825c1f8b29f SHA512 234dd9b1bdc9a9c6e352216a7ef4ccadc6c07f156006a59759c5e0e6a69f0abcdc14630eff11e3826dd6ba5933a8faa43043f3d1d62df6bd5ab1e82862f9bf78 WHIRLPOOL e79a2d6ad199396b6efd835c1129d049a367174ea33dd3b6247d72461f117c2dd81e5a66f3dd6427ce500e768d3a4453efd0debcb56966d00c7df79d05d54b7d +DIST gcc-7.1.0-patches-1.0.tar.bz2 7609 SHA256 8213cd597e80c6951ec06273100ce0933c2c138044ccdc752eee9a0887209146 SHA512 92727d2b57a498f6540d3ec9d0764b7698bd70ac4d795f87610eddebf69bd80f81a130e042182ec672964af987e239e0dbab72f619189538240fe75dd7facb10 WHIRLPOOL 713cfc6652b320a2fa083bfb1521762f7b09cd1baf9f9d7c24ac22c90173576ff4b20fc206e490135af95c800d399d528171d9e057311fb3bef5e4eff8722a33 +DIST gcc-7.1.0.tar.bz2 84303533 SHA256 8a8136c235f64c6fef69cac0d73a46a1a09bb250776a050aec8f9fc880bebc17 SHA512 b5d952be9a10f0e0926bb2868877d10544039d6d2f35ba0a08f51231dd622a007650764a03e173194701467547789ad7d2d9cbc10adcdf118d619cdedbd14aec WHIRLPOOL 1dce5f89d4110bacd7f65140a1dee7b1a4898682e2ae8621832bda6f101354d226743acf77974b5e97d861c6eb6c47637138987dfb6ba222ad81b751e80ff6e6 DIST gdc-0.24-src.tar.bz2 1012099 SHA256 cc6a97c76c9e6db31e76ff97014d24b3d43e21f018a3c6218e3fb2a4500fc79a SHA512 9aec7e4b102e602dfb61cd09ea4b4a96af637ceb3d726235261d09ebd35dbd416abcbfe0e46918e48474bd241fe9bb29abc145a65aa834669295aaee4fca0686 WHIRLPOOL 22322b0c3e2d67b3b37bd7fa92a29c593688f934d4ffd62b9cc87eb63a44a4f8bbc9d75cadf11209c73bdc9942c9b4430036629d0eefcd04de9055c502b85f12 diff --git a/sys-devel/gcc/gcc-7.1.0.ebuild b/sys-devel/gcc/gcc-7.1.0.ebuild new file mode 100644 index 000..c20292e99c4 --- /dev/null +++ b/sys-devel/gcc/gcc-7.1.0.ebuild @@ -0,0 +1,24 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" + +PATCH_VER="1.0" +#UCLIBC_VER="1.0" + +inherit toolchain + +KEYWORDS="" + +RDEPEND="" +DEPEND="${RDEPEND} + elibc_glibc? ( >=sys-libs/glibc-2.13 ) + >=${CATEGORY}/binutils-2.20" + +if [[ ${CATEGORY} != cross-* ]] ; then + PDEPEND="${PDEPEND} elibc_glibc? ( >=sys-libs/glibc-2.13 )" +fi + +src_prepare() { + toolchain_src_prepare +}