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

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

On Tue, 2026-01-06 at 14:40 +0100, John Paul Adrian Glaubitz wrote:
> Hi Kolbj=C3=B8rn,
>=20
> 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 whi=
ch could be
> > >   used for identifying a Linux/m68k system using the 4 bytes alignmen=
t ABI
> > > - MIPS uses e_flags for differentiating its ABIs
> > > - PA-RISC sets e_ident to 0x03 (Linux) while every other arch uses 0x=
00 (SysV ABI)
> > > - qemu-user needs to be patched to deal with the changed alignment (i=
nclude/user/abitypes.h)
> > > - the kernel needs to be patched to deal with the changed alignment (=
arch/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
>=20
> I haven't created that patch yet as my work on this effort is currently p=
aused. However, it should
> be straight-forward to update the asserts in the kernel code.
>=20
> According to Geert, Arnd Bergmann made some changes to the kernel uapi th=
at would allow the kernel
> to be built with either alignment. Not sure what the current state of thi=
ngs is.
>=20
> Let's CC Arnd to find out.

FWIW, please feel free to amend this page [1] in the Debian Wiki if you stu=
mble across any problems.

Adrian

> [1] https://wiki.debian.org/M68k/Alignment

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