Skip to content

Conversation

@stratakis
Copy link
Contributor

@stratakis stratakis commented Oct 17, 2025

With LLVM >= 21.1.0 BOLT can handle computed gotos in PIC compiled code.

Check for the LLVM version during configure to determine if we can safely skip those functions.

This PR builds on top of #139840

…ed gotos, to BOLT skip list

When building with --with-lto, --enable-bolt and --enable-shared, GCC creates
optimized function clones with the suffix .lto_priv.0.

The sre_ucs*_match functions use computed gotos, which BOLT cannot
optimize, so their .lto_priv.0 clones must be skipped as well.

Static builds and Clang's LTO implementation are not affected.
…during BOLT runs

With LLVM >= 21.1.0 BOLT can handle computed gotos in PIC compiled code.

Check for the LLVM version during configure to determine if we can safely skip those functions.
@stratakis
Copy link
Contributor Author

stratakis commented Oct 20, 2025

With GCC when the -pack-relative-relocs linker flag is used, BOLT fails again on the same functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant