aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/icecc.bbclass
AgeCommit message (Collapse)Author
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>
2017-07-21icecc.bbclass: prevent nativesdk builds depending on target specific KERNEL_CCMartin Jansa
* without this we cause nativesdk-linux-libc-headers to depend on target specific KERNEL_CC (through icecc_get_tool -> icecc_is_kernel -> KERNEL_CC -> HOST_CC_KERNEL_ARCH -> TARGET_CC_KERNEL_ARCH -> TUNE_FEATURES(thumb) as shown by bitbake-diffsigs: OE qemux86@ ~/build/oe-core $ ls /OE/build/oe-core/tmp-glibc/sstate-diff/1499859497/qemu*/*sdk*/*/*do_configure.sigdata* /OE/build/oe-core/tmp-glibc/sstate-diff/1499859497/qemuarm/x86_64-nativesdk-oesdk-linux/nativesdk-linux-libc-headers/4.10-r0.do_configure.sigdata.3a9a423878d56524e0ee8e42eba1804f /OE/build/oe-core/tmp-glibc/sstate-diff/1499859497/qemux86/x86_64-nativesdk-oesdk-linux/nativesdk-linux-libc-headers/4.10-r0.do_configure.sigdata.401071dbaa88903ece37d35a47965ff2 OE qemux86@ ~/build/oe-core $ bitbake-diffsigs /OE/build/oe-core/tmp-glibc/sstate-diff/1499859497/qemu*/*sdk*/*/*do_configure.sigdata* basehash changed from 39774238b66763c598153132e87a2c1a to aa2d66e770bf533e312536eb0a401c4c Variable TARGET_CC_KERNEL_ARCH value changed from '${@bb.utils.contains('TUNE_FEATURES', 'thumb', '-mno-thumb-interwork-marm', '', d)} TUNE_FEATURES{thumb} = Set' to '' Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-06-16meta: Remove further uclibc remnants (inc. patches and site files)Richard Purdie
Some of these are clearly dead, e.g. one binutils patch reverts the effects of the earlier one. This also removes the uclibc site files. We now have mechanisms to allow these to be extended from another layer should someone ever wish to do that. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-16meta: remove True option to getVar callsJoshua Lock
getVar() now defaults to expanding by default, thus remove the True option from getVar() calls with a regex search and replace. Search made with the following regex: getVar ?\(( ?[^,()]*), True\) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-10-05icecc.bbclass: replace os.popen with subprocess.check_outputMartin Jansa
* otherwise there is a lot of warnings about missing close on file descriptor Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-26icecc.bbclass: replace icc with iceccAlex Franco
Make this class more clear and consistent, and avoid confusion with the Intel C compiler (icc); the changes affect function names, and calls to those functions [YOCTO #8934] Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-26icecc.bbclass: expand package archAlex Franco
Expanding PACKAGE_ARCH might be necessary as it is being checked against to determine if this is allarch [YOCTO #8934] Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-26icecc.bbclass: add icc_is_allarch inherit checkAlex Franco
Additional check for inheritance of allarch.bbclass, for when checking that PACKAGE_ARCH == "all" is not enough to be sure a recipe is "allarch"; e.g. nativesdk-buildtools type recipes [YOCTO #8934] Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-23meta: Add explict getVar param for (non) expansionRichard Purdie
Rather than just use d.getVar(X), use the more explict d.getVar(X, False) since at some point in the future, having the default of expansion would be nice. This is the first step towards that. This patch was mostly made using the command: sed -e 's:\(getVar([^,()]*\)\s*):\1, False):g' -i `grep -ril getVar *` Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-28icecc.bbclass: blacklist libgcc-initialDmitry Eremin-Solenikov
Building libgcc-initial with IceCC enabled can fail with the CPP sanity check error in the following case (using ARM for example): * sysroot contains cross gcc built for another ARM variant * sysroot contains initial cross gcc built to suit the target machine * bitbake tries to configure libgcc-initial * libgcc-initial calls icecc wrapper * icecc wrapper calls non-initial cross gcc via the full path * non-initial cross gcc looks for the headers in the wrong place * BOOM Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-16icecc.bbclass: properly handle disabling of iceccDmitry Eremin-Solenikov
Always use use_icc to check if IceCC should be enabled. Move ICECC_DISABLED variable checking to use_icc function. Also while we are at it, fix condition in icc_is_allarch function. Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-23icecc: don't create unnecessary 'ice' dirs in sysroots when disabledMartin Jansa
* parsing ICE_PATH="${@icc_path(bb, d)}" causes "ice" directories to be created in every sysroot, that could be a bit confusing for people who inherit icecc.bbclass, but disabled it * shorten ICECC_VERSION="${@icc_version(bb, d)}" path a bit by returning sooner when disabled * remove ICECC_PATH and ICECC_ENV_EXEC from signatures, we assume that using icecc doesn't influence the output, so it shouldn't matter when user supplies own version of icecc or env script * always compare ICECC_DISABLED with "1", boolean typed_value isn't used because documentation already mentions using empty value to keep icecc enabled and that's not valid boolean value when oe.data.typed_value is used: ERROR: ICECC_DISABLED: Invalid boolean value '' Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-19icecc: use exact match in blacklists, re-start with empty ↵Martin Jansa
system_package_blacklist * unify debug messages a bit * old implementation allowed partial match in blacklist, it's safer to explicitly list exact matches * I was able to build all entries from system_package_blacklist with icecc enabled, lets assume that they were already resolved by newer versions (we've fixed a lot of parallel issues in recipes which were detected even without icecc and this list is very old). Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-19icecc: Fix allarch and native recipes having different signaturesMartin Jansa
* for different MACHINES * is there more elegant way to have "overridable" function so that signature handler properly uses only the branch without STAGING_BINDIR_TOOLCHAIN? Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-19icecc: use bb.utils.which also for 'as'Martin Jansa
* it was introduced in commit 3a842ec52e7d010767b13bdcb5629ac07b3ee9e7 Author: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Date: Fri Sep 16 10:55:16 2011 +0400 Subject: icecc.bbclass: replace with updated version without any explanation in which case ${ICECC_CC} -print-prog-name=as is returning as in current working directory, but will keep old behavior just in case Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-19icecc: Don't replace non-empty PARALLEL_MAKE with empty ICECC_PARALLEL_MAKEMartin Jansa
* it's needed for use-case like this: # Inherit icecc here, so that all builders have the same sstate signatures INHERIT_DISTRO += "icecc" # and then disable its function by default (so that people still need to explicity # enable it in local.conf if they have configured icecc and want to use it. # You need to set _empty_ value in local.conf to enable icecc function: # ICECC_DISABLED = "" ICECC_DISABLED ??= "1" * so default ICECC_PARALLEL_MAKE is still empty, but we want build to respect our PARALLEL_MAKE, unfortunately we cannot do something like ICECC_PARALLEL_MAKE ??= "${PARALLEL_MAKE}", because that would cause PARALLEL_MAKE to reference itself. Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-05icecc.bbclass: Fix whitespace, improve commentMartin Jansa
* Add leading space in big documentation block at the top * Drop trailing spaces in code * Update documentation to mention 'bb.utils.which' instead of 'which' Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03classes/icecc: fix typos in header commentsPaul Eggleton
Looking at the code, it should be ICECC_USER_PACKAGE_BL and not ICECC_PACKAGE_BL here, and also fix "localy" -> "locally". Thanks to Scott Rifenbark for pointing this out. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-27icecc: Disable icecc for allarch recipesMartin Jansa
* Fix icecc.bbclass failing with: ERROR: recipe-name NULL prefix when it's used with empty TARGET_PREFIX. * Allarch recipes cannot use compiler at all (even the local one) so there is no point of using icecc for them. Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-20icecc: Use bb.utils.which instead of calling whichTobias Henkel
The icecc class often calls 'which' for determining paths. This leads to many messages on stderr in case 'which' doesn't find the executable. Using bb.utils.which is more appropriate here and doesn't pollute stderr. Signed-off-by: Tobias Henkel <tobias.henkel@bmw-carit.de> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-11-12icecc: Fix race condition when packaging toolchainTobias Henkel
In the current implementation there can be a race condition while creating the toolchain archive causing the build to break. This is fixed by locking the toolchain archiving step using flock. Signed-off-by: Tobias Henkel <tobias.henkel@bmw-carit.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-12icecc: Add package whitelistTobias Henkel
There are some recipes which parse the PARALLEL_MAKE variable by their own and set them to an empty string afterwards. This disables icecc for this recipe. Adding a whitelist for forcing icecc makes it possible to use icecc also with these recipes. Signed-off-by: Tobias Henkel <tobias.henkel@bmw-carit.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-12icecc: Support shell evaluation of KERNEL_CCTobias Henkel
In the current implementation a KERNEL_CC variable containing shell evaluation breaks the build process. Shell expansion is not happening before general expansion in get_cross_kernel_cc which results in a syntax error and an aborted parse process. Before expanding the KERNEL_CC variable get_cross_kernel_cc now checks for backticks or '$(' in the KERNEL_CC variable and performs a shell evaluation using a call to echo if it finds one. Signed-off-by: Tobias Henkel <tobias.henkel@bmw-carit.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-12icecc: Enable icecc also for install stepTobias Henkel
Some packages are calling the compiler in the install step. In this case either the build breaks or icecc is not used for building. The proper environment has to be set to enable icecc based building. Signed-off-by: Tobias Henkel <tobias.henkel@bmw-carit.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-12icecc: Add dummy python version of set_icecc_envTobias Henkel
Bitbakes prepend mechanism for the tasks disregards the type of the function. Thus bitbaking recipes using python functions for configure, compile or install steps fail due to the missing python version of set_icecc_env. Assuming that icecc doesn't need to be used in such situations adding a dummy python version of set_icecc_env fixes this. Signed-off-by: Tobias Henkel <tobias.henkel@bmw-carit.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-12icecc: Add blacklist vars to BB_HASHBASE_WHITELISTTobias Henkel
Changing any of the ICECC blacklist variables should not change the sstate checksum as this doesn't influence the build result. Signed-off-by: Tobias Henkel <tobias.henkel@bmw-carit.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-12icecc: Reduce verbosity with empty PARALLEL_MAKETobias Henkel
Currently the icecc class prints a note for every package which disables parallel make at parse time. This is unneccessary as many packages don't support parallel building. Changing the log level from info to debug hides these messages in normal builds without removing the information when needed. Signed-off-by: Tobias Henkel <tobias.henkel@bmw-carit.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-12icecc: Log reason in error casesTobias Henkel
The current implementation doesn't give a hint about the cause in case something went wrong in set_icecc_env. This makes it harder to find out why a package is not being built using icecc. Therefore warnings are inserted in the various error cases. Signed-off-by: Tobias Henkel <tobias.henkel@bmw-carit.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-11icecc: Allow to use this bbclass together with external toolchainsMartin Jansa
* original implementation by Antti Harju Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-15icecc: improve interaction with sstateMartin Jansa
* exclude ICECC_PARALLEL_MAKE (like PARALLEL_MAKE is) * add ICECC_DISBLED to be able to disable whole icecc functionality while keeping icecc enabled. This is useful when you want multiple builders sharing same sstate-cache, but only some of them using icecc. * inheriting icecc changes all checksums because of do_*_prepends calls, but because icecc should not influence binary output of task we should get same checksums for tasks build with and without icecc * ICECC_DISABLED when set (to any non-empty value will disable icecc env modifications but while keeping same sstate checksum Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-05-30Revert "meta: replace os.popen with subprocess.Popen"Richard Purdie
This reverts commit e83d8e58a6b107eea87df0ec233a1bc932b2c6e as the conversion is not correct. Its replacing readlines() calls which generate an array with what are effectively strings. There are split("\n") calls missing in many cases so this needs to be reverted until it gets fixed.
2012-05-30meta: replace os.popen with subprocess.PopenRobert Yang
Replace os.popen with subprocess.Popen since the older function would fail (more or less) silently if the executed program cannot be found There are both bb.process.run() and bb.process.Popen() which wraps the subprocess module, use it for simplifying the code. Note: We don't need the "2>/dev/null" or "2>&1" since bb.process.run() can handle it, it will raise exception when error occurs, we should handle the exception ourselves if we want to ignore the error. More info: http://docs.python.org/library/subprocess.html#subprocess-replacements [YOCTO #2454] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-26Various typoes fixed, all comments or output strings.Robert P. J. Day
Typoes fixed: "enviroment", "editted", "spliting", "scheulder". Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-05meta: Replace bb.data.expand(xxx, d) -> d.expand(xxx)Richard Purdie
sed \ -e 's:bb.data.\(expand([^,()]*\), *\([^) ]*\) *):\2.\1):g' \ -i `grep -ril bb.data.expand *` Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-12-19icecc.bbclass: also use icecc for kernel modules compilationDmitry Eremin-Solenikov
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-10Convert to use direct access to the data store (instead of bb.data.*Var*())Richard Purdie
This is the result of running the following over the metadata: sed \ -e 's:bb.data.\(setVar([^,()]*,[^,()]*\), *\([^ )]*\) *):\2.\1):g' \ -e 's:bb.data.\(setVarFlag([^,()]*,[^,()]*,[^,()]*\), *\([^) ]*\) *):\2.\1):g' \ -e 's:bb.data.\(getVar([^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \ -e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \ -e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^() ]*\) *):\2.\1):g' \ -e 's:bb.data.\(getVar([^,()]*\), *\([^) ]*\) *):\2.\1):g' \ -i `grep -ril bb.data *` Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-22icecc.bbclass: fix handling of nativesdk and cross-canadian packagesDmitry Eremin-Solenikov
icecc.bbclass assumed that nativesdk and cross-canadian packages should use local icecc version. Instead those packages should use target-like scheme for toolchain tarball generation. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-22icecc-create-env: rename to -nativeDmitry Eremin-Solenikov
icecc-create-env(-native) is a native package. But if it doesn't have the -native suffix, some dependency tracking stuff in oe-core (in nativesdk.bbclass) get's crazy about it, trying to generate dependencies to icecc-create-env-native packages. To fix that simply add -native suffix to this package. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-16icecc.bbclass: replace with updated versionDmitry Eremin-Solenikov
Replace a non-working icecc class with a rewritten one. It's cleaned up, most things are handled now in shell scripts, as it's possible that toolchains won't exist at the time of parsing/python substitution. Packages which empty PARALLEL_MAKE are ignored now, as not to break them. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2010-04-27Install cross-packages into the native sysrootJoshua Lock
Cross is no longer required so can go away, we now install cross packages into the native sysroot and use them from there. This patch includes updates to classes and some recipes which reference CROSS_DIR. Others still need fixing an image can be built and run with this patch applied. Signed-off-by: Joshua Lock <josh@linux.intel.com>
2009-11-16rootfs_rpm/icecc: Sync whitespace with OE.devRichard Purdie
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-11-13classes: Remove and sanitise import statementsRichard Purdie
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2007-12-01icecc.bbclass: Sync from OERichard Purdie
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3292 311d38ba-8fff-0310-9ca6-ca027cbcb966