Move USE_CCACHE logic to common location (#14899)

master
Joel Challis 2021-10-21 14:39:13 +01:00 committed by GitHub
parent 1816006121
commit b36e0c6658
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 11 deletions

View File

@ -2,7 +2,7 @@
############################################################################## ##############################################################################
# Compiler settings # Compiler settings
# #
CC = arm-none-eabi-gcc CC = $(CC_PREFIX) arm-none-eabi-gcc
OBJCOPY = arm-none-eabi-objcopy OBJCOPY = arm-none-eabi-objcopy
OBJDUMP = arm-none-eabi-objdump OBJDUMP = arm-none-eabi-objdump
SIZE = arm-none-eabi-size SIZE = arm-none-eabi-size

View File

@ -2,7 +2,7 @@
############################################################################## ##############################################################################
# Compiler settings # Compiler settings
# #
CC = avr-gcc CC = $(CC_PREFIX) avr-gcc
OBJCOPY = avr-objcopy OBJCOPY = avr-objcopy
OBJDUMP = avr-objdump OBJDUMP = avr-objdump
SIZE = avr-size SIZE = avr-size

View File

@ -398,12 +398,6 @@ OPT_DEFS += -DPROTOCOL_CHIBIOS
# Workaround to stop ChibiOS from complaining about new GCC -- it's been fixed for 7/8/9 already # 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 OPT_DEFS += -DPORT_IGNORE_GCC_VERSION_CHECK=1
# Speed up recompilations by opt-in usage of ccache
USE_CCACHE ?= no
ifneq ($(USE_CCACHE),no)
CC_PREFIX ?= ccache
endif
# Construct GCC toolchain # Construct GCC toolchain
CC = $(CC_PREFIX) $(TOOLCHAIN)gcc CC = $(CC_PREFIX) $(TOOLCHAIN)gcc
OBJCOPY = $(TOOLCHAIN)objcopy OBJCOPY = $(TOOLCHAIN)objcopy

View File

@ -1,7 +1,7 @@
SYSTEM_TYPE := $(shell gcc -dumpmachine) SYSTEM_TYPE := $(shell gcc -dumpmachine)
GCC_VERSION := $(shell gcc --version 2>/dev/null) GCC_VERSION := $(shell gcc --version 2>/dev/null)
CC = gcc CC = $(CC_PREFIX) gcc
OBJCOPY = OBJCOPY =
OBJDUMP = OBJDUMP =
SIZE = SIZE =

View File

@ -69,8 +69,11 @@ CSTANDARD = -std=gnu99
#CXXDEFS += -D__STDC_CONSTANT_MACROS #CXXDEFS += -D__STDC_CONSTANT_MACROS
#CXXDEFS += #CXXDEFS +=
# Speed up recompilations by opt-in usage of ccache
USE_CCACHE ?= yes
ifneq ($(USE_CCACHE),no)
CC_PREFIX ?= ccache
endif
#---------------- Compiler Options C ---------------- #---------------- Compiler Options C ----------------
# -g*: generate debugging information # -g*: generate debugging information