Bug 208947 - bsdmake loses colored output with -j 2
Summary: bsdmake loses colored output with -j 2
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 10.3-RELEASE
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-21 08:37 UTC by Hannes Hauswedell
Modified: 2016-04-21 16:37 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hannes Hauswedell 2016-04-21 08:37:22 UTC
Since version 5 of GCC and in all recent versions of clang color is used to greatly enhance the readability of the compiler output.
With FreeBSD's make the color disappears, as soon as you use multiple jobs which is something you almost always want to do.

To reproduce, create

==test.cpp==

#include <iostream>
int main()
{
    std::cout << "foo" << "bar;
    return 0;
}

==Makefile==

test: test.cpp
	g++5 -o test test.cpp -std=c++14


% make
[see output with color]

% gmake
[see output with color]

% make -j 2
[no color :'(]

% gmake
[see output with color]


This might seems like it is not really important, but for larger codebases with templatatized code (and thus huge error messages) it makes a big difference! Also, I suspect it wouldn't be too hard to fix?

Thank you very much!