Skip to content

Commit 71b9b04

Browse files
committed
arch/riscv: Use SPEED_OPTIMIZATIONS for GCC 14.3
GCC 14.3 has some compilation errors when using size optimizations, force the use of -O2 on risc-v. Signed-off-by: Keith Packard <keithp@keithp.com>
1 parent a68951b commit 71b9b04

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Kconfig.zephyr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,8 @@ choice COMPILER_OPTIMIZATIONS
491491
prompt "Optimization level"
492492
default NO_OPTIMIZATIONS if COVERAGE
493493
default DEBUG_OPTIMIZATIONS if DEBUG
494+
# gcc 14.3 -Os is broken on riscv. This setting should be in the SDK, it's here for testing
495+
default SPEED_OPTIMIZATIONS if "$(TOOLCHAIN_VARIANT_COMPILER)" = "gnu" && RISCV
494496
default SIZE_OPTIMIZATIONS_AGGRESSIVE if "$(TOOLCHAIN_VARIANT_COMPILER)" = "llvm"
495497
default SIZE_OPTIMIZATIONS
496498
help

0 commit comments

Comments
 (0)