summaryrefslogtreecommitdiff
path: root/ports/litex/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'ports/litex/Makefile')
-rw-r--r--ports/litex/Makefile8
1 files changed, 4 insertions, 4 deletions
diff --git a/ports/litex/Makefile b/ports/litex/Makefile
index 6f083e5d4..612953daa 100644
--- a/ports/litex/Makefile
+++ b/ports/litex/Makefile
@@ -77,16 +77,16 @@ ifeq ($(DEBUG), 1)
CFLAGS += -ggdb
# You may want to enable these flags to make setting breakpoints easier.
CFLAGS += -fno-inline -fno-ipa-sra
+ OPTIMIZATION_FLAGS ?= -Og
else
- CFLAGS += -Os -DNDEBUG -ggdb3
+ CFLAGS += -DNDEBUG -ggdb3
+ OPTIMIZATION_FLAGS ?= -O2
# TODO: Test with -flto
### CFLAGS += -flto
endif
# option to override compiler optimization level, set in boards/$(BOARD)/mpconfigboard.mk
-ifdef OPTIMIZATION_LEVEL
-CFLAGS += -O$(OPTIMIZATION_LEVEL)
-endif
+CFLAGS += $(OPTIMIZATION_FLAGS)
CFLAGS += $(INC) -Werror -Wall -std=gnu11 -nostdlib -fshort-enums $(BASE_CFLAGS) $(C_DEFS) $(CFLAGS_MOD) $(COPT)