summaryrefslogtreecommitdiffstats
path: root/meta/classes/icecc.bbclass
AgeCommit message (Collapse)Author
2023-02-24icecc: enable the network only when ICECC_DISABLED is not setJose Quaresma
Enabling the network uncondictional is not need for some use cases. Such use case is usefull to reuse the sstate-cache of the build and it requires the icecc inherit in all of the builds. The real control control of the icecc is in the variable ICECC_DISABLED so this patch change the logic to enable the network when the icecc is in use. Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2022-09-17icecc.bbclass: fix filename of recipe in commentUlrich Ölmann
The character '%' is not a valid part of a recipe filename and has been used here only to suggest a wildcard regarding the recipe's version, see reply [1] in a companioned thread. Correct that by using the current recipe version instead. [1] https://lists.yoctoproject.org/g/docs/message/3165 Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-09-07icecc.bbclass: delete 'rm' commandUlrich Ölmann
The removed command was explicitly marked as transitional in commit [1] roughly three years ago, so finally clean up. [1] 40d74cb1d0dd ("icecc: Export ICECC_CC and friends via wrapper-script") Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-09-07icecc.bbclass: fix typosUlrich Ölmann
Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-12classes: Add SPDX license identifiersRichard Purdie
As stated in our top level license files, the license is MIT unless otherwise stated. Add SPDX identifers accordingly. Replace older license statementa with the standardised syntax. Also drop "All Rights Reserved" expression as it isn't used now, doesn't mean anything and is confusing. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-12classes: Add copyright statements to files without oneRichard Purdie
Where there isn't a copyright statement, add one to make it explicit. Also drop editor config lines where they were present. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-02icecc.bbclass: enable networking in all tasksJose Quaresma
The icecc.bbclass needs network access to work properly. Currently I build with icecc inside a container with network isolation and my icecc daemon runs outside of the build container in my host. The only thing I need to do for using the icecc inside my build container is mounting the unix socket /var/run/icecc/iceccd.socket inside the container. I think we need something like this mount functionality to have access to some sockets connections inside the tasks that runs on the new namespace created with unshare system call. This patch is not a the real solution for the problem and is more like an hack so we can use the icecc.bbclass again. Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-22icecc.bbclass: fix syntax errorMartin Jansa
'class' is already taken as keyword and python doesn't like this: ERROR: Error in compiling python function in oe-core/meta/classes/icecc.bbclass, line 151: The code lines resulting in this error were: 0020: check_pn = set([pn, bpn]) 0021: 0022: class_disable = (d.getVar('ICECC_CLASS_DISABLE') or "").split() 0023: *** 0024: for class in class_disable: 0025: if bb.data.inherits_class(class, d): 0026: bb.debug(1, "%s: class %s found in disable, disable icecc" % (pn, class)) 0027: return "no" 0028: SyntaxError: invalid syntax (icecc.bbclass, line 151) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-21icecc: Improve variables/terminologyRichard Purdie
The SYSTEM and USER seperation between variables seems odd and not necessary, drop it. Avoid the use of whitelist/blacklist and also change "packages" to "recipes" since that misuse causes confusion. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-21meta/scripts: Handle bitbake variable renamingRichard Purdie
After other variables were renamed in bitbake, update OE-Core to match. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-08icecc.bbclass: replace deprecated bash command substitutionJose Quaresma
- build some packages with icecc enabled is not supported because of the folling that disables the icecc: DEBUG: while parsing set_icecc_env, unable to handle non-literal command '$ICECC_CC' - it can be replicated with: bitbake make && bitbake make -c cleansstate && bitbake make -DD grep ICECC_CC tmp/log/cooker/qemux86-64/console-latest.log - bash command substitution backquote deprecated https://www.gnu.org/software/bash/manual/html_node/Command-Substitution.html https://mywiki.wooledge.org/BashFAQ/082 Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-07-30Convert to new override syntaxRichard Purdie
This is the result of automated script conversion: scripts/contrib/convert-overrides.py <oe-core directory> converting the metadata to use ":" as the override character instead of "_". Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-07-30autotools/base/icecc: Remove prepend from function namesRichard Purdie
Using prepend as part of a function name is a poor choice. Whilst we're about to make the syntax explict, improve the names anyway making the conversion easier and the intent clear that this isn't an override. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-28icecc: Demote "could not get ICECC_CC" warning to noteDouglas Royds
For many components, it is perfectly correct not to have gcc or g++ in the PATH, notably when INHIBIT_DEFAULT_DEPS is set. We were getting a flood of warnings when icecc was enabled, eg: WARNING: base-files-3.0.14-r89.tait.8.6 do_configure: Cannot use icecc: could not get ICECC_CC or ICECC_CXX WARNING: base-files-3.0.14-r89.tait.8.6 do_compile: Cannot use icecc: could not get ICECC_CC or ICECC_CXX WARNING: base-files-3.0.14-r89.tait.8.6 do_install: Cannot use icecc: could not get ICECC_CC or ICECC_CXX WARNING: busybox-inittab-1.33.0-r0 do_configure: Cannot use icecc: could not get ICECC_CC or ICECC_CXX WARNING: busybox-inittab-1.33.0-r0 do_compile: Cannot use icecc: could not get ICECC_CC or ICECC_CXX WARNING: busybox-inittab-1.33.0-r0 do_install: Cannot use icecc: could not get ICECC_CC or ICECC_CXX WARNING: linux-libc-headers-3.14-r0 do_configure: Cannot use icecc: could not get ICECC_CC or ICECC_CXX WARNING: linux-libc-headers-3.14-r0 do_compile: Cannot use icecc: could not get ICECC_CC or ICECC_CXX WARNING: linux-libc-headers-3.14-r0 do_install: Cannot use icecc: could not get ICECC_CC or ICECC_CXX Demote this message to a "NOTE". It still appears in log.do_configure and friends: NOTE: Cannot use icecc: could not get ICECC_CC or ICECC_CXX Signed-off-by: Douglas Royds <douglas.royds@taitradio.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-28Revert "icecc: Don't use icecc when INHIBIT_DEFAULT_DEPS is set"Douglas Royds
Although this silenced the warnings, it also turned off icecc for gcc-cross and friends, binutils-cross, and importantly, the linux kernel. This reverts commit 0315aabeff8e6483b737d0e23d6841f1394ad3c8. [YOCTO #13863] Signed-off-by: Douglas Royds <douglas.royds@taitradio.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-14icecc.bbclass: replace superfluous "+=" with "="Robert P. J. Day
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-23icecc: Export ICECC_CC and friends via wrapper-scriptDouglas Royds via Openembedded-core
By exporting ICECC_CC, ICECC_CXX, and ICECC_VERSION in a wrapper-script, and putting this wrapper-script in the PATH, the Makefiles generated by CMake or the autotools are able to function correctly outside of bitbake. This provides a convenient developer workflow in which the modify-compile-unittest cycle can happen directly in the ${B} directory. The `rm -f $ICE_PATH/$compiler` line is transitional, and can go at some later date (October 2020 or later, perhaps). Signed-off-by: Douglas Royds <douglas.royds@taitradio.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2019-10-02icecc: Don't use icecc when INHIBIT_DEFAULT_DEPS is setDouglas Royds
We don't have a compiler, so no icecc. Silences a spew of warnings of the form: do_configure: Cannot use icecc: could not get ICECC_CC or ICECC_CXX Signed-off-by: Douglas Royds <douglas.royds@taitradio.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-16icecc: blacklist pixmanTim Blechmann
pixman declares prng_state as `omp threadprivate`, causing linker errors: prng_state: TLS reference mismatches non-TLS reference Signed-off-by: Tim Blechmann <tim@klingt.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-27icecc: blacklist systemtapTim Blechmann
compiling systemtap with icecc causes the following build failure > build/tmp/work/silvermont-64-poky-linux/systemtap/4.0-r0/recipe-sysroot/usr/include/python3.7m/modsupport.h:120:66: note: in definition of macro 'PyModule_AddIntMacro' > HelperSDT/_HelperSDT.c:145:34: error: 'PyTrace_RETURN' undeclared (first use in this function); did you mean 'PyTrace_C_RETURN'? Signed-off-by: Tim Blechmann <tim@klingt.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-13icecc.bbclass: catch subprocess.CalledProcessErrorMartin Jansa
* this might be related to: commit d2fcaeb153fdc3f8d7143ea823139f1537055ff1 Author: Douglas Royds <douglas.royds@taitradio.com> Date: Thu Dec 20 11:59:47 2018 +1300 icecc: Don't generate recipe-sysroot symlinks at recipe-parsing time * it's still a bit unclear when and why this happends, but I'm seeing random tasks sometimes failing with: WARNING: Exception during build_dependencies for set_icecc_env WARNING: Error during finalise of /build/meta-oe/meta-python/recipes-devtools/python/python-markupsafe_1.0.bb ERROR: Traceback (most recent call last): File "/build/bitbake/lib/bb/data_smart.py", line 411, in expandWithRefs s = __expand_python_regexp__.sub(varparse.python_sub, s) File "/build/bitbake/lib/bb/data_smart.py", line 136, in python_sub value = utils.better_eval(codeobj, DataContext(self.d), {'d' : self.d}) File "/build/bitbake/lib/bb/utils.py", line 421, in better_eval return eval(source, ctx, locals) File "Var <set_icecc_env>", line 1, in <module> File "/build/oe-core/meta/classes/icecc.bbclass", line 287, in icecc_get_and_check_tool link_path = icecc_get_tool_link(t, d) File "/build/oe-core/meta/classes/icecc.bbclass", line 246, in icecc_get_tool_link return subprocess.check_output("readlink -f %s" % tool, shell=True).decode("utf-8")[:-1] File "/usr/lib/python3.6/subprocess.py", line 336, in check_output **kwargs).stdout File "/usr/lib/python3.6/subprocess.py", line 418, in run output=stdout, stderr=stderr) subprocess.CalledProcessError: Command 'readlink -f /build/BUILD/work/qemux86-oe-linux/python-markupsafe/1.0-r0/recipe-sysroot-native/usr/bin/x86_64-oe-linux/x86_64-oe-linux-g++' returned non-zero exit status 1. The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/build/bitbake/bin/bitbake-worker", line 239, in child the_data = bb_cache.loadDataFull(fn, appends) File "/build/bitbake/lib/bb/cache.py", line 327, in loadDataFull bb_data = self.load_bbfile(virtualfn, appends, virtonly=True) File "/build/bitbake/lib/bb/cache.py", line 340, in load_bbfile datastores = parse_recipe(bb_data, bbfile, appends, mc) File "/build/bitbake/lib/bb/cache.py", line 303, in parse_recipe bb_data = bb.parse.handle(bbfile, bb_data) File "/build/bitbake/lib/bb/parse/__init__.py", line 107, in handle return h['handle'](fn, data, include) File "/build/bitbake/lib/bb/parse/parse_py/BBHandler.py", line 142, in handle return ast.multi_finalize(fn, d) File "/build/bitbake/lib/bb/parse/ast.py", line 386, in multi_finalize finalize(fn, d) File "/build/bitbake/lib/bb/parse/ast.py", line 351, in finalize bb.parse.siggen.finalise(fn, d, variant) File "/build/bitbake/lib/bb/siggen.py", line 147, in finalise taskdeps = self._build_data(fn, d) File "/build/bitbake/lib/bb/siggen.py", line 118, in _build_data tasklist, gendeps, lookupcache = bb.data.generate_dependencies(d) File "/build/bitbake/lib/bb/data.py", line 388, in generate_dependencies deps[dep], values[dep] = build_dependencies(dep, keys, shelldeps, varflagsexcl, d) File "/build/bitbake/lib/bb/data.py", line 317, in build_dependencies value, parsedvar = d.getVarFlag(key, "_content", False, retparser=True) File "/build/bitbake/lib/bb/data_smart.py", line 802, in getVarFlag parser = self.expandWithRefs(value, cachename) File "/build/bitbake/lib/bb/data_smart.py", line 424, in expandWithRefs raise ExpansionError(varname, s, exc).with_traceback(tb) from exc File "/build/bitbake/lib/bb/data_smart.py", line 411, in expandWithRefs s = __expand_python_regexp__.sub(varparse.python_sub, s) File "/build/bitbake/lib/bb/data_smart.py", line 136, in python_sub value = utils.better_eval(codeobj, DataContext(self.d), {'d' : self.d}) File "/build/bitbake/lib/bb/utils.py", line 421, in better_eval return eval(source, ctx, locals) File "Var <set_icecc_env>", line 1, in <module> File "/build/oe-core/meta/classes/icecc.bbclass", line 287, in icecc_get_and_check_tool link_path = icecc_get_tool_link(t, d) File "/build/oe-core/meta/classes/icecc.bbclass", line 246, in icecc_get_tool_link return subprocess.check_output("readlink -f %s" % tool, shell=True).decode("utf-8")[:-1] File "/usr/lib/python3.6/subprocess.py", line 336, in check_output **kwargs).stdout File "/usr/lib/python3.6/subprocess.py", line 418, in run output=stdout, stderr=stderr) bb.data_smart.ExpansionError: Failure expanding variable set_icecc_env, expression was if [ "${@use_icecc(bb, d)}" = "no" ] then return fi ICECC_VERSION="${@icecc_version(bb, d)}" if [ "x${ICECC_VERSION}" = "x" ] then bbwarn "Cannot use icecc: could not get ICECC_VERSION" return fi ICE_PATH="${@icecc_path(bb, d)}" if [ "x${ICE_PATH}" = "x" ] then bbwarn "Cannot use icecc: could not get ICE_PATH" return fi ICECC_BIN="${@get_icecc(d)}" if [ -z "${ICECC_BIN}" ]; then bbwarn "Cannot use icecc: icecc binary not found" return fi if [ -z "$(which patchelf patchelf-uninative)" ]; then bbwarn "Cannot use icecc: patchelf not found" return fi # Create symlinks to icecc in the recipe-sysroot directory mkdir -p ${ICE_PATH} if [ -n "${KERNEL_CC}" ]; then compilers="${@get_cross_kernel_cc(bb,d)}" else compilers="x86_64-oe-linux-gcc x86_64-oe-linux-g++" fi for compiler in $compilers; do ln -sf ${ICECC_BIN} ${ICE_PATH}/$compiler done ICECC_CC="${@icecc_get_and_check_tool(bb, d, "gcc")}" ICECC_CXX="${@icecc_get_and_check_tool(bb, d, "g++")}" # cannot use icecc_get_and_check_tool here because it assumes as without target_sys prefix ICECC_WHICH_AS="${@bb.utils.which(os.getenv('PATH'), 'as')}" if [ ! -x "${ICECC_CC}" -o ! -x "${ICECC_CXX}" ] then bbwarn "Cannot use icecc: could not get ICECC_CC or ICECC_CXX" return fi ICE_VERSION=`$ICECC_CC -dumpversion` ICECC_VERSION=`echo ${ICECC_VERSION} | sed -e "s/@VERSION@/$ICE_VERSION/g"` if [ ! -x "/build/BUILD/work/qemux86-oe-linux/python-markupsafe/1.0-r0/recipe-sysroot-native/usr/bin/icecc-create-env" ] then bbwarn "Cannot use icecc: invalid ICECC_ENV_EXEC" return fi ICECC_AS="`${ICECC_CC} -print-prog-name=as`" # for target recipes should return something like: # /OE/tmp-eglibc/sysroots/x86_64-linux/usr/libexec/arm920tt-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/4.8.2/as # and just "as" for native, if it returns "as" in current directory (for whatever reason) use "as" from PATH if [ "`dirname "${ICECC_AS}"`" = "." ] then ICECC_AS="${ICECC_WHICH_AS}" fi if [ ! -f "${ICECC_VERSION}.done" ] then mkdir -p "`dirname "${ICECC_VERSION}"`" # the ICECC_VERSION generation step must be locked by a mutex # in order to prevent race conditions if flock -n "${ICECC_VERSION}.lock" \ /build/BUILD/work/qemux86-oe-linux/python-markupsafe/1.0-r0/recipe-sysroot-native/usr/bin/icecc-create-env "${ICECC_CC}" "${ICECC_CXX}" "${ICECC_AS}" "${ICECC_VERSION}" then touch "${ICECC_VERSION}.done" elif ! wait_for_file "${ICECC_VERSION}.done" 30 then # locking failed so wait for ${ICECC_VERSION}.done to appear bbwarn "Timeout waiting for ${ICECC_VERSION}.done" return fi fi # Don't let ccache find the icecream compiler links that have been created, otherwise # it can end up invoking icecream recursively. export CCACHE_PATH="$PATH" export CCACHE_DISABLE="1" export ICECC_VERSION ICECC_CC ICECC_CXX export PATH="$ICE_PATH:$PATH" bbnote "Using icecc path: $ICE_PATH" bbnote "Using icecc tarball: $ICECC_VERSION" which triggered exception CalledProcessError: Command 'readlink -f /build/BUILD/work/qemux86-oe-linux/python-markupsafe/1.0-r0/recipe-sysroot-native/usr/bin/x86_64-oe-linux/x86_64-oe-linux-g++' returned non-zero exit status 1. ERROR: Task (virtual:multilib:lib32:/build/meta-oe/meta-python/recipes-devtools/python/python-markupsafe_1.0.bb:do_patch) failed with exit code '1' Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-15classes/icecc: Disable remote pre-processing by defaultJoshua Watt
Unfortunately, GCC has a number of outstanding bugs related to using -fdirectives-only, which causes a lot of errors when using Icecream. See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47254 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88475 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89658 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91152 Until many of these are addressed, it is better to disable remote preprocessing. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-25icecc.bbclass: stop causing everything to be effectivelly MACHINE_ARCHMartin Jansa
* since this change: commit d2fcaeb153fdc3f8d7143ea823139f1537055ff1 Author: Douglas Royds <douglas.royds@taitradio.com> Date: Thu Dec 20 11:59:47 2018 +1300 icecc: Don't generate recipe-sysroot symlinks at recipe-parsing time the set_icecc_env function depends on KERNEL_CC variable even for recipes like linux-libc-headers * KERNEL_CC variable depends on STAGING_KERNEL_DIR: Variable KERNEL_CC value is ${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_KERNEL_ARCH} -fuse-ld=bfd ${DEBUG_PREFIX_MAP} -fdebug-prefix-map=${STAGING_KERNEL_DIR}=${KERNEL_SRC_PATH} List of dependencies for variable KERNEL_CC is {'STAGING_KERNEL_DIR', 'HOST_PREFIX', 'DEBUG_PREFIX_MAP', 'HOST_CC_KERNEL_ARCH', 'KERNEL_SRC_PATH'} which depends on MACHINE: Variable STAGING_KERNEL_DIR value is ${TMPDIR}/work-shared/${MACHINE}/kernel-source List of dependencies for variable STAGING_KERNEL_DIR is {'MACHINE'} * as detected with: openembedded-core/scripts/sstate-diff-machines.sh --tmpdir=tmp-glibc --machines="qemux86 qemux86copy qemuarm" --targets=glibc --analyze ERROR: linux-libc-headers different signature for task do_configure.sigdata between qemux86 and qemux86copy NOTE: Starting bitbake server... basehash changed from 3146f4ffeb002bd69fed7656a4b896365b2e2a00071c69e1afbb672889e754ee to f1a5160e39912e61389b6f9fe68d61146a2be91716ac37e4a32ecf4c09b2b5fa Variable MACHINE value changed from 'qemux86' to 'qemux86copy' $ bitbake-diffsigs /OE/build/oe-core/tmp-glibc/sstate-diff/1556122458/qemux86*/*/linux-libc-headers/*do_configure.sigdata* NOTE: Starting bitbake server... basehash changed from f1a5160e39912e61389b6f9fe68d61146a2be91716ac37e4a32ecf4c09b2b5fa to 3146f4ffeb002bd69fed7656a4b896365b2e2a00071c69e1afbb672889e754ee Variable MACHINE value changed from 'qemux86copy' to 'qemux86' Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-03-09icecc: Slightly more verbose log messages in the success caseDouglas Royds
The path containing the symlinks to icecc itself. The path to the build env tarball. Signed-off-by: Douglas Royds <douglas.royds@taitradio.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-01-28classes/icecc: Add ICECC_REMOTE_CPP variableJoshua Watt
Newer versions of Icecream (1.2) add support for remotely pre-processing files, controllable with the ICECC_REMOTE_CPP environment variable. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-01-11classes/icecc: Remove trailing whitespaceJoshua Watt
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2019-01-11classes/icecc: Check blacklist for BPNJoshua Watt
If a given PN is listed in the icecream blacklist, there is a very good chance that the native, nativesdk, and multilib variants should also be skipped. Check the blacklist entries against BPN to cover them. [YOCTO #13128] Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-12-20icecc: patchelf is needed by icecc-create-envDouglas Royds
Although we could potentially build patchelf and all its dependencies, they would all have to be blacklisted to avoid trying to build them with icecc. We use the host patchelf instead. Signed-off-by: Douglas Royds <douglas.royds@taitradio.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-20icecc: Don't generate recipe-sysroot symlinks at recipe-parsing timeDouglas Royds
The python function icecc_path() was being invoked inline by set_icecc_env(), meaning that it was being invoked at recipe-parsing time. As a side-effect, icecc_path() was creating the recipe-sysroot directory and symlinking icecc into it. Because this was done at parsing time (rather than configure time), we were generating otherwise-empty WORKDIRs for *all* parsed recipes, and for all virtual classes (-native, -nativesdk). In my build, this generated more than 800 of these otherwise-empty WORKDIRs. I have simplified icecc_path() to return only the intended path to the icecc symlinks in the recipe-sysroot, with no side-effect. We then create the directory and the icecc symlinks at configure time. Because get_cross_kernel_cc() is still invoked at parse-time, it needs a guard-clause for the non-kernel case. We are now finding the host icecc at do_configure time, so icecc needs to be in the HOSTTOOLS. I have made this non-fatal, so that we can still inherit icecc without icecc installed. Signed-off-by: Douglas Royds <douglas.royds@taitradio.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-20icecc: Syntax error meant that we weren't waiting for tarball generationDouglas Royds
If two bitbake processes try to generate the ICECC_VERSION tarball at the same time, the thread that fails to get the lock will wait 30 sec for the first to finish. A syntax error meant that this was not happening, and in particular, if tarball generation failed (eg. for lack of patchelf), it did so silently. Signed-off-by: Douglas Royds <douglas.royds@taitradio.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-20icecc: Trivial simplificationDouglas Royds
Signed-off-by: Douglas Royds <douglas.royds@taitradio.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-20icecc: readlink -f on the recipe-sysroot gcc/g++Douglas Royds
We were accidentally doing a readlink -f on simply 'gcc', for instance Signed-off-by: Douglas Royds <douglas.royds@taitradio.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-05classes/icecc.bbclass: Fix ccache disableJoshua Watt
The ccache disable flag was misspelled, preventing it from being disabled. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-21meta/icecc.bbclass: Update system blacklistsJoshua Watt
Updates the system blacklists to include packages that are known to have problems compiling under icecream Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-21meta/icecc.bbclass: Move system blacklist to variablesJoshua Watt
The system blacklists are moved to variables which are ignore when hashing. This prevents changes to the blacklists from causing all taskhashes to change (and thus rebuild). Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-12allarch: only enable allarch when multilib is not usedKai Kang
Some allarch packages rdepends non-allarch packages. when multilib is used, it doesn't expand the dependency chain correctly, e.g. core-image-sato -> ca-certificates(allarch) -> openssl we expect dependency chain for lib32-core-image-sato: lib32-core-image-sato -> ca-certificates(allarch) -> lib32-openssl it should install lib32-openssl for ca-certificates but openssl is still wrongly required. Only enable allarch when multilib is not used to fix the issue. Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-04-23Revert "icecc.bbclass: Improve error reporting"Joshua Watt
This reverts commit b28114cf1e58643bd233bc0c83d6d8138952b7ac. The "-E" option for flock is not ubiquitously supported, so don't use it. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-04-13icecc.bbclass: Bump version numberJoshua Watt
Bump the version number for force remotes to use a newly generated environment, since the old one potentially had a few bugs Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-04-13icecc.bbclass: Improve error reportingJoshua Watt
Improve reporting when the icecream environment cannot be created by assigning the flock call a specific error number when the lock fails so it can be distinguished from environment creation errors. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-04-13icecc.bbclass: Add ICECC_ENV_DEBUG variableJoshua Watt
The ICECC_ENV_DEBUG variable can be set in local.conf to pass additional debugging options to the Icecream toolchain creation script. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-03-03icecc: Remove several getVar() expand argumentsJoshua Watt
Several of the calls to getVar() were either superfluously passing True for the expand argument, or were wrongly passing False Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-03-01icecc.bbclass: Ignore more icecream vars in hashesJoshua Watt
Changing ICECC_ENV_VERSION or select variables that the user can set to control the behavior of icecc should not cause recipes to rebuild Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-02-24icecc.bbclass: Remove icecream from uninativeJoshua Watt
The icecream native tools should not be included in uninative tarballs even though it is nativesdk Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-02-24icecc.bbclass: Add environment versionJoshua Watt
Adds a version to the environment which can be used to invalidate any previous environments on the remote compile nodes Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-02-24icecc.bbclass: Fix combining with ccacheJoshua Watt
Fixes the case where ccache is enabled along with Icecream. In these cases, there is the danger that Icecream will accidentally add the ccache executable to the toolchain, which prevents it from working. In particular, Fedora enables ccache by default via symbolic links in PATH. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-02-15icecc.bbclass: Disable caret workaround by defaultJoshua Watt
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>
2018-02-15icecc.bbclass: Add Icecream support to SDKJoshua Watt
If icecc is inherited, generated SDKs will automatically have optional support for compiling using the Icecream distributed compiler Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-02-15icecc.bbclass: Skip canadian-cross compilesJoshua Watt
icecc.bbclass will no longer attempt to distribute cross-canadian compiles. While it is technically possible to generate a toolchain that runs on the build system and generates executables for the host system, this is not the normal way that icecc operates. There are so few of these recipes that it is probably not worth maintaining a distinct code path for them. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-02-15icecc.bbclass: Fix STAGING_BINDIR_TOOLCHAIN usageJoshua Watt
STAGING_BINDIR_TOOLCHAIN is actually a path list, not a single path. Fix icecc.bbclass to try all the paths in the variable instead of treating it as a single path. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-02-15icecc.bbclass: Move to shared work directoryJoshua Watt
Generate the icecc toolchains in a shared work directory. This class was already setup to correctly synchronize creating the toolchains in a shared location before the RSS changes, so return to that behavior instead of generated the toolchains in each recipe's sysroot. Additionally, it makes no sense for each recipe to generate a toolchain, only to find it was already generated and uploaded to the compile server by another recipe. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>