summaryrefslogtreecommitdiff
path: root/tools/ccache/patches/100-honour-copts.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2015-07-14 10:30:38 +0000
committerFelix Fietkau <nbd@openwrt.org>2015-07-14 10:30:38 +0000
commit388647b580df44a94417cb7a8cc2fc54d581f552 (patch)
treeab2af6c3f605a3a4331b6450203f8fae6b914292 /tools/ccache/patches/100-honour-copts.patch
parentcf93a8f2272e2a009f06a0c231a5db95edc33042 (diff)
downloadmtk-20170518-388647b580df44a94417cb7a8cc2fc54d581f552.zip
mtk-20170518-388647b580df44a94417cb7a8cc2fc54d581f552.tar.gz
mtk-20170518-388647b580df44a94417cb7a8cc2fc54d581f552.tar.bz2
ccache: Make ccache aware of OpenWRT provided GCC patch.
The OpenWRT GCC patch, 910-mbsd_multi.patch adds an extra option to gcc that depends on an environment variable. Standard ccache is unaware of this option and therefor can produce stdout from gcc that doesn't correspond to what you would get if you actually do a direct compilation with gcc. This commit adds a patch to ccache to make it aware of the new option and removes the feature from the ccache package to use the host system's installed ccache binary. Signed-off-by: Karl Vogel <karl.vogel@gmail.com> SVN-Revision: 46364
Diffstat (limited to 'tools/ccache/patches/100-honour-copts.patch')
-rw-r--r--tools/ccache/patches/100-honour-copts.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/tools/ccache/patches/100-honour-copts.patch b/tools/ccache/patches/100-honour-copts.patch
new file mode 100644
index 0000000..dc32885
--- /dev/null
+++ b/tools/ccache/patches/100-honour-copts.patch
@@ -0,0 +1,33 @@
+From 90762a9b8d9a50b6176f10bd6c2e2b9501117561 Mon Sep 17 00:00:00 2001
+From: Karl Vogel <karl.vogel@gmail.com>
+Date: Tue, 14 Jul 2015 11:05:33 +0200
+Subject: [PATCH] Include environment variable GCC_HONOUR_COPTS in hash.
+
+The OpenWRT patch, 910-mbsd_multi.patch, to GCC adds an extra
+compilation flag, -fhonour-copts, which is influenced by an
+environment variable called GCC_HONOUR_COPTS.
+
+Include this environment var in the hash calculation as otherwise
+the gcc stdout warning from a previous compilation might be shown
+where, even when GCC_HONOUR_COPTS is in 's'ilent mode.
+
+Signed-off-by: Karl Vogel <karl.vogel@gmail.com>
+---
+ ccache.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/ccache.c b/ccache.c
+index e41af13..b736a9c 100644
+--- a/ccache.c
++++ b/ccache.c
+@@ -965,6 +965,7 @@ calculate_object_hash(struct args *args, struct mdfour *hash, int direct_mode)
+ "CPLUS_INCLUDE_PATH",
+ "OBJC_INCLUDE_PATH",
+ "OBJCPLUS_INCLUDE_PATH", /* clang */
++ "GCC_HONOUR_COPTS",
+ NULL
+ };
+ for (p = envvars; *p != NULL ; ++p) {
+--
+1.9.1
+