Re: Question on BIGGEST_ALIGNMENT in GCC on NetBSD/m68k

Eero Tamminen <[email protected]> Fri, 13 Jun 2025 22:29:17 +0300
Newsgroups gmane.linux.ports.m68k,gmane.os.netbsd.ports.m68k,gmane.linux.debian.ports.68k
Message-ID <[email protected]>
Hi,

On 13.6.2025 17.53, John Paul Adrian Glaubitz wrote:
> On Fri, 2025-06-13 at 17:15 +0300, Eero Tamminen wrote:
>> Wouldn't next upgrade completely break user's Debian system so it needs
>> complete re-install?
> 
> You would need to extract the glibc package manually from my tests. After that,
> upgrading the system should be possible.

I think quite a bit more binaries than just Glibc are needed for Debian 
upgrade tooling to work, but OK.

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?

Or is the plan just to rely on packages' self-tests to reveal issues, 
and then track them down from there?


[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/
?


>> If true, would separate m68k arch for 4-byte alignment be out of
>> question, similarly how there have been different ARM arch variants?
> 
> Creating a separate arch would mean patching various parts of Debian which
> again would involve a lot of work which I don't think is worth the effort.
...
> That's why I want to make a hard cut and not invest months of work when the
> userbase consists of just a few people.

Ok, fair enough.

Are there any statistics on how many Debian packages do (still) include 
m68k assembly?

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.

(I'm thinking of acceleration code, not syscall bindings, those I guess 
to differ anyway between the OSes.)


	- Eero