commit:     d582c9ac245214e1e79637dd0ad22d939a70e19b
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Thu Jun  7 12:53:58 2018 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Thu Jun  7 12:53:58 2018 +0000
URL:        https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=d582c9ac

sys-devel/gcc: add patch to fix target on powerpc-darwin

Package-Manager: Portage-2.3.40.1-prefix, Repoman-2.3.9

 sys-devel/gcc/files/gcc-7.3.0-powerpc-darwin.patch | 30 ++++++++++++++++++++++
 sys-devel/gcc/gcc-7.3.0-r3.ebuild                  |  3 +++
 2 files changed, 33 insertions(+)

diff --git a/sys-devel/gcc/files/gcc-7.3.0-powerpc-darwin.patch 
b/sys-devel/gcc/files/gcc-7.3.0-powerpc-darwin.patch
new file mode 100644
index 0000000000..a636187f40
--- /dev/null
+++ b/sys-devel/gcc/files/gcc-7.3.0-powerpc-darwin.patch
@@ -0,0 +1,30 @@
+https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=257501
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84113
+
+--- branches/gcc-7-branch/gcc/config/rs6000/altivec.md 2018/02/08 18:39:43     
257500
++++ branches/gcc-7-branch/gcc/config/rs6000/altivec.md 2018/02/08 18:48:37     
257501
+@@ -414,7 +414,6 @@
+ (define_insn "*restore_world"
+  [(match_parallel 0 "restore_world_operation"
+                   [(return)
+-                 (use (reg:SI LR_REGNO))
+                    (use (match_operand:SI 1 "call_operand" "s"))
+                    (clobber (match_operand:SI 2 "gpc_reg_operand" "=r"))])]
+  "TARGET_MACHO && (DEFAULT_ABI == ABI_DARWIN) && TARGET_32BIT"
+--- branches/gcc-7-branch/gcc/config/rs6000/predicates.md      2018/02/08 
18:39:43     257500
++++ branches/gcc-7-branch/gcc/config/rs6000/predicates.md      2018/02/08 
18:48:37     257501
+@@ -1468,13 +1468,12 @@
+   rtx elt;
+   int count = XVECLEN (op, 0);
+ 
+-  if (count != 59)
++  if (count != 58)
+     return 0;
+ 
+   index = 0;
+   if (GET_CODE (XVECEXP (op, 0, index++)) != RETURN
+       || GET_CODE (XVECEXP (op, 0, index++)) != USE
+-      || GET_CODE (XVECEXP (op, 0, index++)) != USE
+       || GET_CODE (XVECEXP (op, 0, index++)) != CLOBBER)
+     return 0;
+ 

diff --git a/sys-devel/gcc/gcc-7.3.0-r3.ebuild 
b/sys-devel/gcc/gcc-7.3.0-r3.ebuild
index 8d4055ed5e..57e53e6fca 100644
--- a/sys-devel/gcc/gcc-7.3.0-r3.ebuild
+++ b/sys-devel/gcc/gcc-7.3.0-r3.ebuild
@@ -38,6 +38,9 @@ src_prepare() {
 
        # make it have correct install_names on Darwin
        epatch "${FILESDIR}"/4.3.3/darwin-libgcc_s-installname.patch
+
+       # fix for powerpc-darwin, from upstream, fixed for 7.4
+       epatch "${FILESDIR}"/${P}-powerpc-darwin.patch
 }
 
 src_configure() {

Reply via email to