From d9bb189e25f14578ca74d6a3aa9f9a467f6f6595 Mon Sep 17 00:00:00 2001 From: Stefan Kerkmann Date: Thu, 7 Jul 2022 09:27:50 +0200 Subject: [Core] Update mpaland/printf to eyalroz/printf fork (#16163) mpaland printf implementation was abandoned in ~2019 and the fork by eyalroz is now regarded to be the goto replacement of it. So this commit incoporates the changes needed to use this fork in QMK. Note that pointer ptrdiff_t is always supported since commit 51c90f93a97fdaef895783ecbe24569be0db7cb8 --- platforms/arm_atsam/platform.mk | 1 + platforms/avr/platform.mk | 1 + platforms/chibios/platform.mk | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) (limited to 'platforms') diff --git a/platforms/arm_atsam/platform.mk b/platforms/arm_atsam/platform.mk index 9618838dc3..9462f517ae 100644 --- a/platforms/arm_atsam/platform.mk +++ b/platforms/arm_atsam/platform.mk @@ -24,6 +24,7 @@ COMPILEFLAGS += -fno-strict-aliasing COMPILEFLAGS += -mfloat-abi=hard COMPILEFLAGS += -mfpu=fpv4-sp-d16 COMPILEFLAGS += -mthumb +COMPILEFLAGS += -fno-builtin-printf #ALLOW_WARNINGS = yes diff --git a/platforms/avr/platform.mk b/platforms/avr/platform.mk index b51a94c93a..39a11b28e4 100644 --- a/platforms/avr/platform.mk +++ b/platforms/avr/platform.mk @@ -24,6 +24,7 @@ COMPILEFLAGS += -fdata-sections COMPILEFLAGS += -fpack-struct COMPILEFLAGS += -fshort-enums COMPILEFLAGS += -mcall-prologues +COMPILEFLAGS += -fno-builtin-printf # Linker relaxation is only possible if # link time optimizations are not enabled. diff --git a/platforms/chibios/platform.mk b/platforms/chibios/platform.mk index 63cc1a4b33..b2a8ec89e1 100644 --- a/platforms/chibios/platform.mk +++ b/platforms/chibios/platform.mk @@ -349,7 +349,8 @@ SHARED_CFLAGS = -fomit-frame-pointer \ -ffunction-sections \ -fdata-sections \ -fno-common \ - -fshort-wchar + -fshort-wchar \ + -fno-builtin-printf LDSCRIPT_PATH := $(shell dirname "$(LDSCRIPT)") -- cgit v1.2.1