Hello!
On 2/22/21 12:30 PM, Victor Stinner wrote:
The thing is you made assumptions about how downstream distributions use Python without doing some research first ("16-bit m68k-linux").
I'm talking about 16-bit memory alignment which causes SIGBUS if it's not respected on m68k. For example, unicodeobject.c requires special code just for this arch:
/* * Issue #17237: m68k is a bit different from most architectures in * that objects do not use "natural alignment" - for example, int and * long are only aligned at 2-byte boundaries. Therefore the assert() * won't work; also, tests have shown that skipping the "optimised * version" will even speed up m68k. */
#if !defined(__m68k__) (...)
Such issue is hard to guess when you write code and usually only spot it while actually running the code on such architecture.
Just as a heads-up: There is a PR by Jessica Clarke now [1] which gets rid of this architecture-specific #ifdef. I think this is a good approach as it gets rid of one of your complaining points.
I have already verified that these changes don't break on 32-bit PowerPC, 64-bit SPARC and, of course, M68k.
Thanks, Adrian