Skip to content

[cpullvm] Specify and require -munaligned-access for Arm/AArch64 variants that currently build with unaligned access (#389)#447

Open
Jonathon Penix (jonathonpenix) wants to merge 1 commit into
qualcomm:release/qualcomm-software/22.xfrom
jonathonpenix:pr/22_align
Open

[cpullvm] Specify and require -munaligned-access for Arm/AArch64 variants that currently build with unaligned access (#389)#447
Jonathon Penix (jonathonpenix) wants to merge 1 commit into
qualcomm:release/qualcomm-software/22.xfrom
jonathonpenix:pr/22_align

Conversation

@jonathonpenix

Copy link
Copy Markdown
Contributor

Requiring -munaligned-access for multilib should provide better build-time safeguards if people try using -mno-unaligned-access when they truly need it disabled.

If people require an aligned variant, we'll consider adding one in the future. And, if people want to mix and match (build with -mno-unaligned-access but match against a library built with -munaligned-access) they can still override multilib and point at the library variant manually.

At the same time, expicitly specify -munaligned-access for these configs in the compile flags. This should be NFC, but will hopefully make it more clear what our intent for these variants is and safeguard us from any unforseen changes in defaults, etc.

Note that this also shouldn't impact our musl configs where we specify -mstrict-align/-mno-unaligned-access via
EXTRA_MUSL-EMBEDDED_CFLAGS--those are used when building musl only and those flags are placed after the generic COMPILE_FLAGS so will override them.

As mentioned above, this should resolve #388
for now until we want to support aligned variants.

(Backported from 13fce8b)

…ants that currently build with unaligned access (qualcomm#389)

Requiring `-munaligned-access` for multilib should provide better build-time
safeguards if people try using `-mno-unaligned-access` when they truly need it
disabled.

If people require an aligned variant, we'll consider adding one in the future.
And, if people want to mix and match (build with `-mno-unaligned-access` but
match against a library built with `-munaligned-access`) they can still
override multilib and point at the library variant manually.

At the same time, expicitly specify `-munaligned-access` for these configs in
the compile flags. This should be NFC, but will hopefully make it more clear
what our intent for these variants is and safeguard us from any unforseen
changes in defaults, etc.

Note that this also shouldn't impact our musl configs where we specify
`-mstrict-align`/`-mno-unaligned-access` via
`EXTRA_MUSL-EMBEDDED_CFLAGS`--those are used when building musl *only* and
those flags are placed after the generic `COMPILE_FLAGS` so will override them.

As mentioned above, this should resolve qualcomm#388
for now until we want to support aligned variants.

(Backported from 13fce8b)

Signed-off-by: Jonathon Penix <jpenix@qti.qualcomm.com>
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.

1 participant