lkml.org 
[lkml]   [2020]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2 10/16] x86: probe assembler capabilities via kconfig instead of makefile
On Thu, Mar 26, 2020 at 12:54 PM Jason A. Donenfeld <Jason@zx2c4.com> wrote:
>
> On Thu, Mar 26, 2020 at 11:49 AM Nick Desaulniers
> <ndesaulniers@google.com> wrote:
> >
> > On Thu, Mar 26, 2020 at 1:02 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
> > >
> > > From: "Jason A. Donenfeld" <Jason@zx2c4.com>
> > >
> > > Doing this probing inside of the Makefiles means we have a maze of
> > > ifdefs inside the source code and child Makefiles that need to make
> > > proper decisions on this too. Instead, we do it at Kconfig time, like
> > > many other compiler and assembler options, which allows us to set up the
> > > dependencies normally for full compilation units. In the process, the
> > > ADX test changes to use %eax instead of %r10 so that it's valid in both
> > > 32-bit and 64-bit mode.
> >
> > Does KConfig generate -D<foo> flags for KBUILD_CFLAGS and KBUILD_AFLAGS?
>
> kconfig sticks everything it's got into include/generated/autoconf.h.
> That's how you're able to use all those #ifdef CONFIG_* macros
> already. This change moves things from a command line -D to the
> autoconf.h file.

Cool, I wondered how that was wired up. Though seeing the word
"autoconf" brings on PTSD for me.
Patch LGTM.
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>

>
> > Looks like lib/raid6/test/Makefile also generates some of these?
>
> raid6 has its own crazy thing going on. The test directory compiles
> that code for use in userspace. You might argue that its whole
> situation is non-standard and weird and should be reworked
> differently, but that seems like fodder for a different patchset on
> the linux-raid list.



--
Thanks,
~Nick Desaulniers

\
 
 \ /
  Last update: 2020-03-26 21:01    [W:1.265 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site