Skip to content

fix error in GCC bswap#649

Open
daverodgman wants to merge 1 commit intoMbed-TLS:developmentfrom
daverodgman:gcc_bswap_fix
Open

fix error in GCC bswap#649
daverodgman wants to merge 1 commit intoMbed-TLS:developmentfrom
daverodgman:gcc_bswap_fix

Conversation

@daverodgman
Copy link
Contributor

@daverodgman daverodgman commented Jan 12, 2026

Description

The gcc detection for some reason depended on __GNUC_PREREQ, which was undefined (AIUI it comes from a header which isn't included here). Replace with MBEDTLS_GCC_VERSION.

Presumably size & performance-affecting (I haven't properly measured, but observed eg 17% improvement from this patch in benchmark ctr_drbg) but not a functional change.

PR checklist

Please remove the segment/s on either side of the | symbol as appropriate, and add any relevant link/s to the end of the line.
If the provided content is part of the present PR remove the # symbol.

  • changelog not required because: no functional change
  • framework PR not affected
  • mbedtls development PR this PR
  • mbedtls 3.6 PR not provided but probably should backport
  • tests not required because: already tested / no functional change

Signed-off-by: Dave Rodgman <[email protected]>
Copy link
Contributor

@gilles-peskine-arm gilles-peskine-arm left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM with some very casual look at Godbolt

@gilles-peskine-arm gilles-peskine-arm added needs-review Every commit must be reviewed by at least two team members needs-reviewer This PR needs someone to pick it up for review priority-medium Medium priority - this can be reviewed as time permits size-xs Estimated task size: extra small (a few hours at most) labels Jan 13, 2026
@gilles-peskine-arm gilles-peskine-arm moved this to Triage in in Community Jan 13, 2026
@gilles-peskine-arm gilles-peskine-arm moved this from Triage in to Scoped in Community Jan 13, 2026
@daverodgman daverodgman mentioned this pull request Jan 18, 2026
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-review Every commit must be reviewed by at least two team members needs-reviewer This PR needs someone to pick it up for review priority-medium Medium priority - this can be reviewed as time permits size-xs Estimated task size: extra small (a few hours at most)

Projects

Status: Scoped

Development

Successfully merging this pull request may close these issues.

2 participants