summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorJoshua Watt <jpewhacker@gmail.com>2018-02-12 10:52:10 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-02-16 18:05:38 +0000
commit02c4f3a48488e676fbf551a4328890ee5603e1b6 (patch)
tree34d6c2838b82acf3a5c23c3839e46f1ad6e48faa /meta
parent502ee8e86338f5eb462aafb211543accb6e830f2 (diff)
downloadpoky-02c4f3a48488e676fbf551a4328890ee5603e1b6.tar.gz
icecc.bbclass: Disable caret workaround by default
Icecream has a behavior that causes it to recompile files locally if gcc generates any warnings or errors. The reason for this is that GCC tries to re-read the input file in order to display the offending line with a caret below it, which doesn't work in the remote chroot. Default to disabling this this workaround and add -fno-diagnostics-show-caret to the GCC flags so that errors and warnings generated by GCC do not show erroneous results. (From OE-Core rev: a1488291c5733a113c28475352eded61bf52bfe8) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/icecc.bbclass20
1 files changed, 19 insertions, 1 deletions
diff --git a/meta/classes/icecc.bbclass b/meta/classes/icecc.bbclass
index 8492ece60c..e8f7eab1bc 100644
--- a/meta/classes/icecc.bbclass
+++ b/meta/classes/icecc.bbclass
@@ -28,10 +28,23 @@
28#Error checking is kept to minimum so double check any parameters you pass to the class 28#Error checking is kept to minimum so double check any parameters you pass to the class
29########################################################################################### 29###########################################################################################
30 30
31BB_HASHBASE_WHITELIST += "ICECC_PARALLEL_MAKE ICECC_DISABLED ICECC_USER_PACKAGE_BL ICECC_USER_CLASS_BL ICECC_USER_PACKAGE_WL ICECC_PATH ICECC_ENV_EXEC" 31BB_HASHBASE_WHITELIST += "ICECC_PARALLEL_MAKE ICECC_DISABLED ICECC_USER_PACKAGE_BL \
32 ICECC_USER_CLASS_BL ICECC_USER_PACKAGE_WL ICECC_PATH ICECC_ENV_EXEC \
33 ICECC_CARET_WORKAROUND ICECC_CFLAGS"
32 34
33ICECC_ENV_EXEC ?= "${STAGING_BINDIR_NATIVE}/icecc-create-env" 35ICECC_ENV_EXEC ?= "${STAGING_BINDIR_NATIVE}/icecc-create-env"
34 36
37# Default to disabling the caret workaround, If set to "1" in local.conf, icecc
38# will locally recompile any files that have warnings, which can adversely
39# affect performance.
40#
41# See: https://github.com/icecc/icecream/issues/190
42export ICECC_CARET_WORKAROUND ??= "0"
43
44ICECC_CFLAGS = ""
45CFLAGS += "${ICECC_CFLAGS}"
46CXXFLAGS += "${ICECC_CFLAGS}"
47
35def icecc_dep_prepend(d): 48def icecc_dep_prepend(d):
36 # INHIBIT_DEFAULT_DEPS doesn't apply to the patch command. Whether or not 49 # INHIBIT_DEFAULT_DEPS doesn't apply to the patch command. Whether or not
37 # we need that built is the responsibility of the patch function / class, not 50 # we need that built is the responsibility of the patch function / class, not
@@ -170,6 +183,11 @@ def icecc_version(bb, d):
170 if not d.getVar('PARALLEL_MAKE', False) == "" and parallel: 183 if not d.getVar('PARALLEL_MAKE', False) == "" and parallel:
171 d.setVar("PARALLEL_MAKE", parallel) 184 d.setVar("PARALLEL_MAKE", parallel)
172 185
186 # Disable showing the caret in the GCC compiler output if the workaround is
187 # disabled
188 if d.getVar('ICECC_CARET_WORKAROUND', True) == '0':
189 d.setVar('ICECC_CFLAGS', '-fno-diagnostics-show-caret')
190
173 if icecc_is_native(bb, d): 191 if icecc_is_native(bb, d):
174 archive_name = "local-host-env" 192 archive_name = "local-host-env"
175 elif d.expand('${HOST_PREFIX}') == "": 193 elif d.expand('${HOST_PREFIX}') == "":