From: Sergei Trofimovich Date: Thu, 6 Feb 2020 19:19:13 +0000 (+0000) Subject: sys-devel/gcc: allow negative insn cost, bug #707958 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=066e26c95928de295cf822034de2d2cd05acf8af;p=gentoo.git sys-devel/gcc: allow negative insn cost, bug #707958 Apply the patch right on stable ebuild to unblock catalyst builds for ia64. Reported-by: Matt Turner Bug: https://bugs.gentoo.org/707958 Package-Manager: Portage-2.3.87, Repoman-2.3.20 Signed-off-by: Sergei Trofimovich --- diff --git a/sys-devel/gcc/files/gcc-9.2.0-neg-insn-cost.patch b/sys-devel/gcc/files/gcc-9.2.0-neg-insn-cost.patch new file mode 100644 index 000000000000..7a6bebdf4905 --- /dev/null +++ b/sys-devel/gcc/files/gcc-9.2.0-neg-insn-cost.patch @@ -0,0 +1,29 @@ +https://bugs.gentoo.org/707958 +https://gcc.gnu.org/PR88879 + +Subject: [PATCH] sel-sched: allow negative insn priority (PR 88879) +From: Alexander Monakov + + PR rtl-optimization/88879 + * sel-sched.c (sel_target_adjust_priority): Remove assert. + +From-SVN: r271039 +--- + gcc/ChangeLog | 5 +++++ + gcc/sel-sched.c | 2 -- + 2 files changed, 5 insertions(+), 2 deletions(-) + +--- a/gcc/sel-sched.c ++++ b/gcc/sel-sched.c +@@ -3331,8 +3331,6 @@ sel_target_adjust_priority (expr_t expr) + else + new_priority = priority; + +- gcc_assert (new_priority >= 0); +- + /* If the priority has changed, adjust EXPR_PRIORITY_ADJ accordingly. */ + EXPR_PRIORITY_ADJ (expr) = new_priority - EXPR_PRIORITY (expr); + +-- +2.25.0 + diff --git a/sys-devel/gcc/gcc-9.2.0-r2.ebuild b/sys-devel/gcc/gcc-9.2.0-r2.ebuild index e2638f44d602..97327a276552 100644 --- a/sys-devel/gcc/gcc-9.2.0-r2.ebuild +++ b/sys-devel/gcc/gcc-9.2.0-r2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI="7" @@ -17,3 +17,8 @@ DEPEND="${RDEPEND} if [[ ${CATEGORY} != cross-* ]] ; then PDEPEND="${PDEPEND} elibc_glibc? ( >=sys-libs/glibc-2.13 )" fi + +src_prepare() { + toolchain_src_prepare + eapply "${FILESDIR}"/${PN}-9.2.0-neg-insn-cost.patch +} diff --git a/sys-devel/gcc/gcc-9.2.0-r3.ebuild b/sys-devel/gcc/gcc-9.2.0-r3.ebuild index 107ecc45981b..398613c13bee 100644 --- a/sys-devel/gcc/gcc-9.2.0-r3.ebuild +++ b/sys-devel/gcc/gcc-9.2.0-r3.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI="7" @@ -14,6 +14,13 @@ DEPEND="${RDEPEND} elibc_glibc? ( >=sys-libs/glibc-2.13 ) >=${CATEGORY}/binutils-2.20" +PATCHES=("${FILESDIR}"/${PN}-9.2.0-neg-insn-cost.patch) + if [[ ${CATEGORY} != cross-* ]] ; then PDEPEND="${PDEPEND} elibc_glibc? ( >=sys-libs/glibc-2.13 )" fi + +src_prepare() { + toolchain_src_prepare + eapply "${FILESDIR}"/${PN}-9.2.0-neg-insn-cost.patch +}