The 2 least significant bits in pointers to QEventLoop, QThread and
QCoreApplication are used for type tagging. This requires a minimum
alignment of 4. Force the alignment to be at least 4 to support
architectures where the default alignment is smaller (m68k).
This fixes compilation errors on Debian for Motorola 68000 (m68k):
.../src/corelib/kernel/qeventloop.cpp:329:35: error: static assertion
failed
329 | static_assert(alignof(QEventLoop) >= 4);
| ~~~~~~~~~~~~~~~~~~~~^~~~
• the comparison reduces to ‘(2 >= 4)’
.../src/corelib/kernel/qeventloop.cpp:330:32: error: static assertion
failed
330 | static_assert(alignof(QThread) >= 4);
| ~~~~~~~~~~~~~~~~~^~~~
• the comparison reduces to ‘(2 >= 4)’
.../src/corelib/kernel/qeventloop.cpp:331:41: error: static assertion
failed
331 | static_assert(alignof(QCoreApplication) >= 4);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
• the comparison reduces to ‘(2 >= 4)’
My testbuild on the m68k porterbox mitchy.debian.net ran out of disk
space, but it successfully built the libQt6Core library before this
with the attached patch applied.
Mattias