Fix color diagnostics for arm-none-eabi-gcc (#26115)

This commit is contained in:
Joel Challis 2026-03-30 04:42:29 +01:00 • committed by GitHub
commit 6f4a45e392
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -66,9 +66,9 @@ CFLAGS += $(CDEFS)
CFLAGS += -O$(OPT)
# add color
ifeq ($(COLOR),true)
ifeq ("$(shell echo "int main(){}" | $(CC) -fdiagnostics-color -x c - -o /dev/null 2>&1)", "")
CFLAGS+= -fdiagnostics-color
endif
CFLAGS+= -fdiagnostics-color=always
else
CFLAGS+= -fdiagnostics-color=never
endif
CFLAGS += -Wall
CFLAGS += -Wstrict-prototypes