This commit is contained in:
Edward Emelianov
2023-01-11 21:19:18 +03:00
parent a5e420ac51
commit e98aa11f72
29 changed files with 54 additions and 46 deletions

View File

@@ -60,7 +60,7 @@ LIB_DIR := $(INC_DIR)/ld
CFLAGS += -g -gdwarf-2 # debuggin symbols in listing
CFLAGS += -O2 -D__thumb2__=1 -MD
CFLAGS += -Wall -Werror -Wextra -Wshadow
CFLAGS += -fshort-enums -ffunction-sections -fdata-sections
CFLAGS += -fshort-enums -ffunction-sections -fdata-sections -flto
#CFLAGS += -fno-common -ffunction-sections -fdata-sections -fno-stack-protector
CFLAGS += $(ARCH_FLAGS)
@@ -68,7 +68,7 @@ CFLAGS += $(ARCH_FLAGS)
# Linker flags
#LDFLAGS += -nostartfiles --static -nostdlib -specs=nosys.specs -specs=nano.specs
LDFLAGS += $(ARCH_FLAGS)
LDFLAGS += -specs=nano.specs -specs=nosys.specs
LDFLAGS += -specs=nano.specs -flto
LDFLAGS += -L$(LIB_DIR)
#-L$(TOOLCHLIB)
LDFLAGS += -T$(LDSCRIPT)

Binary file not shown.