Re: Preliminary results - was: Re: Question on BIGGEST_ALIGNMENT in GCC on NetBSD/m68k

John Paul Adrian Glaubitz <[email protected]> Tue, 06 Jan 2026 14:40:33 +0100
Newsgroups gmane.linux.debian.ports.68k,gmane.os.netbsd.ports.m68k,gmane.linux.ports.m68k
Message-ID <9277b6ef0478bc6651c03b4220004a4c8a2e1cdb.camel@physik.fu-berlin.de>
Hi Kolbj=C3=B8rn,

On Tue, 2026-01-06 at 14:34 +0100, Kolbj=C3=B8rn Barmen wrote:
> On Mon, 16 Jun 2025, John Paul Adrian Glaubitz wrote:
>=20
> > To summarize:
> >=20
> > - the ELF header provides provides the e_ident and e_flags fields which=
 could be
> >   used for identifying a Linux/m68k system using the 4 bytes alignment =
ABI
> > - MIPS uses e_flags for differentiating its ABIs
> > - PA-RISC sets e_ident to 0x03 (Linux) while every other arch uses 0x00=
 (SysV ABI)
> > - qemu-user needs to be patched to deal with the changed alignment (inc=
lude/user/abitypes.h)
> > - the kernel needs to be patched to deal with the changed alignment (ar=
ch/m68k/kernel/signal.c)
>=20
>=20
> Does this patch exist somewhere? I ask because I am migrating to
> 32bit-aligned userland (https://www.gentoo.org/downloads/#m68k) and the
> gcc provided fails building kernel, stopping at arch/m68k/kernel/signal.c

I haven't created that patch yet as my work on this effort is currently pau=
sed. However, it should
be straight-forward to update the asserts in the kernel code.

According to Geert, Arnd Bergmann made some changes to the kernel uapi that=
 would allow the kernel
to be built with either alignment. Not sure what the current state of thing=
s is.

Let's CC Arnd to find out.

Adrian

--=20
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913