[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALCETrXfaEr9OGc5EDpxnhRZxFk5YZBBNVH-N32Eg8V8diwqXg@mail.gmail.com>
Date: Tue, 23 Jun 2020 11:22:53 -0700
From: Andy Lutomirski <luto@...nel.org>
To: Borislav Petkov <bp@...en8.de>
Cc: Andy Lutomirski <luto@...nel.org>, X86 ML <x86@...nel.org>,
jpa@...nelbug.mail.kapsi.fi, Dave Hansen <dave.hansen@...el.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/2] selftests/fpu: Add an FPU selftest
On Tue, Jun 23, 2020 at 3:28 AM Borislav Petkov <bp@...en8.de> wrote:
>
> On Mon, Jun 22, 2020 at 12:37:12PM -0700, Andy Lutomirski wrote:
> > It’s this whole mess:
> >
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383
>
> It really is a mess because our option detection doesn't really work. I did:
>
> ifdef CONFIG_CC_IS_GCC
> ifeq ($(call cc-option-yn,-mpreferred-stack-boundary=3),y)
> dummy := $(error "gcc supports -mpreferred-stack-boundary=3")
> endif
> ...
>
> and doing:
>
> $ make CC=gcc-4.8 HOSTCC=gcc-4.8 V=1 lib/test_fpu.ko
>
> gives
>
> lib/Makefile:110: *** "gcc supports -mpreferred-stack-boundary=3". Stop.
>
> That same compiler, however, says:
>
> $ gcc-4.8 -mpreferred-stack-boundary=3 -c /tmp/foo.c
> /tmp/foo.c:1:0: error: -mpreferred-stack-boundary=3 is not between 4 and 12
>
> so I need to dig deep into cc-option* fun.
See that same atrocious bug report. It's the insane interaction
between -mno-sse2 and -mpreferred-stack-boundary. So you need to
cc-option them both? Or just stick with a compiler version check, I
guess.
--Andy
Powered by blists - more mailing lists