make (gcc?) color output during build

ehiller
Posts: 2
Joined: Thu Feb 22, 2018 4:51 pm

make (gcc?) color output during build

Postby ehiller » Thu Feb 22, 2018 5:14 pm

I'm trying to give my build-process output some intelligibility by adding color to the output. With the underlying compiler being gcc, I thought all I would have to do is add some flags

Code: Select all

CFLAGS += -fdiagnostics-color=always
CXXFLAGS += -fdiagnostics-color=always
CPPFLAGS += -fdiagnostics-color=always
To be sure I set the GCC_COLORS environment variable ( both in my environment (with export) and in the Makefile.

Code: Select all

GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
I even tried adding directly to the compiler variable

Code: Select all

CC += -fdiagnostics-color=always
Am I missing a glaring step?

ESP_Sprite
Posts: 8921
Joined: Thu Nov 26, 2015 4:08 am

Re: make (gcc?) color output during build

Postby ESP_Sprite » Sat Feb 24, 2018 3:54 am

Are you sure you're using the latest toolchain? The one I have gives colorful warnings etc out of the box.

ehiller
Posts: 2
Joined: Thu Feb 22, 2018 4:51 pm

Re: make (gcc?) color output during build

Postby ehiller » Sun Feb 25, 2018 4:20 pm

I'm pretty sure:

Code: Select all

esp32_win32_msys2_environment_and_toolchain-20180110
I can have the logs from the ESP32 itself be colorized. Just not GCC/make

Who is online

Users browsing this forum: Google [Bot] and 134 guests