aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--keyboards/hub20/config.h6
-rw-r--r--keyboards/latin17rgb/config.h6
-rw-r--r--keyboards/latin6rgb/config.h6
-rw-r--r--keyboards/smallkeyboard/config.h6
-rw-r--r--keyboards/thevankeyboards/minivan/keymaps/josjoha/config.h4
-rw-r--r--tmk_core/common.mk12
-rw-r--r--tmk_core/rules.mk9
7 files changed, 19 insertions, 30 deletions
diff --git a/keyboards/hub20/config.h b/keyboards/hub20/config.h
index f8e5d6be8..fa78db3d9 100644
--- a/keyboards/hub20/config.h
+++ b/keyboards/hub20/config.h
@@ -108,7 +108,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
108#define LOCKING_RESYNC_ENABLE 108#define LOCKING_RESYNC_ENABLE
109 109
110/* disable these deprecated features by default */ 110/* disable these deprecated features by default */
111#ifndef LINK_TIME_OPTIMIZATION_ENABLE 111#define NO_ACTION_MACRO
112 #define NO_ACTION_MACRO 112#define NO_ACTION_FUNCTION
113 #define NO_ACTION_FUNCTION
114#endif
diff --git a/keyboards/latin17rgb/config.h b/keyboards/latin17rgb/config.h
index 6a7ea8e78..1f52f9a65 100644
--- a/keyboards/latin17rgb/config.h
+++ b/keyboards/latin17rgb/config.h
@@ -49,10 +49,8 @@
49#define DEBOUNCE 3 49#define DEBOUNCE 3
50 50
51/* disable these deprecated features by default */ 51/* disable these deprecated features by default */
52//#ifndef LINK_TIME_OPTIMIZATION_ENABLE 52//#define NO_ACTION_MACRO
53//# define NO_ACTION_MACRO 53//#define NO_ACTION_FUNCTION
54//# define NO_ACTION_FUNCTION
55//#endif
56 54
57#ifdef RGB_MATRIX_ENABLE 55#ifdef RGB_MATRIX_ENABLE
58# define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects 56# define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
diff --git a/keyboards/latin6rgb/config.h b/keyboards/latin6rgb/config.h
index fa9abbea6..b356ded81 100644
--- a/keyboards/latin6rgb/config.h
+++ b/keyboards/latin6rgb/config.h
@@ -50,10 +50,8 @@
50#define DEBOUNCE 3 50#define DEBOUNCE 3
51 51
52/* disable these deprecated features by default */ 52/* disable these deprecated features by default */
53//#ifndef LINK_TIME_OPTIMIZATION_ENABLE 53//#define NO_ACTION_MACRO
54//# define NO_ACTION_MACRO 54//#define NO_ACTION_FUNCTION
55//# define NO_ACTION_FUNCTION
56//#endif
57 55
58#ifdef RGB_MATRIX_ENABLE 56#ifdef RGB_MATRIX_ENABLE
59# define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects 57# define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
diff --git a/keyboards/smallkeyboard/config.h b/keyboards/smallkeyboard/config.h
index 24c81258c..a343d767f 100644
--- a/keyboards/smallkeyboard/config.h
+++ b/keyboards/smallkeyboard/config.h
@@ -50,10 +50,8 @@
50#define DEBOUNCE 3 50#define DEBOUNCE 3
51 51
52/* disable these deprecated features by default */ 52/* disable these deprecated features by default */
53//#ifndef LINK_TIME_OPTIMIZATION_ENABLE 53//#define NO_ACTION_MACRO
54//# define NO_ACTION_MACRO 54//#define NO_ACTION_FUNCTION
55//# define NO_ACTION_FUNCTION
56//#endif
57 55
58#ifdef RGB_MATRIX_ENABLE 56#ifdef RGB_MATRIX_ENABLE
59# define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects 57# define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
diff --git a/keyboards/thevankeyboards/minivan/keymaps/josjoha/config.h b/keyboards/thevankeyboards/minivan/keymaps/josjoha/config.h
index 809842278..9db4d596d 100644
--- a/keyboards/thevankeyboards/minivan/keymaps/josjoha/config.h
+++ b/keyboards/thevankeyboards/minivan/keymaps/josjoha/config.h
@@ -24,7 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
24// place overrides here 24// place overrides here
25 25
26// Some defines meant to decrease the firmware size. The firmware is otherwise over the maximum (atmega32u4) 26// Some defines meant to decrease the firmware size. The firmware is otherwise over the maximum (atmega32u4)
27//# ifndef LINK_TIME_OPTIMIZATION_ENABLE 27//# ifndef LTO_ENABLE
28 //Disable old style macro handling: MACRO() & action_get_macro 28 //Disable old style macro handling: MACRO() & action_get_macro
29//# define NO_ACTION_MACRO // This saves 320 bytes 29//# define NO_ACTION_MACRO // This saves 320 bytes
30 //disable calling of action_function() from the fn_actions array (deprecated) 30 //disable calling of action_function() from the fn_actions array (deprecated)
@@ -40,7 +40,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
40 40
41 41
42// Attempts to reduce firmware size: 42// Attempts to reduce firmware size:
43 //#define LINK_TIME_OPTIMIZATION_ENABLE // Did not decrease firmware size when tested on 26 Jan 2020 43 //#define LTO_ENABLE // Did not decrease firmware size when tested on 26 Jan 2020
44 //#define NO_DEBUG //disable debugging (already defined) 44 //#define NO_DEBUG //disable debugging (already defined)
45 //#define NO_PRINT JJdisable printing/debugging using hid_listen (already defined) 45 //#define NO_PRINT JJdisable printing/debugging using hid_listen (already defined)
46 //#define NO_ACTION_LAYER //disable layers (obviously need layers) 46 //#define NO_ACTION_LAYER //disable layers (obviously need layers)
diff --git a/tmk_core/common.mk b/tmk_core/common.mk
index f0faa2dc3..ce335f0d3 100644
--- a/tmk_core/common.mk
+++ b/tmk_core/common.mk
@@ -100,18 +100,6 @@ ifeq ($(strip $(SHARED_EP_ENABLE)), yes)
100 TMK_COMMON_DEFS += -DSHARED_EP_ENABLE 100 TMK_COMMON_DEFS += -DSHARED_EP_ENABLE
101endif 101endif
102 102
103ifeq ($(strip $(LTO_ENABLE)), yes)
104 ifeq ($(PLATFORM),CHIBIOS)
105 $(info Enabling LTO on ChibiOS-targeting boards is known to have a high likelihood of failure.)
106 $(info If unsure, set LTO_ENABLE = no.)
107 endif
108 EXTRAFLAGS += -flto
109 TMK_COMMON_DEFS += -DLTO_ENABLE
110 TMK_COMMON_DEFS += -DLINK_TIME_OPTIMIZATON_ENABLE
111else ifdef LINK_TIME_OPTIMIZATION_ENABLE
112 $(error The LINK_TIME_OPTIMIZATION_ENABLE flag has been renamed to LTO_ENABLE.)
113endif
114
115# Search Path 103# Search Path
116VPATH += $(TMK_PATH)/$(COMMON_DIR) 104VPATH += $(TMK_PATH)/$(COMMON_DIR)
117VPATH += $(TMK_PATH)/$(PLATFORM_COMMON_DIR) 105VPATH += $(TMK_PATH)/$(PLATFORM_COMMON_DIR)
diff --git a/tmk_core/rules.mk b/tmk_core/rules.mk
index 56a331e28..b17f85d37 100644
--- a/tmk_core/rules.mk
+++ b/tmk_core/rules.mk
@@ -82,6 +82,15 @@ endif
82# -Wall...: warning level 82# -Wall...: warning level
83# -Wa,...: tell GCC to pass this to the assembler. 83# -Wa,...: tell GCC to pass this to the assembler.
84# -adhlns...: create assembler listing 84# -adhlns...: create assembler listing
85ifeq ($(strip $(LTO_ENABLE)), yes)
86 ifeq ($(PLATFORM),CHIBIOS)
87 $(info Enabling LTO on ChibiOS-targeting boards is known to have a high likelihood of failure.)
88 $(info If unsure, set LTO_ENABLE = no.)
89 endif
90 CDEFS += -flto
91 CDEFS += -DLTO_ENABLE
92endif
93
85DEBUG_ENABLE ?= yes 94DEBUG_ENABLE ?= yes
86ifeq ($(strip $(SKIP_DEBUG_INFO)),yes) 95ifeq ($(strip $(SKIP_DEBUG_INFO)),yes)
87 DEBUG_ENABLE=no 96 DEBUG_ENABLE=no