On Mon, Feb 27, 2023, at 17:50, Dmitry Rokosov wrote: > On Mon, Feb 27, 2023 at 05:38:49PM +0100, Neil Armstrong wrote: >> On 27/02/2023 17:15, Arnd Bergmann wrote: >> > On Mon, Feb 27, 2023, at 16:51, Dmitry Rokosov wrote: >> > >> > Most of these don't apply in userspace, so the incentive to >> > run smaller 32-bit userland on systems with less than 1GB of >> > RAM usually outweighs the benefits of 64-bit userspace. >> >> Thanks for the details! > > Looks like Thomas has already prepared a basic patch series for buildroot, > but maintainers declined it. > > https://lore.kernel.org/all/20220730194331.GA2515056@scaer/ I see. I know very little about buildroot, but it sounds like there are other ways of doing the same thing here. In general, this is pretty much an Arm specific problem. While you clearly want compat mode for small userland on any architecture but don't want 32-bit kernels, arm is the only one that has a different kernel "ARCH=" value and needs a separate gcc toolchain. If the problem is only the toolchain, an easy way out may be to use clang instead of gcc as your compiler, as a single clang binary can target both 32-bit userland and 64-bit kernel on all supported architectures. Arnd