From 877b9fae6fa8f6dfc837b51d2bc758ddb34b1d9e Mon Sep 17 00:00:00 2001 From: Markus Hitter Date: Wed, 7 Dec 2016 11:21:13 +0100 Subject: [PATCH] ARM: turn on link time optimisation (LTO). Suggested by @Wurstnase. Apparently gcc got better, so it's actually an advantage now. Actually a pretty big advantage. While binary size decreases some 200 bytes, pulse length of the debug LED is a lot shorter (measured on the scope): without LTO: 4.59 us with LTO: 3.65 us That's a 25% performance increase by just turning on a flag! --- Makefile-ARM | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile-ARM b/Makefile-ARM index db85f90..7fc1279 100644 --- a/Makefile-ARM +++ b/Makefile-ARM @@ -107,7 +107,7 @@ endif CFLAGS += -Wall CFLAGS += -Wstrict-prototypes CFLAGS += -Os -#CFLAGS += -flto +CFLAGS += -flto CFLAGS += -ffunction-sections CFLAGS += -fdata-sections #CFLAGS += -dM -E # To list all predefined macros into the .o file.