Re: [PATCH v2 10/16] x86: probe assembler capabilities via kconfig instead of makefile
From: Jason A. Donenfeld
Date: Thu Mar 26 2020 - 15:54:01 EST
On Thu, Mar 26, 2020 at 11:49 AM Nick Desaulniers
<ndesaulniers@xxxxxxxxxx> wrote:
>
> On Thu, Mar 26, 2020 at 1:02 AM Masahiro Yamada <masahiroy@xxxxxxxxxx> wrote:
> >
> > From: "Jason A. Donenfeld" <Jason@xxxxxxxxx>
> >
> > 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.
> 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.