Age | Commit message (Collapse) | Author | Files |
|
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>
|
|
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This sets a good example and avoids unnecessarily contributing to
perceived complexity and cargo culting.
Motivating quote below:
< kergoth> the *original* intent was for the function/task to error via
whatever appropriate means, bb.fatal, whatever, and
funcfailed was what you'd catch if you were calling
exec_func/exec_task. that is, it's what those functions
raise, not what metadata functions should be raising
< kergoth> it didn't end up being used that way
< kergoth> but there's really never a reason to raise it yourself
FuncFailed.__init__ takes a 'name' argument rather than a 'msg'
argument, which also shows that the original purpose got lost.
Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This is a non-functional change, which intends to correct element
names of a tuple returned by Popen.communicate().
Both in python2 and python3 subprocess.Popen.communicate() method
returns a tuple (stdoutdata, stderrdata), thus old assignments and
collateral comments are incorrect from human's point of view, however
formally there is no error in the code.
The change is desired to have to avoid copy-paste errors in future.
Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
In python3, strings are unicode by default. We need to encode/decode
from command pipelines and other places where we interface with the
real world using the correct locales. This patch updates various
call sites to use the correct encoding/decodings.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Fix some spelling mistakes in bbclass files
Signed-off-by: Maxin B. John <maxin.john@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
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>
|
|
Binaries linked with gold may contain a RUNPATH instead of an RPATH.
Update chrpath.bbclass process_file_linux() to handle both cases.
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
This was old debug which can safely be removed for less noisy builds.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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.
Signed-off-by: Andrei Gherzan <andrei.gherzan@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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]
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
If chrpath failed here we were just silently ignoring it.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|