diff options
| author | Nick Brassel <nick@tzarc.org> | 2025-05-19 09:22:31 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-19 09:22:31 +1000 |
| commit | a4ef1ae736cd58375affed966cf1399fe8df5774 (patch) | |
| tree | e44dfc10fb79960bbe4c0e34c2b9130924cbc16f /builddefs | |
| parent | 81355045cc7a59238485d340724a01f6d1d5d537 (diff) | |
gcc15 AVR compilation fixes (#25238)
Diffstat (limited to 'builddefs')
| -rw-r--r-- | builddefs/build_keyboard.mk | 1 | ||||
| -rw-r--r-- | builddefs/build_test.mk | 1 | ||||
| -rw-r--r-- | builddefs/support.mk | 11 |
3 files changed, 13 insertions, 0 deletions
diff --git a/builddefs/build_keyboard.mk b/builddefs/build_keyboard.mk index c2c47c00fb..640dedc31e 100644 --- a/builddefs/build_keyboard.mk +++ b/builddefs/build_keyboard.mk | |||
| @@ -11,6 +11,7 @@ endif | |||
| 11 | .DEFAULT_GOAL := all | 11 | .DEFAULT_GOAL := all |
| 12 | 12 | ||
| 13 | include paths.mk | 13 | include paths.mk |
| 14 | include $(BUILDDEFS_PATH)/support.mk | ||
| 14 | include $(BUILDDEFS_PATH)/message.mk | 15 | include $(BUILDDEFS_PATH)/message.mk |
| 15 | 16 | ||
| 16 | # Helper to add defines with a 'QMK_' prefix | 17 | # Helper to add defines with a 'QMK_' prefix |
diff --git a/builddefs/build_test.mk b/builddefs/build_test.mk index d0de63c6f5..0c5c98e2a3 100644 --- a/builddefs/build_test.mk +++ b/builddefs/build_test.mk | |||
| @@ -7,6 +7,7 @@ endif | |||
| 7 | OPT = g | 7 | OPT = g |
| 8 | 8 | ||
| 9 | include paths.mk | 9 | include paths.mk |
| 10 | include $(BUILDDEFS_PATH)/support.mk | ||
| 10 | include $(BUILDDEFS_PATH)/message.mk | 11 | include $(BUILDDEFS_PATH)/message.mk |
| 11 | 12 | ||
| 12 | TARGET=test/$(TEST_OUTPUT) | 13 | TARGET=test/$(TEST_OUTPUT) |
diff --git a/builddefs/support.mk b/builddefs/support.mk new file mode 100644 index 0000000000..7ef7b9b041 --- /dev/null +++ b/builddefs/support.mk | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | # Helper to determine if a compiler option is supported | ||
| 2 | # Args: | ||
| 3 | # $(1) = option to test, if successful will be output | ||
| 4 | # $(2) = option to use if $(1) is not supported | ||
| 5 | # $(3) = additional arguments to pass to the compiler during the test, but aren't contained in the output | ||
| 6 | cc-option = $(shell \ | ||
| 7 | if { echo 'int main(){return 0;}' | $(CC) $(1) $(3) -o /dev/null -x c /dev/null >/dev/null 2>&1; }; \ | ||
| 8 | then echo "$(1)"; else echo "$(2)"; fi) | ||
| 9 | |||
| 10 | # Helper to pass comma character to make functions (use with `$(,)` to pass in `$(call ...)` arguments) | ||
| 11 | , := , | ||
