]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Jan 2019 18:31:58 +0000 (19:31 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Jan 2019 18:31:58 +0000 (19:31 +0100)
added patches:
ftrace-build-with-cppflags-to-get-qunused-arguments.patch
kbuild-add-no-integrated-as-clang-option-unconditionally.patch
kbuild-consolidate-clang-compiler-flags.patch
makefile-export-clang-toolchain-variables.patch
md-raid10-remove-vlais.patch
powerpc-avoid-mno-sched-epilog-on-gcc-4.9-and-newer.patch
powerpc-boot-set-target-when-cross-compiling-for-clang.patch
powerpc-disable-wbuiltin-requires-header-when-setjmp-is-used.patch
raid6-ppc-fix-build-for-clang.patch

queue-4.14/ftrace-build-with-cppflags-to-get-qunused-arguments.patch [new file with mode: 0644]
queue-4.14/kbuild-add-no-integrated-as-clang-option-unconditionally.patch [new file with mode: 0644]
queue-4.14/kbuild-consolidate-clang-compiler-flags.patch [new file with mode: 0644]
queue-4.14/makefile-export-clang-toolchain-variables.patch [new file with mode: 0644]
queue-4.14/md-raid10-remove-vlais.patch [new file with mode: 0644]
queue-4.14/powerpc-avoid-mno-sched-epilog-on-gcc-4.9-and-newer.patch [new file with mode: 0644]
queue-4.14/powerpc-boot-set-target-when-cross-compiling-for-clang.patch [new file with mode: 0644]
queue-4.14/powerpc-disable-wbuiltin-requires-header-when-setjmp-is-used.patch [new file with mode: 0644]
queue-4.14/raid6-ppc-fix-build-for-clang.patch [new file with mode: 0644]
queue-4.14/series

diff --git a/queue-4.14/ftrace-build-with-cppflags-to-get-qunused-arguments.patch b/queue-4.14/ftrace-build-with-cppflags-to-get-qunused-arguments.patch
new file mode 100644 (file)
index 0000000..b16ecb1
--- /dev/null
@@ -0,0 +1,33 @@
+From foo@baz Thu Jan 10 19:31:14 CET 2019
+From: Joel Stanley <joel@jms.id.au>
+Date: Mon, 17 Sep 2018 17:07:54 +0930
+Subject: ftrace: Build with CPPFLAGS to get -Qunused-arguments
+
+From: Joel Stanley <joel@jms.id.au>
+
+When building to record the mcount locations the kernel uses
+KBUILD_CFLAGS but not KBUILD_CPPFLAGS. This means it lacks
+-Qunused-arguments when building with clang, resulting in a lot of
+noisy warnings.
+
+Signed-off-by: Joel Stanley <joel@jms.id.au>
+Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
+Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
+[nc: Fix conflicts due to lack of 87a32e624037 and d503ac531a52]
+Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ scripts/Makefile.build |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/scripts/Makefile.build
++++ b/scripts/Makefile.build
+@@ -242,7 +242,7 @@ else
+ sub_cmd_record_mcount = set -e ; perl $(srctree)/scripts/recordmcount.pl "$(ARCH)" \
+       "$(if $(CONFIG_CPU_BIG_ENDIAN),big,little)" \
+       "$(if $(CONFIG_64BIT),64,32)" \
+-      "$(OBJDUMP)" "$(OBJCOPY)" "$(CC) $(KBUILD_CFLAGS)" \
++      "$(OBJDUMP)" "$(OBJCOPY)" "$(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS)" \
+       "$(LD)" "$(NM)" "$(RM)" "$(MV)" \
+       "$(if $(part-of-module),1,0)" "$(@)";
+ recordmcount_source := $(srctree)/scripts/recordmcount.pl
diff --git a/queue-4.14/kbuild-add-no-integrated-as-clang-option-unconditionally.patch b/queue-4.14/kbuild-add-no-integrated-as-clang-option-unconditionally.patch
new file mode 100644 (file)
index 0000000..3210867
--- /dev/null
@@ -0,0 +1,37 @@
+From foo@baz Thu Jan 10 19:31:14 CET 2019
+From: Masahiro Yamada <yamada.masahiro@socionext.com>
+Date: Tue, 6 Nov 2018 12:04:54 +0900
+Subject: kbuild: add -no-integrated-as Clang option unconditionally
+
+From: Masahiro Yamada <yamada.masahiro@socionext.com>
+
+commit dbe27a002ef8573168cb64e181458ea23a74e2b6 upstream.
+
+We are still a way off the Clang's integrated assembler support for
+the kernel. Hence, -no-integrated-as is mandatory to build the kernel
+with Clang. If you had an ancient version of Clang that does not
+recognize this option, you would not be able to compile the kernel
+anyway.
+
+Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
+Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
+Tested-by: Nick Desaulniers <ndesaulniers@google.com>
+Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ Makefile |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/Makefile
++++ b/Makefile
+@@ -489,8 +489,8 @@ CLANG_GCC_TC       := --gcc-toolchain=$(GCC_TO
+ endif
+ KBUILD_CFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC) $(CLANG_PREFIX)
+ KBUILD_AFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC) $(CLANG_PREFIX)
+-KBUILD_CFLAGS += $(call cc-option, -no-integrated-as)
+-KBUILD_AFLAGS += $(call cc-option, -no-integrated-as)
++KBUILD_CFLAGS += -no-integrated-as
++KBUILD_AFLAGS += -no-integrated-as
+ endif
+ RETPOLINE_CFLAGS_GCC := -mindirect-branch=thunk-extern -mindirect-branch-register
diff --git a/queue-4.14/kbuild-consolidate-clang-compiler-flags.patch b/queue-4.14/kbuild-consolidate-clang-compiler-flags.patch
new file mode 100644 (file)
index 0000000..b6404ae
--- /dev/null
@@ -0,0 +1,50 @@
+From foo@baz Thu Jan 10 19:31:14 CET 2019
+From: Masahiro Yamada <yamada.masahiro@socionext.com>
+Date: Tue, 6 Nov 2018 12:04:55 +0900
+Subject: kbuild: consolidate Clang compiler flags
+
+From: Masahiro Yamada <yamada.masahiro@socionext.com>
+
+commit 238bcbc4e07fad2fff99c5b157d0c37ccd4d093c upstream.
+
+Collect basic Clang options such as --target, --prefix, --gcc-toolchain,
+-no-integrated-as into a single variable CLANG_FLAGS so that it can be
+easily reused in other parts of Makefile.
+
+Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
+Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
+Tested-by: Nick Desaulniers <ndesaulniers@google.com>
+Acked-by: Greg Hackmann <ghackmann@google.com>
+Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ Makefile |   13 ++++++-------
+ 1 file changed, 6 insertions(+), 7 deletions(-)
+
+--- a/Makefile
++++ b/Makefile
+@@ -479,18 +479,17 @@ endif
+ ifeq ($(cc-name),clang)
+ ifneq ($(CROSS_COMPILE),)
+-CLANG_TARGET  := --target=$(notdir $(CROSS_COMPILE:%-=%))
++CLANG_FLAGS   := --target=$(notdir $(CROSS_COMPILE:%-=%))
+ GCC_TOOLCHAIN_DIR := $(dir $(shell which $(LD)))
+-CLANG_PREFIX  := --prefix=$(GCC_TOOLCHAIN_DIR)
++CLANG_FLAGS   += --prefix=$(GCC_TOOLCHAIN_DIR)
+ GCC_TOOLCHAIN := $(realpath $(GCC_TOOLCHAIN_DIR)/..)
+ endif
+ ifneq ($(GCC_TOOLCHAIN),)
+-CLANG_GCC_TC  := --gcc-toolchain=$(GCC_TOOLCHAIN)
++CLANG_FLAGS   += --gcc-toolchain=$(GCC_TOOLCHAIN)
+ endif
+-KBUILD_CFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC) $(CLANG_PREFIX)
+-KBUILD_AFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC) $(CLANG_PREFIX)
+-KBUILD_CFLAGS += -no-integrated-as
+-KBUILD_AFLAGS += -no-integrated-as
++CLANG_FLAGS   += -no-integrated-as
++KBUILD_CFLAGS += $(CLANG_FLAGS)
++KBUILD_AFLAGS += $(CLANG_FLAGS)
+ endif
+ RETPOLINE_CFLAGS_GCC := -mindirect-branch=thunk-extern -mindirect-branch-register
diff --git a/queue-4.14/makefile-export-clang-toolchain-variables.patch b/queue-4.14/makefile-export-clang-toolchain-variables.patch
new file mode 100644 (file)
index 0000000..cd2c4c2
--- /dev/null
@@ -0,0 +1,29 @@
+From foo@baz Thu Jan 10 19:31:14 CET 2019
+From: Joel Stanley <joel@jms.id.au>
+Date: Mon, 12 Nov 2018 14:51:15 +1030
+Subject: Makefile: Export clang toolchain variables
+
+From: Joel Stanley <joel@jms.id.au>
+
+commit 3bd9805090af843b25f97ffe5049f20ade1d86d6 upstream.
+
+The powerpc makefile will use these in it's boot wrapper.
+
+Signed-off-by: Joel Stanley <joel@jms.id.au>
+Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
+Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ Makefile |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/Makefile
++++ b/Makefile
+@@ -490,6 +490,7 @@ endif
+ CLANG_FLAGS   += -no-integrated-as
+ KBUILD_CFLAGS += $(CLANG_FLAGS)
+ KBUILD_AFLAGS += $(CLANG_FLAGS)
++export CLANG_FLAGS
+ endif
+ RETPOLINE_CFLAGS_GCC := -mindirect-branch=thunk-extern -mindirect-branch-register
diff --git a/queue-4.14/md-raid10-remove-vlais.patch b/queue-4.14/md-raid10-remove-vlais.patch
new file mode 100644 (file)
index 0000000..8864e31
--- /dev/null
@@ -0,0 +1,70 @@
+From foo@baz Thu Jan 10 19:31:14 CET 2019
+From: Matthias Kaehlcke <mka@chromium.org>
+Date: Thu, 5 Oct 2017 11:28:47 -0700
+Subject: md: raid10: remove VLAIS
+
+From: Matthias Kaehlcke <mka@chromium.org>
+
+commit 584ed9fa9532f8b9d5955628ff87ee3b2ab9f5a9 upstream.
+
+The raid10 driver can't be built with clang since it uses a variable
+length array in a structure (VLAIS):
+
+drivers/md/raid10.c:4583:17: error: fields must have a constant size:
+  'variable length array in structure' extension will never be supported
+
+Allocate the r10bio struct with kmalloc instead of using the VLAIS
+construct.
+
+Shaohua: set the MD_RECOVERY_INTR bit
+Neil Brown: use GFP_NOIO
+
+Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
+Reviewed-by: Guenter Roeck <groeck@chromium.org>
+Signed-off-by: Shaohua Li <shli@fb.com>
+Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/md/raid10.c |   15 ++++++++++-----
+ 1 file changed, 10 insertions(+), 5 deletions(-)
+
+--- a/drivers/md/raid10.c
++++ b/drivers/md/raid10.c
+@@ -4591,15 +4591,18 @@ static int handle_reshape_read_error(str
+       /* Use sync reads to get the blocks from somewhere else */
+       int sectors = r10_bio->sectors;
+       struct r10conf *conf = mddev->private;
+-      struct {
+-              struct r10bio r10_bio;
+-              struct r10dev devs[conf->copies];
+-      } on_stack;
+-      struct r10bio *r10b = &on_stack.r10_bio;
++      struct r10bio *r10b;
+       int slot = 0;
+       int idx = 0;
+       struct page **pages;
++      r10b = kmalloc(sizeof(*r10b) +
++             sizeof(struct r10dev) * conf->copies, GFP_NOIO);
++      if (!r10b) {
++              set_bit(MD_RECOVERY_INTR, &mddev->recovery);
++              return -ENOMEM;
++      }
++
+       /* reshape IOs share pages from .devs[0].bio */
+       pages = get_resync_pages(r10_bio->devs[0].bio)->pages;
+@@ -4648,11 +4651,13 @@ static int handle_reshape_read_error(str
+                       /* couldn't read this block, must give up */
+                       set_bit(MD_RECOVERY_INTR,
+                               &mddev->recovery);
++                      kfree(r10b);
+                       return -EIO;
+               }
+               sectors -= s;
+               idx++;
+       }
++      kfree(r10b);
+       return 0;
+ }
diff --git a/queue-4.14/powerpc-avoid-mno-sched-epilog-on-gcc-4.9-and-newer.patch b/queue-4.14/powerpc-avoid-mno-sched-epilog-on-gcc-4.9-and-newer.patch
new file mode 100644 (file)
index 0000000..f120f1f
--- /dev/null
@@ -0,0 +1,35 @@
+From foo@baz Thu Jan 10 19:31:14 CET 2019
+From: Nicholas Piggin <npiggin@gmail.com>
+Date: Fri, 14 Sep 2018 15:08:54 +1000
+Subject: powerpc: avoid -mno-sched-epilog on GCC 4.9 and newer
+
+From: Nicholas Piggin <npiggin@gmail.com>
+
+commit 6977f95e63b9b3fb4a5973481a800dd9f48a1338 upstream.
+
+Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
+Reviewed-by: Joel Stanley <joel@jms.id.au>
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+[nc: Adjust context due to lack of f2910f0e6835 and 2a056f58fd33]
+Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/powerpc/Makefile |    7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+--- a/arch/powerpc/Makefile
++++ b/arch/powerpc/Makefile
+@@ -236,7 +236,12 @@ endif
+ # Work around a gcc code-gen bug with -fno-omit-frame-pointer.
+ ifeq ($(CONFIG_FUNCTION_TRACER),y)
+-KBUILD_CFLAGS         += -mno-sched-epilog
++# Work around gcc code-gen bugs with -pg / -fno-omit-frame-pointer in gcc <= 4.8
++# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44199
++# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52828
++ifneq ($(cc-name),clang)
++KBUILD_CFLAGS         += $(call cc-ifversion, -lt, 0409, -mno-sched-epilog)
++endif
+ endif
+ cpu-as-$(CONFIG_4xx)          += -Wa,-m405
diff --git a/queue-4.14/powerpc-boot-set-target-when-cross-compiling-for-clang.patch b/queue-4.14/powerpc-boot-set-target-when-cross-compiling-for-clang.patch
new file mode 100644 (file)
index 0000000..a82ecaa
--- /dev/null
@@ -0,0 +1,41 @@
+From foo@baz Thu Jan 10 19:31:14 CET 2019
+From: Joel Stanley <joel@jms.id.au>
+Date: Mon, 12 Nov 2018 14:51:16 +1030
+Subject: powerpc/boot: Set target when cross-compiling for clang
+
+From: Joel Stanley <joel@jms.id.au>
+
+commit 813af51f5d30a2da6a2523c08465f9726e51772e upstream.
+
+Clang needs to be told which target it is building for when cross
+compiling.
+
+Link: https://github.com/ClangBuiltLinux/linux/issues/259
+Signed-off-by: Joel Stanley <joel@jms.id.au>
+Tested-by: Daniel Axtens <dja@axtens.net> # powerpc 64-bit BE
+Acked-by: Michael Ellerman <mpe@ellerman.id.au>
+Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
+Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
+[nc: Use 'ifeq ($(cc-name),clang)' instead of 'ifdef CONFIG_CC_IS_CLANG'
+     because that config does not exist in 4.14; the Kconfig rewrite
+     that added that config happened in 4.18]
+Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/powerpc/boot/Makefile |    5 +++++
+ 1 file changed, 5 insertions(+)
+
+--- a/arch/powerpc/boot/Makefile
++++ b/arch/powerpc/boot/Makefile
+@@ -49,6 +49,11 @@ endif
+ BOOTAFLAGS    := -D__ASSEMBLY__ $(BOOTCFLAGS) -traditional -nostdinc
++ifeq ($(cc-name),clang)
++BOOTCFLAGS += $(CLANG_FLAGS)
++BOOTAFLAGS += $(CLANG_FLAGS)
++endif
++
+ ifdef CONFIG_DEBUG_INFO
+ BOOTCFLAGS    += -g
+ endif
diff --git a/queue-4.14/powerpc-disable-wbuiltin-requires-header-when-setjmp-is-used.patch b/queue-4.14/powerpc-disable-wbuiltin-requires-header-when-setjmp-is-used.patch
new file mode 100644 (file)
index 0000000..aa43f0f
--- /dev/null
@@ -0,0 +1,65 @@
+From foo@baz Thu Jan 10 19:31:14 CET 2019
+From: Joel Stanley <joel@jms.id.au>
+Date: Mon, 17 Sep 2018 17:16:21 +0930
+Subject: powerpc: Disable -Wbuiltin-requires-header when setjmp is used
+
+From: Joel Stanley <joel@jms.id.au>
+
+commit aea447141c7e7824b81b49acd1bc785506fba46e upstream.
+
+The powerpc kernel uses setjmp which causes a warning when building
+with clang:
+
+  In file included from arch/powerpc/xmon/xmon.c:51:
+  ./arch/powerpc/include/asm/setjmp.h:15:13: error: declaration of
+  built-in function 'setjmp' requires inclusion of the header <setjmp.h>
+        [-Werror,-Wbuiltin-requires-header]
+  extern long setjmp(long *);
+              ^
+  ./arch/powerpc/include/asm/setjmp.h:16:13: error: declaration of
+  built-in function 'longjmp' requires inclusion of the header <setjmp.h>
+        [-Werror,-Wbuiltin-requires-header]
+  extern void longjmp(long *, long);
+              ^
+
+This *is* the header and we're not using the built-in setjump but
+rather the one in arch/powerpc/kernel/misc.S. As the compiler warning
+does not make sense, it for the files where setjmp is used.
+
+Signed-off-by: Joel Stanley <joel@jms.id.au>
+Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
+[mpe: Move subdir-ccflags in xmon/Makefile to not clobber -Werror]
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/powerpc/kernel/Makefile |    3 +++
+ arch/powerpc/xmon/Makefile   |    5 ++++-
+ 2 files changed, 7 insertions(+), 1 deletion(-)
+
+--- a/arch/powerpc/kernel/Makefile
++++ b/arch/powerpc/kernel/Makefile
+@@ -5,6 +5,9 @@
+ CFLAGS_ptrace.o               += -DUTS_MACHINE='"$(UTS_MACHINE)"'
++# Disable clang warning for using setjmp without setjmp.h header
++CFLAGS_crash.o                += $(call cc-disable-warning, builtin-requires-header)
++
+ subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
+ ifeq ($(CONFIG_PPC64),y)
+--- a/arch/powerpc/xmon/Makefile
++++ b/arch/powerpc/xmon/Makefile
+@@ -1,7 +1,10 @@
+ # SPDX-License-Identifier: GPL-2.0
+ # Makefile for xmon
+-subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
++# Disable clang warning for using setjmp without setjmp.h header
++subdir-ccflags-y := $(call cc-disable-warning, builtin-requires-header)
++
++subdir-ccflags-$(CONFIG_PPC_WERROR) += -Werror
+ GCOV_PROFILE := n
+ UBSAN_SANITIZE := n
diff --git a/queue-4.14/raid6-ppc-fix-build-for-clang.patch b/queue-4.14/raid6-ppc-fix-build-for-clang.patch
new file mode 100644 (file)
index 0000000..4ff007b
--- /dev/null
@@ -0,0 +1,62 @@
+From foo@baz Thu Jan 10 19:31:14 CET 2019
+From: Joel Stanley <joel@jms.id.au>
+Date: Fri, 2 Nov 2018 11:14:55 +1030
+Subject: raid6/ppc: Fix build for clang
+
+From: Joel Stanley <joel@jms.id.au>
+
+commit e213574a449f7a57d4202c1869bbc7680b6b5521 upstream.
+
+We cannot build these files with clang as it does not allow altivec
+instructions in assembly when -msoft-float is passed.
+
+Jinsong Ji <jji@us.ibm.com> wrote:
+> We currently disable Altivec/VSX support when enabling soft-float.  So
+> any usage of vector builtins will break.
+>
+> Enable Altivec/VSX with soft-float may need quite some clean up work, so
+> I guess this is currently a limitation.
+>
+> Removing -msoft-float will make it work (and we are lucky that no
+> floating point instructions will be generated as well).
+
+This is a workaround until the issue is resolved in clang.
+
+Link: https://bugs.llvm.org/show_bug.cgi?id=31177
+Link: https://github.com/ClangBuiltLinux/linux/issues/239
+Signed-off-by: Joel Stanley <joel@jms.id.au>
+Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+[nc: Use 'ifeq ($(cc-name),clang)' instead of 'ifdef CONFIG_CC_IS_CLANG'
+     because that config does not exist in 4.14; the Kconfig rewrite
+     that added that config happened in 4.18]
+Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ lib/raid6/Makefile |   15 +++++++++++++++
+ 1 file changed, 15 insertions(+)
+
+--- a/lib/raid6/Makefile
++++ b/lib/raid6/Makefile
+@@ -18,6 +18,21 @@ quiet_cmd_unroll = UNROLL  $@
+ ifeq ($(CONFIG_ALTIVEC),y)
+ altivec_flags := -maltivec $(call cc-option,-mabi=altivec)
++
++ifeq ($(cc-name),clang)
++# clang ppc port does not yet support -maltivec when -msoft-float is
++# enabled. A future release of clang will resolve this
++# https://bugs.llvm.org/show_bug.cgi?id=31177
++CFLAGS_REMOVE_altivec1.o  += -msoft-float
++CFLAGS_REMOVE_altivec2.o  += -msoft-float
++CFLAGS_REMOVE_altivec4.o  += -msoft-float
++CFLAGS_REMOVE_altivec8.o  += -msoft-float
++CFLAGS_REMOVE_altivec8.o  += -msoft-float
++CFLAGS_REMOVE_vpermxor1.o += -msoft-float
++CFLAGS_REMOVE_vpermxor2.o += -msoft-float
++CFLAGS_REMOVE_vpermxor4.o += -msoft-float
++CFLAGS_REMOVE_vpermxor8.o += -msoft-float
++endif
+ endif
+ # The GCC option -ffreestanding is required in order to compile code containing
index c20717d30b7fe3f3a498470b9f6e94c380f492f9..e99e81dee2d44833a410e7536ae01f87601ea57b 100644 (file)
@@ -66,3 +66,12 @@ mm-hmm-mark-hmm_devmem_-add-add_resource-export_symbol_gpl.patch
 mm-swap-fix-swapoff-with-ksm-pages.patch
 sunrpc-fix-cache_head-leak-due-to-queued-request.patch
 sunrpc-use-svc_net-in-svcauth_gss_-functions.patch
+powerpc-avoid-mno-sched-epilog-on-gcc-4.9-and-newer.patch
+powerpc-disable-wbuiltin-requires-header-when-setjmp-is-used.patch
+ftrace-build-with-cppflags-to-get-qunused-arguments.patch
+md-raid10-remove-vlais.patch
+kbuild-add-no-integrated-as-clang-option-unconditionally.patch
+kbuild-consolidate-clang-compiler-flags.patch
+makefile-export-clang-toolchain-variables.patch
+powerpc-boot-set-target-when-cross-compiling-for-clang.patch
+raid6-ppc-fix-build-for-clang.patch