summaryrefslogtreecommitdiffstats
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-15 13:24:10 +0000
commita1488291c5733a113c28475352eded61bf52bfe8 (patch)
tree967dc91af5eace6a79b8d244a49d18dc8dc431dc
parentdea45ac88251b22b0b74dc4b3ba6ca13fe0b86d6 (diff)
downloadopenembedded-core-a1488291c5733a113c28475352eded61bf52bfe8.tar.gz
openembedded-core-a1488291c5733a113c28475352eded61bf52bfe8.tar.bz2
openembedded-core-a1488291c5733a113c28475352eded61bf52bfe8.zip
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. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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 @@
#Error checking is kept to minimum so double check any parameters you pass to the class
###########################################################################################
-BB_HASHBASE_WHITELIST += "ICECC_PARALLEL_MAKE ICECC_DISABLED ICECC_USER_PACKAGE_BL ICECC_USER_CLASS_BL ICECC_USER_PACKAGE_WL ICECC_PATH ICECC_ENV_EXEC"
+BB_HASHBASE_WHITELIST += "ICECC_PARALLEL_MAKE ICECC_DISABLED ICECC_USER_PACKAGE_BL \
+ ICECC_USER_CLASS_BL ICECC_USER_PACKAGE_WL ICECC_PATH ICECC_ENV_EXEC \
+ ICECC_CARET_WORKAROUND ICECC_CFLAGS"
ICECC_ENV_EXEC ?= "${STAGING_BINDIR_NATIVE}/icecc-create-env"
+# Default to disabling the caret workaround, If set to "1" in local.conf, icecc
+# will locally recompile any files that have warnings, which can adversely
+# affect performance.
+#
+# See: https://github.com/icecc/icecream/issues/190
+export ICECC_CARET_WORKAROUND ??= "0"
+
+ICECC_CFLAGS = ""
+CFLAGS += "${ICECC_CFLAGS}"
+CXXFLAGS += "${ICECC_CFLAGS}"
+
def icecc_dep_prepend(d):
# INHIBIT_DEFAULT_DEPS doesn't apply to the patch command. Whether or not
# we need that built is the responsibility of the patch function / class, not
@@ -170,6 +183,11 @@ def icecc_version(bb, d):
if not d.getVar('PARALLEL_MAKE', False) == "" and parallel:
d.setVar("PARALLEL_MAKE", parallel)
+ # Disable showing the caret in the GCC compiler output if the workaround is
+ # disabled
+ if d.getVar('ICECC_CARET_WORKAROUND', True) == '0':
+ d.setVar('ICECC_CFLAGS', '-fno-diagnostics-show-caret')
+
if icecc_is_native(bb, d):
archive_name = "local-host-env"
elif d.expand('${HOST_PREFIX}') == "":