commit:     76151f32fbd41247e5d01f88207db2a084f6e661
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Mar  2 17:23:51 2021 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Mar  2 18:16:45 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=76151f32

sys-devel/distcc: Disable CHOST rewrites that break i686 cross

Closes: https://bugs.gentoo.org/773652
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 ...stcc-3.3.3-r2.ebuild => distcc-3.3.3-r3.ebuild} |  2 ++
 .../files/distcc-3.3.3-no-rewrite-chost.patch      | 28 ++++++++++++++++++++++
 2 files changed, 30 insertions(+)

diff --git a/sys-devel/distcc/distcc-3.3.3-r2.ebuild 
b/sys-devel/distcc/distcc-3.3.3-r3.ebuild
similarity index 98%
rename from sys-devel/distcc/distcc-3.3.3-r2.ebuild
rename to sys-devel/distcc/distcc-3.3.3-r3.ebuild
index b5d02e4bf2c..729f2211d69 100644
--- a/sys-devel/distcc/distcc-3.3.3-r2.ebuild
+++ b/sys-devel/distcc/distcc-3.3.3-r3.ebuild
@@ -46,6 +46,8 @@ src_prepare() {
        eapply "${FILESDIR}/${P}-py38.patch"
        # gcc-10 fix, #707502
        eapply "${FILESDIR}/${P}-gcc-10-fix.patch"
+       # unbreak CHOST prefix, https://bugs.gentoo.org/773652
+       eapply "${FILESDIR}/${P}-no-rewrite-chost.patch"
        eapply_user
 
        # Bugs #120001, #167844 and probably more. See patch for description.

diff --git a/sys-devel/distcc/files/distcc-3.3.3-no-rewrite-chost.patch 
b/sys-devel/distcc/files/distcc-3.3.3-no-rewrite-chost.patch
new file mode 100644
index 00000000000..dafaa90759b
--- /dev/null
+++ b/sys-devel/distcc/files/distcc-3.3.3-no-rewrite-chost.patch
@@ -0,0 +1,28 @@
+From c2471d4cf3e2ef2556c150d52860b4e8f04e4994 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <[email protected]>
+Date: Mon, 1 Mar 2021 22:13:36 +0200
+Subject: [PATCH] distcc: fix i686 cross compile
+
+[mgorny: disable toolchain prefix rewriting code that workarounds some
+ Debian invention and breaks everything else]
+
+---
+ src/compile.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/compile.c b/src/compile.c
+index 25df355..e5d655b 100644
+--- a/src/compile.c
++++ b/src/compile.c
+@@ -572,7 +572,7 @@ static int dcc_gcc_rewrite_fqn(char **argv)
+     if (!newcmd)
+         return -ENOMEM;
+ 
+-    if ((t = strstr(target_with_vendor, "-pc-"))) {
++    if (0 && (t = strstr(target_with_vendor, "-pc-"))) {
+         memcpy(newcmd, target_with_vendor, t - target_with_vendor);
+         strcat(newcmd, t + strlen("-pc"));
+     } else
+-- 
+2.26.2
+

Reply via email to