diff options
-rw-r--r-- | core/riscv-rv32i/build.mk | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/riscv-rv32i/build.mk b/core/riscv-rv32i/build.mk index a69e2ecafc..76a318a500 100644 --- a/core/riscv-rv32i/build.mk +++ b/core/riscv-rv32i/build.mk @@ -17,4 +17,9 @@ CFLAGS_CPU+=-march=rv32ima$(_FPU_EXTENSION)c -mabi=ilp32$(_FPU_EXTENSION) -Os LDFLAGS_EXTRA+=-mrelax LDFLAGS_EXTRA+=-static-libgcc -lgcc +ifneq ($(CONFIG_LTO),) +CFLAGS_CPU+=-flto +LDFLAGS_EXTRA+=-flto +endif + core-y=cpu.o init.o panic.o task.o switch.o __builtin.o math.o |