#1152430 qt6-core: Add minimum alignment requirement for type tagged classes

Package:
src:qt6-base
Source:
src:qt6-base
Submitter:
Mattias Ellert
Date:
2026-10-29 08:29:01 UTC
Severity:
normal
Tags:
#1152430#5
Date:
2026-10-29 08:20:14 UTC
From:
To:
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

#1152430#10
Date:
2026-10-29 08:27:45 UTC
From:
To:
Hi Mattias,

Thanks a lot for working on this. FWIW, the alignment problem on m68k
is being tracked here:

https://wiki.debian.org/M68k/Alignment

I have been trying to switch the default alignment on m68k to 32 bits
for a while now, but so far there has always been resistance. Switching
the default alignment would be the proper and permanent fix which would
fix a lot of packages as you can see from the list.

Oh, I'll clean up disk space on mitchy today. Thanks for the reminder.

Adrian