diff mbox series

[OpenWrt-Devel] toolchain/gcc: Backport patch to fix unconditional MULTIARCH_DIRNAME

Message ID 20191118220459.14022-1-jeffery.to@gmail.com
State Accepted
Delegated to: Hauke Mehrtens
Headers show
Series [OpenWrt-Devel] toolchain/gcc: Backport patch to fix unconditional MULTIARCH_DIRNAME | expand

Commit Message

Jeffery To Nov. 18, 2019, 10:04 p.m. UTC
This backports the patch for GCC PR target/89587 (gcc's rs6000
configuration unconditionally sets MULTIARCH_DIRNAME, even when
multiarch is disabled).

This currently affects apm821xx and may cause issues when
cross-compiling packages, e.g. Python 3[1].

This includes patches for GCC 7 and 8 (with the changelog diff removed);
this change is already included in GCC 9.2.

[1]: https://github.com/openwrt/packages/issues/10552

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
---
 .../patches/7.4.0/090-rs6000-PR-89587.patch   | 33 +++++++++++++++++++
 .../patches/8.3.0/090-rs6000-PR-89587.patch   | 30 +++++++++++++++++
 2 files changed, 63 insertions(+)
 create mode 100644 toolchain/gcc/patches/7.4.0/090-rs6000-PR-89587.patch
 create mode 100644 toolchain/gcc/patches/8.3.0/090-rs6000-PR-89587.patch

Comments

Jeffery To Dec. 19, 2019, 11:50 a.m. UTC | #1
On Tue, Nov 19, 2019 at 6:05 AM Jeffery To <jeffery.to@gmail.com> wrote:

> This backports the patch for GCC PR target/89587 (gcc's rs6000
> configuration unconditionally sets MULTIARCH_DIRNAME, even when
> multiarch is disabled).
>

Can someone take a look at this change? This issue is preventing the Python
3 package from compiling for apm821xx (
https://github.com/openwrt/packages/issues/10552).

Thanks,
Jeff
Petr Štetiar Dec. 19, 2019, 1:23 p.m. UTC | #2
Jeffery To <jeffery.to@gmail.com> [2019-12-19 19:50:41]:

Hi,

> On Tue, Nov 19, 2019 at 6:05 AM Jeffery To <jeffery.to@gmail.com> wrote:
> 
> > This backports the patch for GCC PR target/89587 (gcc's rs6000
> > configuration unconditionally sets MULTIARCH_DIRNAME, even when
> > multiarch is disabled).
> >
> 
> Can someone take a look at this change? This issue is preventing the Python
> 3 package from compiling for apm821xx (

just added it to my staging tree and I'll push it once it passes some tests.

-- ynezz
diff mbox series

Patch

diff --git a/toolchain/gcc/patches/7.4.0/090-rs6000-PR-89587.patch b/toolchain/gcc/patches/7.4.0/090-rs6000-PR-89587.patch
new file mode 100644
index 0000000000..00d5c3ce5c
--- /dev/null
+++ b/toolchain/gcc/patches/7.4.0/090-rs6000-PR-89587.patch
@@ -0,0 +1,33 @@ 
+From 0eec4161396ba6cf6052e1076d4548418c6ebcc1 Mon Sep 17 00:00:00 2001
+From: jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Fri, 30 Aug 2019 12:12:56 +0000
+Subject: [PATCH] 	Backported from mainline 	2019-03-05  Jakub
+ Jelinek  <jakub@redhat.com>
+
+	PR target/89587
+	* config/rs6000/t-linux (MULTIARCH_DIRNAME): Set to non-empty only
+	if_multiarch.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@275123 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ gcc/ChangeLog             | 4 ++++
+ gcc/config/rs6000/t-linux | 4 ++--
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/gcc/config/rs6000/t-linux b/gcc/config/rs6000/t-linux
+index 4cb63bdca5d1..23f3fd236df3 100644
+--- a/gcc/config/rs6000/t-linux
++++ b/gcc/config/rs6000/t-linux
+@@ -5,9 +5,9 @@ ifneq (,$(findstring powerpc64,$(target)))
+ MULTILIB_OSDIRNAMES := .=../lib64$(call if_multiarch,:powerpc64-linux-gnu)
+ else
+ ifneq (,$(findstring spe,$(target)))
+-MULTIARCH_DIRNAME := powerpc-linux-gnuspe$(if $(findstring 8548,$(with_cpu)),,v1)
++MULTIARCH_DIRNAME := $(call if_multiarch,powerpc-linux-gnuspe$(if $(findstring 8548,$(with_cpu)),,v1))
+ else
+-MULTIARCH_DIRNAME := powerpc-linux-gnu
++MULTIARCH_DIRNAME := $(call if_multiarch,powerpc-linux-gnu)
+ endif
+ endif
+ ifneq (,$(findstring powerpcle,$(target)))
diff --git a/toolchain/gcc/patches/8.3.0/090-rs6000-PR-89587.patch b/toolchain/gcc/patches/8.3.0/090-rs6000-PR-89587.patch
new file mode 100644
index 0000000000..83bfbbe712
--- /dev/null
+++ b/toolchain/gcc/patches/8.3.0/090-rs6000-PR-89587.patch
@@ -0,0 +1,30 @@ 
+From 045e60da05ec1d4997864883143a951f152cfc9f Mon Sep 17 00:00:00 2001
+From: jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Tue, 30 Apr 2019 20:37:12 +0000
+Subject: [PATCH] 	Backported from mainline 	2019-03-05  Jakub
+ Jelinek  <jakub@redhat.com>
+
+	PR target/89587
+	* config/rs6000/t-linux (MULTIARCH_DIRNAME): Set to non-empty only
+	if_multiarch.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@270720 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ gcc/ChangeLog             | 4 ++++
+ gcc/config/rs6000/t-linux | 2 +-
+ 2 files changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/gcc/config/rs6000/t-linux b/gcc/config/rs6000/t-linux
+index acfde1f48aec..aeb7440c4920 100644
+--- a/gcc/config/rs6000/t-linux
++++ b/gcc/config/rs6000/t-linux
+@@ -4,7 +4,7 @@ ifeq (,$(filter $(with_cpu),$(SOFT_FLOAT_CPUS))$(findstring soft,$(with_float)))
+ ifneq (,$(findstring powerpc64,$(target)))
+ MULTILIB_OSDIRNAMES := .=../lib64$(call if_multiarch,:powerpc64-linux-gnu)
+ else
+-MULTIARCH_DIRNAME := powerpc-linux-gnu
++MULTIARCH_DIRNAME := $(call if_multiarch,powerpc-linux-gnu)
+ endif
+ ifneq (,$(findstring powerpcle,$(target)))
+ MULTIARCH_DIRNAME := $(subst -linux,le-linux,$(MULTIARCH_DIRNAME))