Re: Question on BIGGEST_ALIGNMENT in GCC on NetBSD/m68k
On Fri, 2025-06-13 at 22:29 +0300, Eero Tamminen wrote:
> I think quite a bit more binaries than just Glibc are needed for Debian
> upgrade tooling to work, but OK.
I have already performed tests with 4 bytes alignment, same applies to
the Gentoo developers.
I assume you have done your tests as well so far? What are your results?
> As to other potential issues...
>
> I assume there are no m68k port packages with closed source executable
> code (FW) [1], like the other architectures (esp. x86) have & need, and
> that any code intended to work also on non-m68k platform, should be fine
> with 4-byte alignment.
>
> But what about m68k specific C/C++ and assembly code that may hard-code
> 2-byte alignment assumptions; is there any tooling to detect (potential)
> alignment issues in those?
Here's a list of almost 6000 software packages that build fine on m68k with
4 bytes alignment:
https://cdn.netbsd.org/pub/pkgsrc/packages/NetBSD/m68k/9.0_2023Q4/All/
> Or is the plan just to rely on packages' self-tests to reveal issues,
> and then track them down from there?
I will fix these problems as they occur meaning I will just do what I did
before with the 2 bytes alignment failures.
> [1] Are sources for "bootstra.tos" & "amiboot" anywhere, in case they
> need updates:
> https://wiki.debian.org/M68k/Installing
> https://people.debian.org/~wouter/d-i/images/20130502-06:51/tools/atari/
> https://people.debian.org/~wouter/d-i/images/20130502-06:51/tools/amiga/
> ?
I don't think these would need to be updated but this can be tested.
> >
> Are there any statistics on how many Debian packages do (still) include
> m68k assembly?
I don't expect anything outside glibc, the kernel and GCC to use assembly
on m68k. And even if, the fact that the NetBSD people don't have to patch
everything to work with 4 bytes shows that there is nothing to worry about.
I am planning to rebuild and test the whole archive first anyway before
actually making the switch. I'm also monitoring what the Gentoo folks are
doing.
> If that number is limited enough, it could help in getting other people
> to review the assembly code for potential alignment issues...
>
> Glibc is likely on top of that list (but also most likely to be
> alignment neutral):
> glibc$ find -name '*.S' | grep m68k | wc -l
> 25
>
> As *BSD already uses 4-byte alignment, I assume that for packages
> containing m68k assembly that do support / work also on *BSD in addition
> to Linux, m68k asm code used on both should work fine, and one needs to
> review only m68k asm that differs on Linux.
Exactly my point. It works on NetBSD, so I'm not worried about Linux.
Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer
`. `' Physicist
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
Reply to: