Gentoo Archives: gentoo-user

From: R0b0t1 <r030t1@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] How do I turn off ansi (colour) codes in GCC 6.3.0 ?
Date: Sun, 14 May 2017 02:01:56
Message-Id: CAAD4mYiJP7S0aMLUztL2DE+a8Gy6KTKO4o6p_-ikg11Q4EeK=Q@mail.gmail.com
In Reply to: Re: [gentoo-user] How do I turn off ansi (colour) codes in GCC 6.3.0 ? by Miroslav Rovis
1 On Sat, May 13, 2017 at 7:50 PM, Miroslav Rovis
2 <miro.rovis@××××××××××××××.hr> wrote:
3 > On 170513-12:53-0500, R0b0t1 wrote:
4 >> On Sat, May 13, 2017 at 9:25 AM, Miroslav Rovis
5 >> <miro.rovis@××××××××××××××.hr> wrote:
6 >> > On 170510-20:03-0400, Walter Dnes wrote:
7 >> >> On Wed, May 10, 2017 at 01:35:24PM -0500, R0b0t1 wrote
8 >> >>
9 >> >> > The option is "-fdiagnostics-color=never" or "-fno-diagnostics-color".
10 >> >> > You can also set the environment variable GCC_COLORS to the empty
11 >> >> > string. The latter is probably more useful in the context of portage.
12 >> >>
13 >> >> Thank you. I successfully tried...
14 >> >>
15 >> >> GCC_COLORS="" emerge icewm
16 >> > Another tip to remember.
17 >> >
18 >> >> I suppose the next step is to add GCC_COLORS="" to make.conf.
19 >> >>
20 >> > I wonder why sticking " --color=n" in the EMERGE_DEFAULT_OPTS in
21 >> > make.conf (e.g. mine is:
22 >> >
23 >> > EMERGE_DEFAULT_OPTS="--keep-going --with-bdeps=y --autounmask-keep-masks --ask --verbose --color=n"
24 >> >
25 >> > does only partly its job. Erratically, I'd say. You never know if it
26 >> > will or not remove color... A bug should be posted for that, but I have
27 >> > a partly broken system at this time...
28 >> >
29 >>
30 >> That switch only handles the coloring of portage output. I suggested
31 >> using GCC_COLORS precisely because "--color=n" doesn't seem to
32 >> propagate to subcommands which do output coloring.
33 >>
34 >> Another program you might want to disable output coloring for is
35 >> CMake, using CMAKE_COLOR_MAKEFILE=OFF.
36 >>
37 >
38 > Thanks for the tip! But let me see... Like the above (repasting):
39 >> >> GCC_COLORS="" emerge icewm
40 > pr maybe stick in the /etc/portage/bashrc or in some other way?
41 >
42
43 As Walter suggested make.conf seems the ideal place. Should that fail
44 I'm not entirely sure, as I believe portage does some pretty heavy
45 environment sandboxing.