From: Michael Ellerman <mpe@ellerman.id.au>
To: Nick Desaulniers <ndesaulniers@google.com>, joel@jms.id.au
Cc: LKML <linux-kernel@vger.kernel.org>,
linuxppc-dev@lists.ozlabs.org, Arnd Bergmann <arnd@arndb.de>,
Kees Cook <keescook@chromium.org>,
jji@us.ibm.com
Subject: Re: [PATCH] raid6/ppc: Fix build for clang
Date: Thu, 01 Nov 2018 15:38:35 +1100 [thread overview]
Message-ID: <87y3ad76pg.fsf@concordia.ellerman.id.au> (raw)
In-Reply-To: <CAKwvOdm8rFNEG39_6f5voZo3nU1g9eC6M8uxeQPVE8=JUoB3mg@mail.gmail.com>
Nick Desaulniers <ndesaulniers@google.com> writes:
> On Tue, Oct 30, 2018 at 8:28 PM Joel Stanley <joel@jms.id.au> wrote:
>>
>> 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>
>
> Hopefully we can have this fixed up soon. I'll try to see who works
> on Clang+PPC here and see if they can help move that bug along. Thanks
> for the patch!
>
>> ---
>> lib/raid6/Makefile | 15 +++++++++++++++
>> 1 file changed, 15 insertions(+)
>>
>> diff --git a/lib/raid6/Makefile b/lib/raid6/Makefile
>> index 2f8b61dfd9b0..3a844e6fd01c 100644
>> --- 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)
>> +
>> +ifdef CONFIG_CC_IS_CLANG
>
> Note that the top level makefile detects clang via:
>
> ifeq ($(cc-name),clang)
>
> Does that not work here? I'd prefer to keep compiler detection in
> Makefiles consistent, if it works?
cc-name is being removed in favor of CONFIG_CC_IS_CLANG:
https://lore.kernel.org/lkml/1540905994-6073-1-git-send-email-yamada.masahiro@socionext.com/
cheers
next prev parent reply other threads:[~2018-11-01 4:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-31 3:28 [PATCH] raid6/ppc: Fix build for clang Joel Stanley
2018-10-31 19:54 ` Nick Desaulniers
2018-11-01 4:38 ` Michael Ellerman [this message]
2018-11-01 16:05 ` Nick Desaulniers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y3ad76pg.fsf@concordia.ellerman.id.au \
--to=mpe@ellerman.id.au \
--cc=arnd@arndb.de \
--cc=jji@us.ibm.com \
--cc=joel@jms.id.au \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=ndesaulniers@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).