From 8723a6e78d5691c91dc25ef03ed8b1df3cf1cdc5 Mon Sep 17 00:00:00 2001 From: "S.J.R. van Schaik" Date: Fri, 29 Mar 2019 15:47:32 +0100 Subject: [PATCH] make: disable LTO as it discards the ISRs --- Makefile | 4 ++-- scripts/Makefile.stm32f1 | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index afcf237..3927016 100644 --- a/Makefile +++ b/Makefile @@ -20,8 +20,8 @@ CFLAGS += -Wredundant-decls -pedantic CFLAGS += -D_XOPEN_SOURCE CFLAGS += -std=c99 -CFLAGS += -Os -flto -LDFLAGS += -Os -flto +CFLAGS += -Os +LDFLAGS += -Os TEST_LIBS += -lcmocka diff --git a/scripts/Makefile.stm32f1 b/scripts/Makefile.stm32f1 index b9342ab..11115ad 100644 --- a/scripts/Makefile.stm32f1 +++ b/scripts/Makefile.stm32f1 @@ -2,9 +2,6 @@ PREFIX ?= arm-none-eabi- LDSCRIPT = support/stm32vl-discovery.ld -CFLAGS += -Os -LDFLAGS += -Os - CFLAGS += -fno-common --function-sections -fdata-sections LDFLAGS += -static -nostartfiles LDFLAGS += -Wl,--gc-sections