summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/icecc-create-env/icecc-create-env/icecc-create-env
Commit message (Collapse)AuthorAgeFilesLines
* icecc-create-env: Add extra tools optionJoshua Watt2018-04-131-0/+12
| | | | | | | | | | | It can often be useful to include additional debugging tools the toolchain such as strace. Add an option to include an arbitrary path. (From OE-Core rev: 1fc1e3d59afd292ff8f7c4e1f64324134b73b8f4) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* icecc-create-env: Fix library interpreter usageJoshua Watt2018-04-131-35/+77
| | | | | | | | | | | | | | | | | | | | | 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 (From OE-Core rev: 4f55e61e9e3dd921bd71a127580dc5fc71d7b339) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* icecc-create-env: Fix RUNPATH filesJoshua Watt2018-04-131-1/+3
| | | | | | | | | | | | | | 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. (From OE-Core rev: d1e88ad01df9b6419e02f632b1ba288d4cc3b2bf) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* icecc-create-env: Allow logging to a fileJoshua Watt2018-04-131-25/+49
| | | | | | | | | | | | | 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 (From OE-Core rev: 3d0bd786fd79967cf8754d022044df311dd8ad3e) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* icecc-create-env: Allow multiple tool aliasesJoshua Watt2018-02-151-56/+54
| | | | | | | | | | | | 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. (From OE-Core rev: 0a5bbad5810b69fa09dbd8d886e4f368310a5db9) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* icecc-create-env: Fix executable rpathsJoshua Watt2018-02-151-3/+37
| | | | | | | | | | | | | | | | | | | | | 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. (From OE-Core rev: cfe98765b40c28a132b5a4bce39f71f06b4eb0bc) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* icecc-create-env: Archive directoryJoshua Watt2018-02-151-1/+5
| | | | | | | | | | | | | | | | | 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 (From OE-Core rev: 122d6a5bdcbc494bba0fa2b213d730500f6f7dbc) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* icecc-create-env: Symlink alternate namesJoshua Watt2018-02-151-7/+57
| | | | | | | | | | | 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. (From OE-Core rev: 256f8f6cc5b520b59cfdc44aa076f71990e18e2c) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* icecc-create-env: Use program interpreter for depsJoshua Watt2018-02-151-3/+17
| | | | | | | | | | | | | 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. (From OE-Core rev: 96d5831ef0e535d3f91acd3e979316355fbde04e) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* icecc-create-env: Add /bin/true to environmentJoshua Watt2018-02-151-0/+10
| | | | | | | | | | | 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. (From OE-Core rev: c86aa6edab842c579177fe5c1f8647290b58fe61) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* icecc-create-env: ReformatJoshua Watt2018-02-151-104/+104
| | | | | | | | | | | | 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) (From OE-Core rev: 884c2436a6dbcb6bff99409a80276b9ef5690875) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* icecc-create-env-native: Drop FILESPATH, document PATCHTOOLMartin Jansa2013-12-051-0/+192
* moving icecc-create-env to BPN allows to drop FILESPATH * document PATCHTOOL, because it's not easy to guess why it's needed (From OE-Core rev: a29c71024c304263bfb0732c870f20c1a6af7f64) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>