diff options
Diffstat (limited to 'core/nds32/build.mk')
-rw-r--r-- | core/nds32/build.mk | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/nds32/build.mk b/core/nds32/build.mk index aee656ef93..db2a52d1b1 100644 --- a/core/nds32/build.mk +++ b/core/nds32/build.mk @@ -15,5 +15,10 @@ $(call set-option,CROSS_COMPILE,$(CROSS_COMPILE_nds32),$(NDS32_DEFAULT_COMPILE)) # CPU specific compilation flags CFLAGS_CPU+=-march=v3m -Os +ifneq ($(CONFIG_LTO),) +CFLAGS_CPU+=-flto +LDFLAGS_EXTRA+=-flto +endif + core-y=cpu.o init.o panic.o task.o switch.o __muldi3.o math.o __builtin.o core-$(CONFIG_FPU)+=__libsoftfpu.o |