summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorJoshua Watt <jpewhacker@gmail.com>2018-02-12 10:52:11 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-02-16 18:05:38 +0000
commita1304721b56101899ea5b9aa8df392bb5db721be (patch)
tree32f8406151a873b794fb96e91be043cfcd3c5216 /meta
parent02c4f3a48488e676fbf551a4328890ee5603e1b6 (diff)
downloadpoky-a1304721b56101899ea5b9aa8df392bb5db721be.tar.gz
icecc-toolchain: Disable caret workaround
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. Users can override this default in the SDK by defining ICECC_CARET_WORKAROUND="1" either before or after sourcing the SDK environment. (From OE-Core rev: 8933c2b5cfa59f2289c574e196f945556790c7c1) 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/recipes-devtools/icecc-toolchain/icecc-toolchain/icecc-env.sh14
1 files changed, 13 insertions, 1 deletions
diff --git a/meta/recipes-devtools/icecc-toolchain/icecc-toolchain/icecc-env.sh b/meta/recipes-devtools/icecc-toolchain/icecc-toolchain/icecc-env.sh
index 9c9bb4dc4e..94760076bf 100644
--- a/meta/recipes-devtools/icecc-toolchain/icecc-toolchain/icecc-env.sh
+++ b/meta/recipes-devtools/icecc-toolchain/icecc-toolchain/icecc-env.sh
@@ -25,7 +25,19 @@ if [ -z "$ICECC_PATH" ]; then
25fi 25fi
26 26
27if [ -n "$ICECC_PATH" ]; then 27if [ -n "$ICECC_PATH" ]; then
28 export ICECC_PATH 28 # Default to disabling the caret workaround. If set to "1", icecc will
29 # locally recompile any files that have warnings, which can adversely
30 # affect performance.
31 #
32 # See: https://github.com/icecc/icecream/issues/190
33 if [ -z "$ICECC_CARET_WORKAROUND" ]; then
34 ICECC_CARET_WORKAROUND="0"
35 fi
36 if [ "$ICECC_CARET_WORKAROUND" != "1" ]; then
37 CFLAGS="$CFLAGS -fno-diagnostics-show-caret"
38 CXXFLAGS="$CXXFLAGS -fno-diagnostics-show-caret"
39 fi
40 export ICECC_PATH ICECC_CARET_WORKAROUND
29 export ICECC_VERSION="$OECORE_NATIVE_SYSROOT/usr/share/icecream/@TOOLCHAIN_ENV@" 41 export ICECC_VERSION="$OECORE_NATIVE_SYSROOT/usr/share/icecream/@TOOLCHAIN_ENV@"
30 export ICECC="$(which ${CROSS_COMPILE}gcc)" 42 export ICECC="$(which ${CROSS_COMPILE}gcc)"
31 export ICECXX="$(which ${CROSS_COMPILE}g++)" 43 export ICECXX="$(which ${CROSS_COMPILE}g++)"