Fix builds for ChibiOS + Cortex-M0[+] (#14879)

This commit is contained in:
Nick Brassel 2021-10-19 08:29:27 +11:00 committed by GitHub
parent 01b702bece
commit d9be6dea3a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -330,7 +330,7 @@ ifeq ($(strip $(MCU)), risc-v)
endif endif
endif endif
endif endif
# Default to compiling with picolibc for RISC-V targets if available, # Default to compiling with picolibc for RISC-V targets if available,
# which is available by default on current (bullseye) debian based systems. # which is available by default on current (bullseye) debian based systems.
ifeq ($(shell $(TOOLCHAIN)gcc --specs=picolibc.specs -E - 2>/dev/null >/dev/null </dev/null ; echo $$?),0) ifeq ($(shell $(TOOLCHAIN)gcc --specs=picolibc.specs -E - 2>/dev/null >/dev/null </dev/null ; echo $$?),0)
@ -338,11 +338,11 @@ ifeq ($(strip $(MCU)), risc-v)
# Note that we still link with our own linker script # Note that we still link with our own linker script
# by providing it via the -T flag above. # by providing it via the -T flag above.
TOOLCHAIN_CFLAGS = --specs=picolibc.specs TOOLCHAIN_CFLAGS = --specs=picolibc.specs
# Tell QMK that we are compiling with picolibc. # Tell QMK that we are compiling with picolibc.
OPT_DEFS += -DUSE_PICOLIBC OPT_DEFS += -DUSE_PICOLIBC
endif endif
# MCU architecture flags # MCU architecture flags
MCUFLAGS = -march=$(MCU_ARCH) \ MCUFLAGS = -march=$(MCU_ARCH) \
-mabi=$(MCU_ABI) \ -mabi=$(MCU_ABI) \
@ -394,6 +394,9 @@ LDFLAGS += $(SHARED_LDFLAGS) $(TOOLCHAIN_LDFLAGS) $(MCUFLAGS)
# Tell QMK that we are hosting it on ChibiOS. # Tell QMK that we are hosting it on ChibiOS.
OPT_DEFS += -DPROTOCOL_CHIBIOS OPT_DEFS += -DPROTOCOL_CHIBIOS
# Workaround to stop ChibiOS from complaining about new GCC -- it's been fixed for 7/8/9 already
OPT_DEFS += -DPORT_IGNORE_GCC_VERSION_CHECK=1
# Speed up recompilations by opt-in usage of ccache # Speed up recompilations by opt-in usage of ccache
USE_CCACHE ?= no USE_CCACHE ?= no
ifneq ($(USE_CCACHE),no) ifneq ($(USE_CCACHE),no)