Skip to content

[cpullvm] Add armv7m -mfpu=fpv5-d16 hard float variant#352

Merged
jonathonpenix merged 8 commits into
qualcomm:release/qualcomm-software/22.xfrom
jonathonpenix:pr/armv7_hf_22
May 21, 2026
Merged

[cpullvm] Add armv7m -mfpu=fpv5-d16 hard float variant#352
jonathonpenix merged 8 commits into
qualcomm:release/qualcomm-software/22.xfrom
jonathonpenix:pr/armv7_hf_22

Conversation

@jonathonpenix
Copy link
Copy Markdown
Contributor

@jonathonpenix jonathonpenix commented May 11, 2026

The intention here is to offer a variant for Cortex M7 users with fpv5-d16 enabled.

There's a few misc. things to note here:

  • The normalized triple clang uses when -mcpu=cortex-m7 is used is actually along the lines of thumbv7em* rather than the thumb7m we use here. Our multilib.yaml.in has mappings for these which we inherited from ATfE. So, align with what their configs seem to do and stick with thumbv7m.
  • Picolibc is the only libc we want to support for this variant--a musl-embedded variant is intentionally omitted as we're moving away from musl-embedded.
  • This variant is built without PIC support. The relevant user isn't using PIC and we've had issues with PIC + eld + Zephyr in the past for 32bit Arm targets (see [cpullvm] Add additional variants for testing Zephyr #309) so let's default towards nopic.
  • We build our other armv7m configurations with -mno-unaligned-access (and we don't have both aligned and unaligned variants like ATfE). But, the relevant user build here is resolving to -munaligned-access so I'm not going to force -mno-unaligned-access in the library build unless we have a particular need.

The intention here is to offer a variant for Cortex M7 users with fpv5-d16
enabled.

There's a few misc. things to note here:
- The normalized triple clang uses when `-mcpu=cortex-m7` is used is
  actually along the lines of `thumbv7em*` rather than the `thumb7m` we use
  here. Our `multilib.yaml.in` has mappings for these which we inherited
  from ATfE. So, align with what their configs seem to do and stick with
  thumbv7m.
- Picolibc is the only libc we want to support for this variant--a
  musl-embedded variant is intentionally omitted as we're moving away from
  musl-embedded.
- This variant is built with PIC in keeping with our other 32bit Arm
  variants (where the nopic ones were late/special additions).
- We build our other armv7m configurations with `-mno-unaligned-access`
  (and we don't have both aligned and unaligned variants like ATfE). I'm
  following suit here under the assumption it is a safe default, though
  I'm not entirely clear what is supported for our user.

Signed-off-by: Jonathon Penix <jpenix@qti.qualcomm.com>
@jonathonpenix jonathonpenix marked this pull request as draft May 11, 2026 23:29
Discussing with Ana, sounds like we know that the user isn't using PIC and
we've had issues with 32bit Arm fPIC variants + Zephyr + eld in the past
(see qualcomm#309).

So let's make this nopic

Signed-off-by: Jonathon Penix <jpenix@qti.qualcomm.com>
Discussing with Ana, the relevant build is resolving to -munaligned-access.
So don't force -mno-unaligned-access for the variant

Signed-off-by: Jonathon Penix <jpenix@qti.qualcomm.com>
Signed-off-by: Jonathon Penix <jpenix@qti.qualcomm.com>
Signed-off-by: Jonathon Penix <jpenix@qti.qualcomm.com>
Signed-off-by: Jonathon Penix <jpenix@qti.qualcomm.com>
Signed-off-by: Jonathon Penix <jpenix@qti.qualcomm.com>
@jonathonpenix jonathonpenix marked this pull request as ready for review May 18, 2026 22:27
@jonathonpenix
Copy link
Copy Markdown
Contributor Author

jonathonpenix commented May 18, 2026

Version of #351 in the 22.x branch

@jonathonpenix jonathonpenix requested a review from apazos May 18, 2026 22:28
Signed-off-by: Jonathon Penix <jpenix@qti.qualcomm.com>
@jonathonpenix jonathonpenix merged commit e0b5a4f into qualcomm:release/qualcomm-software/22.x May 21, 2026
8 checks passed
@jonathonpenix jonathonpenix deleted the pr/armv7_hf_22 branch May 21, 2026 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants