Home Home > GIT Browse > stable
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2019-02-15 10:23:48 +0100
committerJiri Slaby <jslaby@suse.cz>2019-02-15 10:24:04 +0100
commit507a3065063f6a52082ca9f44f09ba49b8f22b56 (patch)
tree2ac51caabac175a3aecdedf0cfd47aefe75abc73
parentad48c1830c8b377edbc80fa0d29df6890fa42b5f (diff)
MIPS: VDSO: Use same -m%-float cflag as the kernel proper
-rw-r--r--patches.kernel.org/4.20.9-026-MIPS-VDSO-Use-same-m-float-cflag-as-the-kernel.patch67
-rw-r--r--series.conf1
2 files changed, 68 insertions, 0 deletions
diff --git a/patches.kernel.org/4.20.9-026-MIPS-VDSO-Use-same-m-float-cflag-as-the-kernel.patch b/patches.kernel.org/4.20.9-026-MIPS-VDSO-Use-same-m-float-cflag-as-the-kernel.patch
new file mode 100644
index 0000000000..8d3ef70fe7
--- /dev/null
+++ b/patches.kernel.org/4.20.9-026-MIPS-VDSO-Use-same-m-float-cflag-as-the-kernel.patch
@@ -0,0 +1,67 @@
+From: Paul Burton <paul.burton@mips.com>
+Date: Mon, 28 Jan 2019 22:21:17 +0000
+Subject: [PATCH] MIPS: VDSO: Use same -m%-float cflag as the kernel proper
+References: bnc#1012628
+Patch-mainline: 4.20.9
+Git-commit: 0648e50e548d881d025b9419a1a168753c8e2bf7
+
+commit 0648e50e548d881d025b9419a1a168753c8e2bf7 upstream.
+
+The MIPS VDSO build currently doesn't provide the -msoft-float flag to
+the compiler as the kernel proper does. This results in an attempt to
+use the compiler's default floating point configuration, which can be
+problematic in cases where this is incompatible with the target CPU's
+-march= flag. For example decstation_defconfig fails to build using
+toolchains in which gcc was configured --with-fp-32=xx with the
+following error:
+
+ LDS arch/mips/vdso/vdso.lds
+ cc1: error: '-march=r3000' requires '-mfp32'
+ make[2]: *** [scripts/Makefile.build:379: arch/mips/vdso/vdso.lds] Error 1
+
+The kernel proper avoids this error because we build with the
+-msoft-float compiler flag, rather than using the compiler's default.
+Pass this flag through to the VDSO build so that it too becomes agnostic
+to the toolchain's floating point configuration.
+
+Note that this is filtered out from KBUILD_CFLAGS rather than simply
+always using -msoft-float such that if we switch the kernel to use
+-mno-float in the future the VDSO will automatically inherit the change.
+
+The VDSO doesn't actually include any floating point code, and its
+.MIPS.abiflags section is already manually generated to specify that
+it's compatible with any floating point ABI. As such this change should
+have no effect on the resulting VDSO, apart from fixing the build
+failure for affected toolchains.
+
+Signed-off-by: Paul Burton <paul.burton@mips.com>
+Reported-by: Kevin Hilman <khilman@baylibre.com>
+Reported-by: Guenter Roeck <linux@roeck-us.net>
+Tested-by: Kevin Hilman <khilman@baylibre.com>
+References: https://lore.kernel.org/linux-mips/1477843551-21813-1-git-send-email-linux@roeck-us.net/
+References: https://kernelci.org/build/id/5c4e4ae059b5142a249ad004/logs/
+Fixes: ebb5e78cc634 ("MIPS: Initial implementation of a VDSO")
+Cc: Maciej W. Rozycki <macro@linux-mips.org>
+Cc: linux-mips@vger.kernel.org
+Cc: stable@vger.kernel.org # v4.4+
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ arch/mips/vdso/Makefile | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/arch/mips/vdso/Makefile b/arch/mips/vdso/Makefile
+index 58a0315ad743..4c0ebaaa915c 100644
+--- a/arch/mips/vdso/Makefile
++++ b/arch/mips/vdso/Makefile
+@@ -8,6 +8,7 @@ ccflags-vdso := \
+ $(filter -E%,$(KBUILD_CFLAGS)) \
+ $(filter -mmicromips,$(KBUILD_CFLAGS)) \
+ $(filter -march=%,$(KBUILD_CFLAGS)) \
++ $(filter -m%-float,$(KBUILD_CFLAGS)) \
+ -D__VDSO__
+
+ ifdef CONFIG_CC_IS_CLANG
+--
+2.20.1
+
diff --git a/series.conf b/series.conf
index a7ea897683..3c7624cd43 100644
--- a/series.conf
+++ b/series.conf
@@ -1108,6 +1108,7 @@
patches.kernel.org/4.20.9-023-mips-cm-reprime-error-cause.patch
patches.kernel.org/4.20.9-024-MIPS-Use-lower-case-for-addresses-in-nexys4ddr.patch
patches.kernel.org/4.20.9-025-MIPS-OCTEON-don-t-set-octeon_dma_bar_type-if-P.patch
+ patches.kernel.org/4.20.9-026-MIPS-VDSO-Use-same-m-float-cflag-as-the-kernel.patch
########################################################
# Build fixes that apply to the vanilla kernel too.