summaryrefslogtreecommitdiffstats
path: root/meta/classes/chrpath.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* bbclass: fix spelling mistakesMaxin B. John2015-11-241-2/+2
| | | | | | | | | | Fix some spelling mistakes in bbclass files (From OE-Core rev: ed484c06f436eea62c5d0b1a2964f219f3e5cb61) Signed-off-by: Maxin B. John <maxin.john@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: Add explict getVar param for (non) expansionRichard Purdie2015-06-231-1/+1
| | | | | | | | | | | | | | 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 *` (From OE-Core rev: ab7c1d239b122c8e549e8112c88fd46c9e2b061b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* chrpath.bbclass: handle RUNPATH as well as RPATHAndre McCurdy2015-03-161-0/+2
| | | | | | | | | | | Binaries linked with gold may contain a RUNPATH instead of an RPATH. Update chrpath.bbclass process_file_linux() to handle both cases. (From OE-Core rev: 46ceb4d035e4f49e6b4a3a83bf604944d2b991c1) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* chrpath: Drop warning from darwn buildsRichard Purdie2014-08-171-1/+0
| | | | | | | | This was old debug which can safely be removed for less noisy builds. (From OE-Core rev: d0be4b37743492fc9c178fd6f9ef73a5eb2fd9c3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* chrpath: properly handle rootdir with '..' in pathMatt Cowell2014-05-111-0/+1
| | | | | | | | | | | When there is a '..' in the rootdir path, rootdir will not be a substring of fpath. This causes an incorrect rpath of the difference between the workdir and the sysroot to be computed, which is incorrect. Normalizing basedir fixes this issue. (From OE-Core rev: 753cfcadd8cc683e69b6707b823dc49dfb34ab0b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* chrpath: Improve crazy codeRichard Purdie2013-11-291-37/+17
| | | | | | | | | | | | | | | | | | | | | | | | | The current code is a little bit overcomplicated, deficient and also possibly broken. Issues include: a) Not maximally optisming rpaths (e.g. a lib in usr/lib might get an rpath of $ORIGIN/../../usr/lib) b) The return in the middle of the for loop look suspiciously like it might break on some binaries c) The depth function, loops of "../" prepending and so on can be replaced with a call to os.path.relpath This patch cleans up the above issues. Running binaries should result in less "../" resolutions which can't hurt performance either. [YOCTO #3989] (From OE-Core rev: feea54df6768036649ca6c57524e2a1f480ad249) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* chrpath: Add support for relocating darwin binariesRichard Purdie2013-08-231-50/+88
| | | | | | | | | | On darwin, install_name_tool can be used to relocate binaries/libraries. This adds support for adjusting them with relative paths rather than hardcoded ones. The Linux code is factored out into a function but is otherwise unchanged. (From OE-Core rev: ed5ace3437eb0f751172e6b93399639c94b89e59) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* chrpath.bbclass: Normalize rpath only of it doesn't contain ORIGIN variableAndrei Gherzan2012-12-141-1/+1
| | | | | | | | | | | If we normalize a rpath which contains ORIGIN variable, the binary will end up without those rpaths at all. So check first if rpath contains ORIGIN variable and if not, move on and normalize it. (From OE-Core rev: 46dc514ff5a3d2693546cf95c5481e0539c43580) Signed-off-by: Andrei Gherzan <andrei.gherzan@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* chrpath: normalize the pathsSaul Wold2012-12-131-2/+3
| | | | | | | | | | | | By normalizing the paths the path comparing code works correct to generate the right RPATH even when there is a A/../A in TMPDIR [YOCTO #3408] (From OE-Core rev: 50327f2bba9f479dd209cdc54646b9d551e84c59) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* chrpath.bbclass: Account for case when ORIGIN is in RPATHKhem Raj2012-08-171-1/+2
| | | | | | | | | | | | | | | | | | | | | This fixes a case when RPATH embedded in program have one of its path already relative to ORIGIN. We were losing that path if such a path existed. This patch appends it to the new edited rpath being created when we see it. so RPATH like below (RPATH) Library rpath: [$ORIGIN/../lib/amd64/jli:$ORIGIN/../jre/lib/amd64/jli] would end up being empty but after this patch its kept intact (From OE-Core rev: 43600df0d4efc976a9451163dd334b4763937932) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* chrpath.bbclass: Ensure we only process tmpdir in paths which actually ↵Richard Purdie2012-08-171-2/+4
| | | | | | | | | | | contain that path Without this change, a path to "/lib/xxx" or "/usr/lib/xxx" would also attempt to be remapped to be relative to $ORIGIN which makes no sense. (From OE-Core rev: 73e2c12534856f14c1a94fb51874e9ba1655f07b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/chrpath: improve chrpath failure handlingPaul Eggleton2012-08-171-3/+5
| | | | | | | | | | | When chrpath fails, prefix the error message with the name of the recipe that is being processed, and include the the output from chrpath, as well as making the calling task actually fail. (From OE-Core rev: 99815eddd4e1eb5d939831704231537dd5a995ad) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/chrpath: trigger an error if chrpath failsPaul Eggleton2012-08-151-1/+3
| | | | | | | | | If chrpath failed here we were just silently ignoring it. (From OE-Core rev: 24babf9316da50c8a4d2f328c4336cb8cd6cf667) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* relocatable.bbclass: split it up, to reuse codeLaurentiu Palcu2012-08-021-0/+89
Most of the code in relocatable.bbclass will be used for relocating the SDK binaries. So, create another class chrpath.bbclass that will contain the core of the relocatable.bbclass, so we can reuse it. (From OE-Core rev: b50677b1641b201fd69942fd82a360907338234d) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>