summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Auty <ikelos@gentoo.org>2014-12-05 00:49:13 +0000
committerLucas De Marchi <lucas.demarchi@intel.com>2014-12-17 00:41:01 -0200
commitfd56638aed3fe147015bfa10ed4a5f7491303cb4 (patch)
treebc6e0bfe614a3f5fb9a8dbd30fc813ede4ae87aa
parent1dd4ff56f62942243e0959c4f274bf0f1f601ae6 (diff)
downloadkmod-fd56638aed3fe147015bfa10ed4a5f7491303cb4.tar.gz
build: Do not force diagnostics-color flag
The -fdiagnostics-color flag is only available on GCC >= 4.9, for older versions this could raise an error in certain circumstances (such as when using ccache). Instead, since -fdiagnostic-color=auto by default in gcc-4.9, simply set the required environment variable to the default one if it's undefined. Based mostly on the systemd commit f44541bc by Michal Schmidt.
-rw-r--r--Makefile.am3
-rw-r--r--configure.ac1
2 files changed, 3 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index ea5cbac..8a69fbc 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -11,6 +11,9 @@ BUILT_FILES =
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
AM_MAKEFLAGS = --no-print-directory
+GCC_COLORS ?= 'yes'
+export GCC_COLORS
+
AM_CPPFLAGS = \
-include $(top_builddir)/config.h \
-I$(top_srcdir)/libkmod \
diff --git a/configure.ac b/configure.ac
index 2709f08..f28bfed 100644
--- a/configure.ac
+++ b/configure.ac
@@ -201,7 +201,6 @@ CC_CHECK_FLAGS_APPEND(with_cflags, [CFLAGS], [\
-Wuninitialized \
-fno-common \
-fdiagnostics-show-option \
- -fdiagnostics-color=auto \
-fvisibility=hidden \
-ffunction-sections \
-fdata-sections])