From 6f8c18fc88d7f7b00677530c455f8a4d133e1691 Mon Sep 17 00:00:00 2001 From: Jonathan Rascher Date: Sat, 11 Jan 2020 17:14:17 -0600 Subject: [PATCH] Add Lily58 serial to LIB_SRC to avoid LTO issue This code is timing sensitive and seems to break with LTO enabled (at least on avr-gcc 8.3.0... it worked on older gcc versions). This is the same workaround as #7558 applied for the Helix. --- keyboards/lily58/rules.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/keyboards/lily58/rules.mk b/keyboards/lily58/rules.mk index af25531ecd5f..fce62532f533 100644 --- a/keyboards/lily58/rules.mk +++ b/keyboards/lily58/rules.mk @@ -36,6 +36,11 @@ SRC += i2c.c SRC += serial.c SRC += ssd1306.c +# A workaround until #7089 is merged. +# serial.c must not be compiled with the -lto option. +# The current LIB_SRC has a side effect with the -fno-lto option, so use it. +LIB_SRC += serial.c + # if firmware size over limit, try this option # CFLAGS += -flto