[oe-commits] [openembedded-core] 05/57: icecc-toolchain: Disable caret workaround

git at git.openembedded.org git at git.openembedded.org
Thu Feb 15 13:31:04 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 8933c2b5cfa59f2289c574e196f945556790c7c1
Author: Joshua Watt <jpewhacker at gmail.com>
AuthorDate: Mon Feb 12 10:52:11 2018 -0600

    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.
    
    Signed-off-by: Joshua Watt <JPEWhacker at gmail.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 .../icecc-toolchain/icecc-toolchain/icecc-env.sh           | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

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 9c9bb4d..9476007 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
 fi
 
 if [ -n "$ICECC_PATH" ]; then
-    export ICECC_PATH
+    # Default to disabling the caret workaround. If set to "1", icecc will
+    # locally recompile any files that have warnings, which can adversely
+    # affect performance.
+    #
+    # See: https://github.com/icecc/icecream/issues/190
+    if [ -z "$ICECC_CARET_WORKAROUND" ]; then
+        ICECC_CARET_WORKAROUND="0"
+    fi
+    if [ "$ICECC_CARET_WORKAROUND" != "1" ]; then
+        CFLAGS="$CFLAGS -fno-diagnostics-show-caret"
+        CXXFLAGS="$CXXFLAGS -fno-diagnostics-show-caret"
+    fi
+    export ICECC_PATH ICECC_CARET_WORKAROUND
     export ICECC_VERSION="$OECORE_NATIVE_SYSROOT/usr/share/icecream/@TOOLCHAIN_ENV@"
     export ICECC="$(which ${CROSS_COMPILE}gcc)"
     export ICECXX="$(which ${CROSS_COMPILE}g++)"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list