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:06 +0100
commit120d0d495c5c61aa30599ecb8b806fa935d62abf (patch)
tree23371141011253376f7aff39b6efb013c2b976d4
parent4642719922e1c7ab35f0b83f1eac2c1cdeb4da73 (diff)
MIPS: VDSO: Include $(ccflags-vdso) in o32,n32 .lds builds
-rw-r--r--patches.kernel.org/4.20.9-028-MIPS-VDSO-Include-ccflags-vdso-in-o32-n32-.lds.patch67
-rw-r--r--series.conf1
2 files changed, 68 insertions, 0 deletions
diff --git a/patches.kernel.org/4.20.9-028-MIPS-VDSO-Include-ccflags-vdso-in-o32-n32-.lds.patch b/patches.kernel.org/4.20.9-028-MIPS-VDSO-Include-ccflags-vdso-in-o32-n32-.lds.patch
new file mode 100644
index 0000000000..72d6850d62
--- /dev/null
+++ b/patches.kernel.org/4.20.9-028-MIPS-VDSO-Include-ccflags-vdso-in-o32-n32-.lds.patch
@@ -0,0 +1,67 @@
+From: Paul Burton <paul.burton@mips.com>
+Date: Mon, 28 Jan 2019 23:16:22 +0000
+Subject: [PATCH] MIPS: VDSO: Include $(ccflags-vdso) in o32,n32 .lds builds
+References: bnc#1012628
+Patch-mainline: 4.20.9
+Git-commit: 67fc5dc8a541e8f458d7f08bf88ff55933bf9f9d
+
+commit 67fc5dc8a541e8f458d7f08bf88ff55933bf9f9d upstream.
+
+When generating vdso-o32.lds & vdso-n32.lds for use with programs
+running as compat ABIs under 64b kernels, we previously haven't included
+the compiler flags that are supposedly common to all ABIs - ie. those in
+the ccflags-vdso variable.
+
+This is problematic in cases where we need to provide the -m%-float flag
+in order to ensure that we don't attempt to use a floating point ABI
+that's incompatible with the target CPU & ABI. For example a toolchain
+using current gcc trunk configured --with-fp-32=xx fails to build a
+64r6el_defconfig kernel with the following error:
+
+ cc1: error: '-march=mips1' requires '-mfp32'
+ make[2]: *** [arch/mips/vdso/Makefile:135: arch/mips/vdso/vdso-o32.lds] Error 1
+
+Include $(ccflags-vdso) for the compat VDSO .lds builds, just as it is
+included for the native VDSO .lds & when compiling objects for the
+compat VDSOs. This ensures we consistently provide the -msoft-float flag
+amongst others, avoiding the problem by ensuring we're agnostic to the
+toolchain defaults.
+
+Signed-off-by: Paul Burton <paul.burton@mips.com>
+Fixes: ebb5e78cc634 ("MIPS: Initial implementation of a VDSO")
+Cc: linux-mips@vger.kernel.org
+Cc: Kevin Hilman <khilman@baylibre.com>
+Cc: Guenter Roeck <linux@roeck-us.net>
+Cc: Maciej W . Rozycki <macro@linux-mips.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 | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/arch/mips/vdso/Makefile b/arch/mips/vdso/Makefile
+index 4c0ebaaa915c..67e44466d5a4 100644
+--- a/arch/mips/vdso/Makefile
++++ b/arch/mips/vdso/Makefile
+@@ -129,7 +129,7 @@ $(obj)/%-o32.o: $(src)/%.c FORCE
+ $(call cmd,force_checksrc)
+ $(call if_changed_rule,cc_o_c)
+
+-$(obj)/vdso-o32.lds: KBUILD_CPPFLAGS := -mabi=32
++$(obj)/vdso-o32.lds: KBUILD_CPPFLAGS := $(ccflags-vdso) -mabi=32
+ $(obj)/vdso-o32.lds: $(src)/vdso.lds.S FORCE
+ $(call if_changed_dep,cpp_lds_S)
+
+@@ -169,7 +169,7 @@ $(obj)/%-n32.o: $(src)/%.c FORCE
+ $(call cmd,force_checksrc)
+ $(call if_changed_rule,cc_o_c)
+
+-$(obj)/vdso-n32.lds: KBUILD_CPPFLAGS := -mabi=n32
++$(obj)/vdso-n32.lds: KBUILD_CPPFLAGS := $(ccflags-vdso) -mabi=n32
+ $(obj)/vdso-n32.lds: $(src)/vdso.lds.S FORCE
+ $(call if_changed_dep,cpp_lds_S)
+
+--
+2.20.1
+
diff --git a/series.conf b/series.conf
index 0a50d31c9e..9b3cceb31a 100644
--- a/series.conf
+++ b/series.conf
@@ -1110,6 +1110,7 @@
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
patches.kernel.org/4.20.9-027-mips-loongson64-remove-unreachable-fix-loongso.patch
+ patches.kernel.org/4.20.9-028-MIPS-VDSO-Include-ccflags-vdso-in-o32-n32-.lds.patch
########################################################
# Build fixes that apply to the vanilla kernel too.