Skip to content

Update to gcc 15.3.Rel1 from 15.2.Rel1 - #11427

Merged
dhalbert merged 3 commits into
adafruit:mainfrom
dhalbert:gcc-15.3.rel1
Sep 19, 2026
Merged

dhalbert merged 3 commits into
adafruit:mainfrom
dhalbert:gcc-15.3.rel1

Conversation

@dhalbert

@dhalbert dhalbert commented Sep 19, 2026

Copy link
Copy Markdown
Collaborator

I did smoke tests on a few boards.

dhalbert and others added 2 commits September 19, 2026 12:09
gcc 15.3.Rel1 reports false `-Werror=array-bounds` errors in the inlined
`mbedtls_xor_no_simd()` in `gcm.c` and `aes.c` on RP2350 boards. Suppress it
for the vendored mbedtls objects only, as in adafruit#11283.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@dhalbert

Copy link
Copy Markdown
Collaborator Author

Claude wrote this:

Firmware size, gcc 15.3.Rel1 vs 15.2.Rel1

Compared against the main run for the base commit (1043a70), en_US builds, bytes of flash used. Broadcom and spresense don't report a flash region, so they are not included.

port boards median delta range
raspberrypi 160 -1456 -2056 to -56
mimxrt10xx 16 -880 -904 to -856
nordic 54 -800 -800 to +16
renode 1 -124 -124
analog 2 -76 -80 to -72
stm 24 -60 -912 to +24
silabs 3 -56 -56 to -48
atmel-samd 117 -4 -20 to +20
espressif, zephyr-cp, litex 285 0 0 (control, other toolchains)

Where the savings come from

An nm -S comparison of local 15.2 and 15.3 builds of raspberry_pi_pico_w, feather_nrf52840_express, teensy40 and feather_stm32f405_express shows no symbols added or removed and no data-section changes. The decreases appear to be improved optimization, concentrated in a few unrolled bit-manipulation loops:

  • On Cortex-M4 boards, common_hal_bitmaptools_readinto() shrinks from 1172 to 840 bytes.
  • On RP2040, common_hal_bitops_bit_transpose() shrinks from 1872 to 1052 bytes.
  • The rest is a tail of 10 to 66 byte reductions in jd_decomp(), mp_execute_bytecode(), gc_alloc(), mp_map_lookup(), mpz_mul_inpl() and similar.

This explains the bimodal nordic and stm results: boards without bitmaptools (internal-flash nordic boards, nucleo/discovery/pyboard stm boards) save only a few dozen bytes.

@dhalbert
dhalbert marked this pull request as ready for review September 19, 2026 17:22
Comment thread .devcontainer/cortex-m-toolchain.sh Outdated
@mikeysklar

Copy link
Copy Markdown
Collaborator

The devcontainer URL 404s: Arm moved 15.3 to gitlab.arm.com. The gcc action already uses the new location, so CI stays green. Suggestion inline.

Built the head with both compilers and ran six ARM boards (RP2040, RP2350, M4, M0, nRF52840, STM32F405). Output identical on every test. Timings within a couple of percent except the RP2 boards, where the interpreter loop moved 25% faster on the RP2040 and 9% slower on the RP2350, which looks like XIP cache placement rather than codegen. pico2_w reproduces #11283 at the first commit and builds at the head.

Co-authored-by: Mikey Sklar <mikeysklar@gmail.com>
@dhalbert
dhalbert requested a review from mikeysklar September 19, 2026 22:48

@mikeysklar mikeysklar left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Devcontainer URL downloads and extracts to the name the symlink expects. Six ARM boards ran identical output on both compilers, and pico2_w reproduces #11283 at the first commit and builds at the head.

@dhalbert
dhalbert merged commit 67c31ab into adafruit:main Sep 19, 2026
15 checks passed
@dhalbert
dhalbert deleted the gcc-15.3.rel1 branch September 19, 2026 22:56
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.

arm-none-eabi-gcc (Arm GNU Toolchain 15.3.Rel1 (Build arm-15.149))

2 participants