]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Oct 2018 12:45:24 +0000 (14:45 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Oct 2018 12:45:24 +0000 (14:45 +0200)
added patches:
arc-build-get-rid-of-toolchain-check.patch

queue-4.4/arc-build-get-rid-of-toolchain-check.patch [new file with mode: 0644]
queue-4.4/series

diff --git a/queue-4.4/arc-build-get-rid-of-toolchain-check.patch b/queue-4.4/arc-build-get-rid-of-toolchain-check.patch
new file mode 100644 (file)
index 0000000..1a972e6
--- /dev/null
@@ -0,0 +1,65 @@
+From 615f64458ad890ef94abc879a66d8b27236e733a Mon Sep 17 00:00:00 2001
+From: Alexey Brodkin <abrodkin@synopsys.com>
+Date: Thu, 13 Sep 2018 23:24:28 +0300
+Subject: ARC: build: Get rid of toolchain check
+
+From: Alexey Brodkin <abrodkin@synopsys.com>
+
+commit 615f64458ad890ef94abc879a66d8b27236e733a upstream.
+
+This check is very naive: we simply test if GCC invoked without
+"-mcpu=XXX" has ARC700 define set. In that case we think that GCC
+was built with "--with-cpu=arc700" and has libgcc built for ARC700.
+
+Otherwise if ARC700 is not defined we think that everythng was built
+for ARCv2.
+
+But in reality our life is much more interesting.
+
+1. Regardless of GCC configuration (i.e. what we pass in "--with-cpu"
+   it may generate code for any ARC core).
+
+2. libgcc might be built with explicitly specified "--mcpu=YYY"
+
+That's exactly what happens in case of multilibbed toolchains:
+ - GCC is configured with default settings
+ - All the libs built for many different CPU flavors
+
+I.e. that check gets in the way of usage of multilibbed
+toolchains. And even non-multilibbed toolchains are affected.
+OpenEmbedded also builds GCC without "--with-cpu" because
+each and every target component later is compiled with explicitly
+set "-mcpu=ZZZ".
+
+Acked-by: Rob Herring <robh@kernel.org>
+Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
+Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arc/Makefile |   14 --------------
+ 1 file changed, 14 deletions(-)
+
+--- a/arch/arc/Makefile
++++ b/arch/arc/Makefile
+@@ -18,20 +18,6 @@ cflags-y    += -fno-common -pipe -fno-built
+ cflags-$(CONFIG_ISA_ARCOMPACT)        += -mA7
+ cflags-$(CONFIG_ISA_ARCV2)    += -mcpu=archs
+-is_700 = $(shell $(CC) -dM -E - < /dev/null | grep -q "ARC700" && echo 1 || echo 0)
+-
+-ifdef CONFIG_ISA_ARCOMPACT
+-ifeq ($(is_700), 0)
+-    $(error Toolchain not configured for ARCompact builds)
+-endif
+-endif
+-
+-ifdef CONFIG_ISA_ARCV2
+-ifeq ($(is_700), 1)
+-    $(error Toolchain not configured for ARCv2 builds)
+-endif
+-endif
+-
+ ifdef CONFIG_ARC_CURR_IN_REG
+ # For a global register defintion, make sure it gets passed to every file
+ # We had a customer reported bug where some code built in kernel was NOT using
index e5e6ec786f0e68846cebb8e6853f87c58670b0c1..6c2ef71c5f4ed1035e8399678077b738a7c3102c 100644 (file)
@@ -40,3 +40,4 @@ net-mlx4-use-cpumask_available-for-eq-affinity_mask.patch
 risc-v-include-linux-ftrace.h-in-asm-prototypes.h.patch
 powerpc-tm-fix-userspace-r13-corruption.patch
 powerpc-tm-avoid-possible-userspace-r1-corruption-on-reclaim.patch
+arc-build-get-rid-of-toolchain-check.patch