On Mon, 2024-10-28 at 04:07 +0100, Thorsten Glaser wrote: > On Sun, 27 Oct 2024, Arnd Bergmann wrote: > > On Sun, Oct 27, 2024, at 06:16, Finn Thain wrote: > > > > Right. And I don't think the problem is going to go away. One solution > > > that is sometimes raised is better tooling. I'm not sure how that would > > No. You don’t understand the problem: applications are being > written that require natural alignment for at least 32-bit and > smaller quantities, some possibly for all quantities even. We > need these applications to work, and we cannot redesign them > (it’s common for them to store flags in the lowest pointer bits > and do other awful things).
Yep, that's exactly the problem. Plus, the maintainers of 99% of the upstream projects don't care about the alignment peculiarities of the Linux/m68k port. > Could you please, if you cannot believe it yourself, accept the > word of those actually doing the porting that it is direly needed > in the current Linux ecosystem. Thank you. Agreed 100%. > > > > That struct is just 12 bytes for you then? > > > > > > Right. i686 and m68k agree on that. > > > > The other ones that have misaligned 'long long' variables are > > > > arc > > arm (OABI only) > > csky > > microblaze > > nios2 > > openrisc > > superh > > i386 > > Okaaay. So, all “old” platforms or with low distro support. > For Debian, we have superh and i386, out of these. It is > entirely possible that Qt et al. can work with this, but > these all have natural alignment for quantities ≤ 32 bits. I'm not aware of any serious issues with alignment on i386. i386 was the original target for 90% of the software in Debian, so if there are issues, developers have already addressed them. > Does Gentoo support more of them? Debian used to have arm > OABI, but that’s ages ago. I know things like OpenADK support > them, but that is very chiefly embedded. Currently, Gentoo supports i386 out of that list. > > The 32-bit architectures that use a natural 8-byte > > alignment are > > > > arm (EABI) > > parisc > > mips > > powerpc > > riscv > > s390 > > sparc > > xtensa > > That’s majoritily represented in Debian. And ideally, we’d > use that for all new architectures. > > I have a feeling that GCC’s -malign-int will only push us > into the former. I have no idea whether it’s feasible to > also change GCC for this; that will probably depend on both > the other “what parts of the toolchain need changing” and > whether GCC can be switched with little effort. Did you see how Chewi implemented 32-bit alignment? He actually didn't use -malign-int but directly patched GCC itself, see: > https://marc.info/?l=glibc-help&m=169303990426196&w=2 Adrian -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer `. `' Physicist `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913