Skip to content

Explain the arm64 prefer-atomic gcov flag in the flags differential - #127

Merged
tamnd merged 1 commit into
mainfrom
flags-prefer-atomic
Oct 21, 2026
Merged

tamnd merged 1 commit into
mainfrom
flags-prefer-atomic

Conversation

@tamnd

@tamnd tamnd commented Oct 21, 2026

Copy link
Copy Markdown
Owner

The 7.2.8 arm64 allmodconfig census lists -fprofile-update=prefer-atomic in 1445 units built by rucc and none built by gcc. The kernel's Makefile adds the flag to CFLAGS_GCOV only when it brings in no undefined symbol that the build without it lacks. On arm64 gcc turns on -moutline-atomics by default, so its atomic counter add calls __aarch64_ldadd8_relax and the probe fails. rucc has no outline atomics and inlines the add, so the probe passes.

Before tamnd/rucc#3772 rucc also ignored the flag. Its counters are atomic adds now, which is what the kernel asks for, so the difference is only in which way each compiler does an atomic add. This adds a [[flags]] entry with that reason.

Part of #7.

@tamnd tamnd added the area/rk The rk command line label Oct 21, 2026
@tamnd
tamnd merged commit 66d92db into main Oct 21, 2026
1 check passed
@tamnd
tamnd deleted the flags-prefer-atomic branch October 21, 2026 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/rk The rk command line

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant