瀏覽代碼

build: Specify -ffunction-sections to improve linker's --gc-sections.

Keir Fraser 4 年之前
父節點
當前提交
e619d02480
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Rules.mk

+ 1 - 1
Rules.mk

@@ -22,7 +22,7 @@ FLAGS += -Wall -Werror -Wno-format -Wdeclaration-after-statement
 FLAGS += -Wstrict-prototypes -Wredundant-decls -Wnested-externs
 FLAGS += -fno-common -fno-exceptions -fno-strict-aliasing
 FLAGS += -mlittle-endian -mthumb -mfloat-abi=soft
-FLAGS += -Wno-unused-value
+FLAGS += -Wno-unused-value -ffunction-sections
 
 ifeq ($(stm32),f1)
 FLAGS += -mcpu=cortex-m3 -DSTM32F=1