Re: building in 32bit chroot on x86_64 host broken

From: Linus Torvalds
Date: Tue Jun 05 2018 - 22:20:07 EST


On Tue, Jun 5, 2018 at 6:54 PM Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> But once you *have* that particular Kconfig, I do think that "make
> oldconfig" should just work. And it apparently used to.
>
> So I think this is a behavioral regression.

That doesn't necessarily mean that he fix should be to revert.

Maybe the fix is to simply change how we generate the ARCH variable.

Right now, in the Makefile, it is

ARCH ?= $(SUBARCH)

so basically "if the user didn't specify ARCH, we pick it from SUBARCH".

But that doesn't make much sense for "make oldconfig" does it?

So maybe we could make the rule be that if the user didn't specify
ARCH explicitly, we take it from SUBARCH, _except_ if we are doing
"make oldconfig", in which case we take it from the .config file.

That makes a certain amount of sense, wouldn't you agree? Doing
"oldconfig" and silently changing ARCH under the user seems pretty
user-hostile.

In fact, I think it would _always_ make sense to take ARCH from the
config file, _unless_ we're actively generating a new config file
entirely (ie "make *config", not counting "oldconfig").

Hmm?

Linus