|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
From f44541bc934c6e2b02155559e9eeb17a13a09558 Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
From: Michal Schmidt <mschmidt@redhat.com>
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
Date: Fri, 15 Aug 2014 16:33:03 +0200
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
Subject: [PATCH] build: colorize gcc only if on tty
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
Rather than forcing gcc to always produce colorized error messages
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
whether on tty or not, enable automatic colorization by ensuring
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
GCC_COLORS is set to a non-empty string.
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
Doing it this way removes the need for workarounds in ~/.emacs or
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
~/.vimrc for "M-x compile" or ":make", respectively, to work.
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
---
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
Makefile.am | 3 +++
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
configure.ac | 1 -
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
2 files changed, 3 insertions(+), 1 deletion(-)
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
diff --git a/Makefile.am b/Makefile.am
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
index de40043c5b..5dc17f8fe7 100644
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
--- a/Makefile.am
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+++ b/Makefile.am
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
@@ -24,6 +24,9 @@ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
AM_MAKEFLAGS = --no-print-directory
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
AUTOMAKE_OPTIONS = color-tests parallel-tests
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+GCC_COLORS ?= 'ooh, shiny!'
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+export GCC_COLORS
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
SUBDIRS = . po
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
# remove targets if the command fails
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
diff --git a/configure.ac b/configure.ac
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
index 99c01d2487..fb169042d8 100644
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
--- a/configure.ac
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+++ b/configure.ac
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
@@ -190,7 +190,6 @@ CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
-ffast-math \
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
-fno-common \
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
-fdiagnostics-show-option \
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
- -fdiagnostics-color \
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
-fno-strict-aliasing \
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
-fvisibility=hidden \
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
-ffunction-sections \
|