mirror of
https://github.com/brain-hackers/linux-brain.git
synced 2024-06-09 23:36:23 +09:00
raid6/ppc: Fix build for clang
commit e213574a44
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>
This commit is contained in:
parent
d75c8c0afd
commit
1f33700bdf
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user