Re: [PATCH 07/15] arm64: use -mno-implicit-float instead of -mgeneral-regs-only

From: Nick Desaulniers
Date: Fri Nov 03 2017 - 14:20:18 EST


On Fri, Nov 3, 2017 at 11:02 AM, Mark Rutland <mark.rutland@xxxxxxx> wrote:
> Ah, so I guess this is what I was hitting when testing with clang 5.0.0.

Exactly.

> I was under the impression that this series was jsut enablnig LTO
> support, not clang support generally.

Clang is supported at least for the arm64*/x86-64 configs that we've
gotten around to testing.

* minus this one last compiler bug (but maybe "last" is optimistic).

> It would be much nicer if we could depend on a fixed clang to start
> with...

I agree, which is why I'm on the fence with this patch. With a newer
version of Clang, it's not needed.

There are some kbuild macros for certain versions of GCC, maybe
something like that can be used to conditionally swap these flags if
using an older version of Clang?

>> +# This is a workaround for https://bugs.llvm.org/show_bug.cgi?id=30792.
>> +KBUILD_CFLAGS += -mno-implicit-float
>> +else
>> +KBUILD_CFLAGS += -mgeneral-regs-only
>> +endif