diff options
| author | Takeshi ISHII <2170248+mtei@users.noreply.github.com> | 2018-08-03 06:16:17 +0900 |
|---|---|---|
| committer | Drashna Jaelre <drashna@live.com> | 2018-08-02 14:16:17 -0700 |
| commit | b29799f8874a86d22b6eca4ce1352f394b276b7a (patch) | |
| tree | f3203f1ad68e9f0ea19844a5315f886e93ce79f1 | |
| parent | 0a005834624e9b3247bcd48fdc1790df8611ba86 (diff) | |
| download | qmk_firmware-b29799f8874a86d22b6eca4ce1352f394b276b7a.tar.gz qmk_firmware-b29799f8874a86d22b6eca4ce1352f394b276b7a.zip | |
Keyboard: fixed build break (size overflow) HelixPico with Backlight or Underglow (#3546)
* build break fix for HelixPico
* add customize variable 'Link_Time_Optimization' into rev2 and pico keymaps rules.mk
* "CFLAGS += -flto" change to "EXTRAFLAGS += -flto"
* add USE_Link_Time_Optimization macro
| -rw-r--r-- | keyboards/helix/config.h | 9 | ||||
| -rw-r--r-- | keyboards/helix/pico/keymaps/default/rules.mk | 14 | ||||
| -rw-r--r-- | keyboards/helix/rev2/keymaps/default/rules.mk | 5 | ||||
| -rw-r--r-- | keyboards/helix/rev2/keymaps/edvorakjp/rules.mk | 5 | ||||
| -rw-r--r-- | keyboards/helix/rev2/keymaps/five_rows/rules.mk | 5 | ||||
| -rw-r--r-- | keyboards/helix/rev2/keymaps/five_rows_jis/rules.mk | 5 | ||||
| -rw-r--r-- | keyboards/helix/rev2/keymaps/froggy/rules.mk | 5 | ||||
| -rw-r--r-- | keyboards/helix/rev2/keymaps/led_test/rules.mk | 5 |
8 files changed, 53 insertions, 0 deletions
diff --git a/keyboards/helix/config.h b/keyboards/helix/config.h index 7bd4d2645..fbfbd3280 100644 --- a/keyboards/helix/config.h +++ b/keyboards/helix/config.h | |||
| @@ -39,4 +39,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 39 | // ./tmk_core | 39 | // ./tmk_core |
| 40 | // ...... | 40 | // ...... |
| 41 | 41 | ||
| 42 | #ifdef USE_Link_Time_Optimization | ||
| 43 | // LTO has issues with macros (action_get_macro) and "functions" (fn_actions), | ||
| 44 | // so just disable them | ||
| 45 | #define NO_ACTION_MACRO | ||
| 46 | #define NO_ACTION_FUNCTION | ||
| 47 | |||
| 48 | #define DISABLE_LEADER | ||
| 49 | #endif // USE_Link_Time_Optimization | ||
| 50 | |||
| 42 | #endif /* CONFIG_H */ | 51 | #endif /* CONFIG_H */ |
diff --git a/keyboards/helix/pico/keymaps/default/rules.mk b/keyboards/helix/pico/keymaps/default/rules.mk index 18b1d596b..afb124068 100644 --- a/keyboards/helix/pico/keymaps/default/rules.mk +++ b/keyboards/helix/pico/keymaps/default/rules.mk | |||
| @@ -35,6 +35,7 @@ LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) | |||
| 35 | LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) | 35 | LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) |
| 36 | LED_ANIMATIONS = yes # LED animations | 36 | LED_ANIMATIONS = yes # LED animations |
| 37 | IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) | 37 | IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) |
| 38 | Link_Time_Optimization = no # if firmware size over limit, try this option | ||
| 38 | 39 | ||
| 39 | #### LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE. | 40 | #### LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE. |
| 40 | #### Do not enable these with audio at the same time. | 41 | #### Do not enable these with audio at the same time. |
| @@ -102,6 +103,19 @@ ifeq ($(strip $(LOCAL_GLCDFONT)), yes) | |||
| 102 | OPT_DEFS += -DLOCAL_GLCDFONT | 103 | OPT_DEFS += -DLOCAL_GLCDFONT |
| 103 | endif | 104 | endif |
| 104 | 105 | ||
| 106 | ifeq ($(strip $(AUDIO_ENABLE)),yes) | ||
| 107 | ifeq ($(strip $(RGBLIGHT_ENABLE)),yes) | ||
| 108 | Link_Time_Optimization = yes | ||
| 109 | endif | ||
| 110 | ifeq ($(strip $(OLED_ENABLE)),yes) | ||
| 111 | Link_Time_Optimization = yes | ||
| 112 | endif | ||
| 113 | endif | ||
| 114 | |||
| 115 | ifeq ($(strip $(Link_Time_Optimization)),yes) | ||
| 116 | EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization | ||
| 117 | endif | ||
| 118 | |||
| 105 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | 119 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE |
| 106 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | 120 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend |
| 107 | 121 | ||
diff --git a/keyboards/helix/rev2/keymaps/default/rules.mk b/keyboards/helix/rev2/keymaps/default/rules.mk index 4174a3045..5340a74ba 100644 --- a/keyboards/helix/rev2/keymaps/default/rules.mk +++ b/keyboards/helix/rev2/keymaps/default/rules.mk | |||
| @@ -36,6 +36,7 @@ LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) | |||
| 36 | LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) | 36 | LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) |
| 37 | LED_ANIMATIONS = yes # LED animations | 37 | LED_ANIMATIONS = yes # LED animations |
| 38 | IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) | 38 | IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) |
| 39 | Link_Time_Optimization = no # if firmware size over limit, try this option | ||
| 39 | 40 | ||
| 40 | #### LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE. | 41 | #### LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE. |
| 41 | #### Do not enable these with audio at the same time. | 42 | #### Do not enable these with audio at the same time. |
| @@ -110,6 +111,10 @@ ifeq ($(strip $(LOCAL_GLCDFONT)), yes) | |||
| 110 | OPT_DEFS += -DLOCAL_GLCDFONT | 111 | OPT_DEFS += -DLOCAL_GLCDFONT |
| 111 | endif | 112 | endif |
| 112 | 113 | ||
| 114 | ifeq ($(strip $(Link_Time_Optimization)),yes) | ||
| 115 | EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization | ||
| 116 | endif | ||
| 117 | |||
| 113 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | 118 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE |
| 114 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | 119 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend |
| 115 | 120 | ||
diff --git a/keyboards/helix/rev2/keymaps/edvorakjp/rules.mk b/keyboards/helix/rev2/keymaps/edvorakjp/rules.mk index d8fc35c48..67da9c370 100644 --- a/keyboards/helix/rev2/keymaps/edvorakjp/rules.mk +++ b/keyboards/helix/rev2/keymaps/edvorakjp/rules.mk | |||
| @@ -35,6 +35,7 @@ LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) | |||
| 35 | LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) | 35 | LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) |
| 36 | LED_ANIMATIONS = yes # LED animations | 36 | LED_ANIMATIONS = yes # LED animations |
| 37 | IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) | 37 | IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) |
| 38 | Link_Time_Optimization = no # if firmware size over limit, try this option | ||
| 38 | 39 | ||
| 39 | #### LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE. | 40 | #### LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE. |
| 40 | #### Do not enable these with audio at the same time. | 41 | #### Do not enable these with audio at the same time. |
| @@ -113,6 +114,10 @@ ifeq ($(strip $(LOCAL_GLCDFONT)), yes) | |||
| 113 | OPT_DEFS += -DLOCAL_GLCDFONT | 114 | OPT_DEFS += -DLOCAL_GLCDFONT |
| 114 | endif | 115 | endif |
| 115 | 116 | ||
| 117 | ifeq ($(strip $(Link_Time_Optimization)),yes) | ||
| 118 | EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization | ||
| 119 | endif | ||
| 120 | |||
| 116 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | 121 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE |
| 117 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | 122 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend |
| 118 | 123 | ||
diff --git a/keyboards/helix/rev2/keymaps/five_rows/rules.mk b/keyboards/helix/rev2/keymaps/five_rows/rules.mk index 53a00d8d4..402f855ae 100644 --- a/keyboards/helix/rev2/keymaps/five_rows/rules.mk +++ b/keyboards/helix/rev2/keymaps/five_rows/rules.mk | |||
| @@ -36,6 +36,7 @@ LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) | |||
| 36 | LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) | 36 | LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) |
| 37 | LED_ANIMATIONS = yes # LED animations | 37 | LED_ANIMATIONS = yes # LED animations |
| 38 | IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) | 38 | IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) |
| 39 | Link_Time_Optimization = no # if firmware size over limit, try this option | ||
| 39 | 40 | ||
| 40 | #### LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE. | 41 | #### LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE. |
| 41 | #### Do not enable these with audio at the same time. | 42 | #### Do not enable these with audio at the same time. |
| @@ -110,6 +111,10 @@ ifeq ($(strip $(LOCAL_GLCDFONT)), yes) | |||
| 110 | OPT_DEFS += -DLOCAL_GLCDFONT | 111 | OPT_DEFS += -DLOCAL_GLCDFONT |
| 111 | endif | 112 | endif |
| 112 | 113 | ||
| 114 | ifeq ($(strip $(Link_Time_Optimization)),yes) | ||
| 115 | EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization | ||
| 116 | endif | ||
| 117 | |||
| 113 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | 118 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE |
| 114 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | 119 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend |
| 115 | 120 | ||
diff --git a/keyboards/helix/rev2/keymaps/five_rows_jis/rules.mk b/keyboards/helix/rev2/keymaps/five_rows_jis/rules.mk index 4174a3045..5340a74ba 100644 --- a/keyboards/helix/rev2/keymaps/five_rows_jis/rules.mk +++ b/keyboards/helix/rev2/keymaps/five_rows_jis/rules.mk | |||
| @@ -36,6 +36,7 @@ LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) | |||
| 36 | LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) | 36 | LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) |
| 37 | LED_ANIMATIONS = yes # LED animations | 37 | LED_ANIMATIONS = yes # LED animations |
| 38 | IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) | 38 | IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) |
| 39 | Link_Time_Optimization = no # if firmware size over limit, try this option | ||
| 39 | 40 | ||
| 40 | #### LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE. | 41 | #### LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE. |
| 41 | #### Do not enable these with audio at the same time. | 42 | #### Do not enable these with audio at the same time. |
| @@ -110,6 +111,10 @@ ifeq ($(strip $(LOCAL_GLCDFONT)), yes) | |||
| 110 | OPT_DEFS += -DLOCAL_GLCDFONT | 111 | OPT_DEFS += -DLOCAL_GLCDFONT |
| 111 | endif | 112 | endif |
| 112 | 113 | ||
| 114 | ifeq ($(strip $(Link_Time_Optimization)),yes) | ||
| 115 | EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization | ||
| 116 | endif | ||
| 117 | |||
| 113 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | 118 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE |
| 114 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | 119 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend |
| 115 | 120 | ||
diff --git a/keyboards/helix/rev2/keymaps/froggy/rules.mk b/keyboards/helix/rev2/keymaps/froggy/rules.mk index 2052b8f4e..aa9796413 100644 --- a/keyboards/helix/rev2/keymaps/froggy/rules.mk +++ b/keyboards/helix/rev2/keymaps/froggy/rules.mk | |||
| @@ -36,6 +36,7 @@ LED_BACK_ENABLE = yes # LED backlight (Enable WS2812 RGB underlight.) | |||
| 36 | LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) | 36 | LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) |
| 37 | LED_ANIMATIONS = yes # LED animations | 37 | LED_ANIMATIONS = yes # LED animations |
| 38 | IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) | 38 | IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) |
| 39 | Link_Time_Optimization = no # if firmware size over limit, try this option | ||
| 39 | 40 | ||
| 40 | #### LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE. | 41 | #### LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE. |
| 41 | #### Do not enable these with audio at the same time. | 42 | #### Do not enable these with audio at the same time. |
| @@ -110,6 +111,10 @@ ifeq ($(strip $(LOCAL_GLCDFONT)), yes) | |||
| 110 | OPT_DEFS += -DLOCAL_GLCDFONT | 111 | OPT_DEFS += -DLOCAL_GLCDFONT |
| 111 | endif | 112 | endif |
| 112 | 113 | ||
| 114 | ifeq ($(strip $(Link_Time_Optimization)),yes) | ||
| 115 | EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization | ||
| 116 | endif | ||
| 117 | |||
| 113 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | 118 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE |
| 114 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | 119 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend |
| 115 | 120 | ||
diff --git a/keyboards/helix/rev2/keymaps/led_test/rules.mk b/keyboards/helix/rev2/keymaps/led_test/rules.mk index b3cd5ee42..c7ee75c36 100644 --- a/keyboards/helix/rev2/keymaps/led_test/rules.mk +++ b/keyboards/helix/rev2/keymaps/led_test/rules.mk | |||
| @@ -36,6 +36,7 @@ LED_BACK_ENABLE = yes # LED backlight (Enable WS2812 RGB underlight.) | |||
| 36 | LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) | 36 | LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) |
| 37 | LED_ANIMATIONS = yes # LED animations | 37 | LED_ANIMATIONS = yes # LED animations |
| 38 | IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) | 38 | IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) |
| 39 | Link_Time_Optimization = no # if firmware size over limit, try this option | ||
| 39 | 40 | ||
| 40 | #### LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE. | 41 | #### LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE. |
| 41 | #### Do not enable these with audio at the same time. | 42 | #### Do not enable these with audio at the same time. |
| @@ -110,6 +111,10 @@ ifeq ($(strip $(LOCAL_GLCDFONT)), yes) | |||
| 110 | OPT_DEFS += -DLOCAL_GLCDFONT | 111 | OPT_DEFS += -DLOCAL_GLCDFONT |
| 111 | endif | 112 | endif |
| 112 | 113 | ||
| 114 | ifeq ($(strip $(Link_Time_Optimization)),yes) | ||
| 115 | EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization | ||
| 116 | endif | ||
| 117 | |||
| 113 | SRC += led_test_init.c | 118 | SRC += led_test_init.c |
| 114 | 119 | ||
| 115 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | 120 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE |
