Skip to content

Reject explicit Cortex-A53 workaround flags with BOLT - #47

Draft
zaniebot wants to merge 1 commit into
mainfrom
bolt-cortex-a53-guard
Draft

zaniebot wants to merge 1 commit into
mainfrom
bolt-cortex-a53-guard

Conversation

@zaniebot

@zaniebot zaniebot commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Recent BOLT versions reject AArch64 binaries containing Cortex-A53 erratum 843419 workaround veneers by default. Report an earlier error from configure --enable-bolt when build flags explicitly request the workaround. The check only inspects explicit flags because recent BOLT already diagnoses veneers produced by compiler defaults.

Document that BOLT output must not run on affected processors and how to override GCC's default workaround with LDFLAGS_NODIST="-mno-fix-cortex-a53-843419" for builds confined to unaffected hardware. Explicit enabling flags must be removed separately.

Comment thread configure.ac Outdated
Comment on lines +2230 to +2236
AC_MSG_ERROR([--enable-bolt is incompatible with the Cortex-A53 erratum 843419 workaround.
BOLT does not preserve protection against this erratum. Its output must not run
on affected Cortex-A53 processors, including during the build.
If the generated binaries will never run on affected processors, disable the
workaround explicitly. With GCC, configure with
LDFLAGS_NODIST="-mno-fix-cortex-a53-843419". Also remove any explicit
-Wl,--fix-cortex-a53-843419 linker flags.])

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to explain something like

--enable-bolt is incompatible with the Cortex-A53 erratum 843419 workaround.
With GCC, configure with LDFLAGS_NODIST="-mno-fix-cortex-a53-843419". 
Also remove any explicit -Wl,--fix-cortex-a53-843419 linker flags.
See: https://github.com/llvm/llvm-project/pull/187955

Comment thread Doc/using/configure.rst
BOLT versions before LLVM 16 are known to crash BOLT under some scenarios.
Use of LLVM 16 or newer for BOLT optimization is strongly encouraged.

BOLT does not preserve protection against Cortex-A53 erratum 843419. Binaries

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me this part.

Comment thread configure.ac Outdated
], [], [-Werror])
# Compiler drivers may enable the workaround without an explicit build flag.
# Inspect the linker command so that compiler defaults are checked as well.
AS_CASE([$host_cpu], [aarch64*|arm64], [

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zaniebot
zaniebot force-pushed the bolt-cortex-a53-guard branch from 8c78b93 to dd08538 Compare October 22, 2026 19:05
@zaniebot
zaniebot changed the base branch from pr-160122-base to main October 22, 2026 19:05
@zaniebot zaniebot changed the title Reject BOLT configuration with the Cortex-A53 erratum workaround Reject explicit Cortex-A53 workaround flags with BOLT Oct 22, 2026
Comment thread configure.ac Resolved
@zanieb
zanieb force-pushed the bolt-cortex-a53-guard branch from 9a0411e to edff69c Compare October 22, 2026 20:18
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.

3 participants