On 8 February 2026 at 18:27, Peter Michael Green wrote:
|
| On 08/02/2026 13:03, Dirk Eddelbuettel wrote:
| > /tmp/ccTWsmvQ.s: Assembler messages:
| > /tmp/ccTWsmvQ.s:1735: Error: thumb conditional instruction should be in IT
block -- `addcs r9,r9,#65536'
| > /tmp/ccTWsmvQ.s:1750: Error: thumb conditional instruction should be in IT
block -- `addcs r8,r8,#65536'
| > /tmp/ccTWsmvQ.s:1785: Error: thumb conditional instruction should be in IT
block -- `addcs r8,r8,#65536'
| > /tmp/ccTWsmvQ.s:1817: Error: thumb conditional instruction should be in IT
block -- `addcs lr,lr,#65536'
| 32-bit arm cores can operate in two modes, "arm mode" and "thumb mode".
| Debian armhf defaults to thumb mode, and it's architecture baseline includes
| thumb version 2 (thumb2 for short).
|
| "arm mode" uses 32-bit fixed-width instructions, while thumb2 uses a
| mixed-width
| encoding where some instructions are 16-bit and others are 32-bit. This
| increases
| code density on average, but there is a compromise, condition codes are
| no longer
| encoded directly in the instruction encoding, instead conditional
| instructions must
| be preceded by an "IT" instruction. One IT instruction can cover conditional
| execution of up to four following instructions.
|
| There is an assembler flag "-mimplicit-it=thumb", which makes the assembler
| automatically insert IT instructions, this flag can be passed to the
| assmebler
| via the compiler using "-Wa,-mimplicit-it=thumb"
|
| version 2.0a-16 of sprng passed this flag on armhf, version 2.0a-17 did not
| because the conditional logic intended to pass it was broken.
That was in response to #1124903 (see [1]). If you can take a look and tell
me how to satisfy both its impetus of honouring default hardening flags and
also correctly pick armhf I would appreciate it.
I am confused by your earlier
1. Checking the "host" arch (arch you are building for) not the "build" arch
(arch you are building on) is generally what you want for compiler flags.
2. DEB_{BUILD|HOST}_ARCH_CPU on armhf is "arm" not "armhf".
Can you clarify that
a) reverting to HOST as I had up to -16 (and my bad for reverting)
b) checking against "arm" not "armhf" (though I am near certain we had in the
past different identifiers for arm flavours ...)
will get me out of this pickle? I can then append to string with the
hardening entry.
Much appreciated the diligent attention here.
Dirk
[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1124903
|
|
--
dirk.eddelbuettel.com | @eddelbuettel | [email protected]