Skip to content

Commit

Permalink
Add Lily58 serial to LIB_SRC to avoid LTO issue (qmk#7868)
Browse files Browse the repository at this point in the history
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 qmk#7558 applied for the Helix.
  • Loading branch information
bcat authored and zvecr committed Jan 12, 2020
1 parent 8b9d4fd commit 08cd996
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions keyboards/lily58/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 08cd996

Please sign in to comment.