Skip to contentSkip to conversation

x86/defconfigs: Unbreak 32-bit defconfig builds

PATCH In review Andy Shevchenko 5 participants 8 messages Sep 8, 2020 – Sep 9, 2020 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/defconfigs: Unbreak 32-bit defconfig builds

After the commit 1d0e12fd3a84 ("x86/defconfigs: Refresh defconfig files") 32-bit builds using defconfig become broken because on x86_64 build host with no ARCH provided the default behaviour is to assume 64-bit independently on the configuration file name. The crucial part is CONFIG_64BIT option that used to be explicit. Let restore the latter option in order to unbreak 32-bit builds.

Fixes 1d0e12fd3a84 ("x86/defconfigs: Refresh defconfig files")
---
 arch/x86/configs/i386_defconfig | 1 +
 1 file changed, 1 insertion(+)
arch/x86/configs/i386_defconfig +1 -0
index d66078fc94a4..0b75c4291748 100644
@@ -19,6 +19,7 @@ CONFIG_CGROUP_CPUACCT=y
 CONFIG_BLK_DEV_INITRD=y
 # CONFIG_COMPAT_BRK is not set
 CONFIG_PROFILING=y
+# CONFIG_64BIT is not set
 CONFIG_SMP=y
 CONFIG_X86_GENERIC=y
 CONFIG_HPET_TIMER=y
Signature · 1 line
2.28.0
#1 lore raw
Quoted 6 lines · Andy Shevchenko

After the commit 1d0e12fd3a84 ("x86/defconfigs: Refresh defconfig files") 32-bit builds using defconfig become broken because on x86_64 build host with no ARCH provided the default behaviour is to assume 64-bit independently on the configuration file name. The crucial part is CONFIG_64BIT option that used to be explicit. Let restore the latter option in order to unbreak 32-bit builds.

So exactly which build method broke due to this? The typical way to do a defconfig build is:

make ARCH=i386 defconfig

which still works fine AFAICS.

Thanks,

Ingo

#2 lore raw
Quoted 12 lines · Ingo Molnar
Quoted 6 lines · Andy Shevchenko

After the commit 1d0e12fd3a84 ("x86/defconfigs: Refresh defconfig files") 32-bit builds using defconfig become broken because on x86_64 build host with no ARCH provided the default behaviour is to assume 64-bit independently on the configuration file name. The crucial part is CONFIG_64BIT option that used to be explicit. Let restore the latter option in order to unbreak 32-bit builds.

So exactly which build method broke due to this? The typical way to do a defconfig build is:

Quoted 8 lines

make ARCH=i386 defconfig

which still works fine AFAICS.

Thanks,

Ingo

Here is a previous patch from someone else:

https://lore.kernel.org/lkml/[email protected]/

Signature · 1 line
~Randy
#4 lore raw
In reply to Ingo Molnar
Quoted 10 lines · Ingo Molnar
Quoted 6 lines · Andy Shevchenko

After the commit 1d0e12fd3a84 ("x86/defconfigs: Refresh defconfig files") 32-bit builds using defconfig become broken because on x86_64 build host with no ARCH provided the default behaviour is to assume 64-bit independently on the configuration file name. The crucial part is CONFIG_64BIT option that used to be explicit. Let restore the latter option in order to unbreak 32-bit builds.

Quoted 5 lines

So exactly which build method broke due to this? The typical way to do a defconfig build is:

make ARCH=i386 defconfig

which still works fine AFAICS.

uname => x86_64
make i386_defconfig

It was very convenient to not supply ARCH when build on multi-arch host.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#3 lore raw
In reply to Randy Dunlap
Quoted 16 lines · Randy Dunlap
Quoted 15 lines · Ingo Molnar
Quoted 6 lines · Andy Shevchenko

After the commit 1d0e12fd3a84 ("x86/defconfigs: Refresh defconfig files") 32-bit builds using defconfig become broken because on x86_64 build host with no ARCH provided the default behaviour is to assume 64-bit independently on the configuration file name. The crucial part is CONFIG_64BIT option that used to be explicit. Let restore the latter option in order to unbreak 32-bit builds.

So exactly which build method broke due to this? The typical way to do a defconfig build is:

make ARCH=i386 defconfig

which still works fine AFAICS.

Quoted 8 lines
Quoted 4 lines

Thanks,

Ingo

Here is a previous patch from someone else:

https://lore.kernel.org/lkml/[email protected]/

Thanks for pointing out. Whatever Ingo prefers (though personally I think the other one requires more work on the shrinking commit message).

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#7 lore raw
In reply to Ingo Molnar

Hi

Quoted 10 lines · Ingo Molnar
Quoted 6 lines · Andy Shevchenko

After the commit 1d0e12fd3a84 ("x86/defconfigs: Refresh defconfig files") 32-bit builds using defconfig become broken because on x86_64 build host with no ARCH provided the default behaviour is to assume 64-bit independently on the configuration file name. The crucial part is CONFIG_64BIT option that used to be explicit. Let restore the latter option in order to unbreak 32-bit builds.

Quoted 6 lines

So exactly which build method broke due to this? The typical way to do a defconfig build is:

make ARCH=i386 defconfig

which still works fine AFAICS.

Maybe wrong way to do it, just plain "make i386_defconfig". I'm aware of ARCH=, but never needed to specify it for x86 targets.

Jarkko

#5 lore raw
In reply to Andy Shevchenko
Quoted 13 lines · Andy Shevchenko
Quoted 12 lines · Ingo Molnar
Quoted 6 lines · Andy Shevchenko

After the commit 1d0e12fd3a84 ("x86/defconfigs: Refresh defconfig files") 32-bit builds using defconfig become broken because on x86_64 build host with no ARCH provided the default behaviour is to assume 64-bit independently on the configuration file name. The crucial part is CONFIG_64BIT option that used to be explicit. Let restore the latter option in order to unbreak 32-bit builds.

So exactly which build method broke due to this? The typical way to do a defconfig build is:

Quoted 8 lines
Quoted 3 lines

make ARCH=i386 defconfig

which still works fine AFAICS.

uname => x86_64
make i386_defconfig

It was very convenient to not supply ARCH when build on multi-arch host.

Nice, TIL about the extended 'make *config' targets. :-)

Curiously, they aren't even mentioned in the 'configuration targets' section of 'make help' and are not discoverable unless you know their locations.

Anyway, your fix makes sense now to me too.

Do we need a similar for x86_64 defconfig, when built on 32-bit hosts? (not that anyone does that in practice, but just for completeness.)

Also, it would be nice if there was a way to annotate the defconfig for 'make savedefconfig' preserved these ARCH choices - it currently strips out all non-enabled options that match their default configuration value.

Thanks,

Ingo

#6 lore raw
Quoted 3 lines · Ingo Molnar
Quoted 2 lines · Andy Shevchenko
Quoted 1 line · Ingo Molnar

* Andy Shevchenko <[email protected]> wrote:

...

Quoted 5 lines
Quoted 4 lines

uname => x86_64
make i386_defconfig

It was very convenient to not supply ARCH when build on multi-arch host.

Quoted 7 lines

Nice, TIL about the extended 'make *config' targets. :-)

Curiously, they aren't even mentioned in the 'configuration targets' section of 'make help' and are not discoverable unless you know their locations.

Anyway, your fix makes sense now to me too.

I see you applied original patch from Daniel.

Quoted 2 lines

Do we need a similar for x86_64 defconfig, when built on 32-bit hosts? (not that anyone does that in practice, but just for completeness.)

I never heard about such use, I consider it more academic rather than practical.

Quoted 3 lines

Also, it would be nice if there was a way to annotate the defconfig for 'make savedefconfig' preserved these ARCH choices - it currently strips out all non-enabled options that match their default configuration value.

Hmm... Yes, perhaps it would be nice to have such an exception.

Signature · 2 lines
With Best Regards,
Andy Shevchenko