summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/icecc-create-env
AgeCommit message (Collapse)Author
2019-11-14icecc-create-env: Use OE patchelf in SDKJoshua Watt
The Icecream environment creation script runs when the SDK is installed and uses patchelf to fix up executables. Rather than rely on the host system to provided patchelf (which often can be older versions that produce buggy executables), mark the OE version of patchelf as a dependency of icecc-create-env when included in the SDK. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-04-13icecc-create-env: Add extra tools optionJoshua Watt
It can often be useful to include additional debugging tools the toolchain such as strace. Add an option to include an arbitrary path. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-04-13icecc-create-env: Fix library interpreter usageJoshua Watt
Shared libraries sometimes (frequently?) don't have a program interpreter specified. The previous code would fail to find the library dependencies in these cases because no interpreter could be found. Commonly, this meant that if a library depends on another library, it might not be included toolchain because dependency scanning stops with the first one. Instead, capture the program interpreter from the program or library that starts the dependency chain and use that interpreter to get all of the dependencies in the chain, recursively. Additionally, if no interpreter can be found, fallback to using ldd Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-04-13icecc-create-env: Fix RUNPATH filesJoshua Watt
Some newer libraries and programs use RUNPATH to specify the library search path. These executables were being skipped by the rpath fixup code because it was grepping the ELF header for RPATH only. A more correct solution is to ask patchelf to report the rpath, as that tool will properly report either RPATH or RUNPATH as appropriate. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-04-13icecc-create-env: Allow logging to a fileJoshua Watt
Modifies the icecc-create-env script so that it can log output to a log file. In addition, a --debug flag is added that allows verbose logging. Finally, the silent flag was removed since it was never used in icecc.bbclass Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-02-15icecc-create-env: Allow multiple tool aliasesJoshua Watt
When files are added to the environment, multiple aliases can be given for the file (by calling add_path multiple times with a second argument). All of these names will end up with a symlink to the original file. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-02-15icecc-create-env: Add support for nativesdkJoshua Watt
icecc-create-env can now be built as a nativesdk recipe, allowing the script to be included as part of an SDK Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-02-15icecc-create-env: Fix executable rpathsJoshua Watt
Executables in the toolchain archive occasionally contain runtime library search paths (RPATH) that use the $ORIGIN placeholder. However, in order for that placeholder to work, /proc must be mounted. When iceccd executes the toolchain in the chroot environment, it doesn't mount /proc, so it is unable to resolve $ORIGIN resulting in a failure to find dynamic libraries. The fix is to replace $ORIGIN in executable RPATH entries with the known chroot executable path. In order for this to work, the actual real path to the executable must be resolved to remove any symlinks, otherwise the calculate $ORIGIN replacement will be wrong. This is done by using "readlink -f", which is an acceptable dependency because Yocto already requires it. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-02-15icecc-create-env: Archive directoryJoshua Watt
Taring up the toolchain is now done by adding the entire working directory, instead of listing all the files individually. This is done because the list of files may contain ".." entries, which tar does not like and strips out, resulting in bad archives. This should result in an identical archive to what was previously generated. In addition, symbolic links are no longer dereferenced when creating the archive, as they are purposely included to provide alternate names for files Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-02-15icecc-create-env: Symlink alternate namesJoshua Watt
Instead of renaming files to a new path in the toolchain archive, keep the files with their original paths and create a relative symbolic link from the new path to the original file. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-02-15icecc-create-env: Use program interpreter for depsJoshua Watt
ldd cannot always be used to determine a program's dependencies correctly, particularly when the program specifies an alternate program interpreter (dynamic loader). This commonly happens when using a uninative tarball. Instead, determine the program's requested interpreter, and ask it to list the dependencies. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-02-15icecc-create-env: Add /bin/true to environmentJoshua Watt
icecream daemons execute /bin/true from the environment as a check to determine if the environment is valid at all, so it needs to be included. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-02-15icecc-create-env: ReformatJoshua Watt
The environment script used an annoying mix of tabs and spaces and no mapping of tabs to spaces would produce pleasant indentation. Reformat to eliminate tab characters and settle on 4 spaces for indentation (which matches the upstream icecream script from which this is derived) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-02icecc-create-env-native: add SUMMARY and tweak DESCRIPTIONPaul Eggleton
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-12-05icecc-create-env-native: Drop FILESPATH, document PATCHTOOLMartin Jansa
* moving icecc-create-env to BPN allows to drop FILESPATH * document PATCHTOOL, because it's not easy to guess why it's needed Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-21ldconfig/cdrtools/icecc-create-env/linuxdoc-tools/python: Set FILESPATH to ↵Richard Purdie
find -native files In a small number of cases we need to have ${PN} in FILESPATH rather than ${BPN}. Rather than hurt readability for all other recipes, set FILESPATH in these recipes so we can prune the default. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-12-15icecc-create-env-native_0.1.bb: drop 'PRIORITY = "optional"' as it is the ↵Otavio Salvador
default Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-26icecc-create-env-native: provide the script right in the treeDmitry Eremin-Solenikov
There is no point in downloading a tarball with no clear upstream (other than icecc itself) and then patching it. Rather put new script in the source tree. 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-create-env: a tool to create icecc toolchain tarballsDmitry Eremin-Solenikov
IceCC needs tarballs with toolchains to work correctly. This is a version largely based on one from org.openembedded.dev, plus a patch to support recent compilers, LTO, etc. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>