Messages in this thread | | | From | Sedat Dilek <> | Date | Thu, 23 Jul 2020 15:14:02 +0200 | Subject | Re: [PATCH v3 11/11] x86: support i386 with Clang |
| |
On Thu, Jul 23, 2020 at 1:42 PM Arnd Bergmann <arnd@arndb.de> wrote: > > On Thu, Jul 23, 2020 at 1:07 PM Sedat Dilek <sedat.dilek@gmail.com> wrote: > > On Thu, Jul 23, 2020 at 11:17 AM Thomas Gleixner <tglx@linutronix.de> wrote: > > > Thomas Gleixner <tglx@linutronix.de> writes: > > > > I have applied this patch-series v3 but some basics of "i386" usage > > are not clear to me when I wanted to test it and give some feedback. > > > > [1] is the original place in CBL where this was reported and I have > > commented on this. > > > > Beyond some old cruft in i386_defconfig like non-existent > > "CONFIG_CRYPTO_AES_586" I have some fundamental questions: > > > > What means "ARCH=i386" and where it is used (for)? > > > > I can do: > > > > $ ARCH=x86 make V=1 -j3 $MAKE_OPTS i386_defconfig > > $ make V=1 -j3 $MAKE_OPTS i386_defconfig > > > > ...which results in the same .config. > > > > Whereas when I do: > > > > $ ARCH=i386 make V=1 -j3 $MAKE_OPTS i386_defconfig > > > > ...drops CONFIG_64BIT line entirely. > > > > But "# CONFIG_64BIT is not set" is explicitly set in > > arch/x86/configs/i386_defconfig but gets dropped. > > > > Unsure if above is the same like: > > $ ARCH=i386 make V=1 -j3 $MAKE_OPTS defconfig > > The logic was introduced when arch/i386 and arch/x86_64 got > merged into arch/x86, to stay compatible with the original behavior > that would produce a 32-bit or 64-bit kernel depending on which > machine you are running on. > > There are probably not a lot of people building kernels on 32-bit > machines any more (real 32-bit machines are really slow compared > to modern ones, and 64-bit machines running 32-bit distros usually > want a 64-bit kernel), so it could in theory be changed. > > It will certainly break someone's workflow though, so nobody has > proposed actually changing it so far. > > > When generating via "make ... i386_defconfig" modern gcc-9 and and a > > snapshot version of clang-11 build both with: > > > > $ ARCH=x86 make V=1 -j3 $MAKE_OPTS > > ... -march=i686 -mtune=generic ... > > > > Checking generated .config reveals: > > > > CONFIG_M686=y > > > > So, I guess modern compilers do at least support "i686" as lowest CPU? > > i686 compiler support goes back to the 1990s, and the kernel now > requires at least gcc-4.9 from 2014, so yes. > > > Nick D. says: > > > I usually test with make ... i386_defconfig. > > > > Can you enlighten a bit? > > > > Of course, I can send a patch to remove the "CONFIG_CRYPTO_AES_586=y" > > line from i386_defconfig. > > The "i386" in i386_defconfig is just a synonym for x86-32, it does not > imply a particular CPU generation. The original i386 is no longer supported, > i486sx (barely) is and in practice most 32-bit Linux code gets compiled > for some variant of i586 or i686 variant but run on 64-bit hardware. >
Thanks a lot Arnd for all the detailed informations.
A change of i386_defconfig to x86_defconfig will cause a big cry from all kernel-bot maintainers :-).
- Sedat -
P.S.: CONFIG_64BIT What I dropped by accident in my previous mail: What happens when there is no CONFIG_64BIT line? There exist explicit checks for (and "inverse") of CONFIG_64BIT like "ifdef" and "ifndef" or any "defined(...)" and its opposite? I remember I have seen checks for it in x86 tree.
- EOT -
| |