You are not logged in.
hi fellows,
I've recently read http://www.phoronix.com/scan.php?page=n … px=MTM2MzI
that GCC is now able to show a colorized output with this magic switch
-fdiagnostics-color=always
now, my question is: where I should put it?
Last edited by nTia89 (2014-11-01 11:08:27)
+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome
Offline
It's a command line switch, you put it on the command line. If you want it always enabled there is a way to do that. Perhaps you should RTFM.
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
do you mean
/etc/makepkg.conf
?
+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome
Offline
No.
It's a command line option for gcc, you put it on the command line when you type a gcc command. If you want it to be automatic it is described in the man page how to do that - the man page for gcc. RTFM!
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
1) I find that if I set the environment variable
GCC_COLORS
, gcc interprets it as
--fdiagnostics-color=auto
but it's not what I want.....
2) why I can't put it into my
/etc/makepkg.conf
, in the
CFLAGS
line, because it contains other switches?
+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome
Offline
1) I find that if I set the environment variable
GCC_COLORS
, gcc interprets it as
--fdiagnostics-color=auto
but it's not what I want.....
2) why I can't put it into my/etc/makepkg.conf
, in the
CFLAGS
line, because it contains other switches?
Out of curiosity, why do you want it set to always instead of auto? Without RTFM-ing myself, I imagine that it adds the color escape sequences only if stdout is a terminal.
I don't think it will harm anything to put it in your CFLAGS.
Offline
just curiosity
+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome
Offline
You can put it in your makepkg.conf if you want it to only work when you run makepkg - but that's not at all what you asked.
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
Just export that var in your ~/.bashrc or whatever.
export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
-fdiagnostics-color[=WHEN]
-fno-diagnostics-color
Use color in diagnostics. WHEN is never, always, or auto. The default is never if GCC_COLORS environment variable isn't present in the environment, and auto otherwise.
Last edited by graysky (2014-11-01 11:14:04)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
ok, now I understand
thank!
+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome
Offline