Colorized compiler/linker messages

Mark Johnston markjdb at
Sun Jan 23 23:29:04 UTC 2011

On Sat, Jan 22, 2011 at 08:00:52PM -0600, Michael D. Norwick wrote:
> Good Day,
> I have seen this for some time when building ports and was wondering
> how it was done.  GCC when compiling and linking certain programs,
> ebook for example, emits messages in various colors.  How is that
> done?  Where does one find what the various colors are supposed to
> signify?  Or, is it just because it's more appealing?
> Thank You,
> Michael

I'm not sure about ebook specifically, but there's a wrapper for gcc called 
colorgcc which colorizes the diagnostics and errors that gcc emits. The idea is
that one can just do something like "CC=colorgcc make" when building.

I'm sure there are other programs out there that do something similar,
but colorgcc is the most common I think. Apparently there are similar
wrappers for make and diff as well.


More information about the freebsd-questions mailing list