diff options
author | Stefan Agner <stefan.agner@toradex.com> | 2017-12-12 17:13:24 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-01-02 17:24:37 +0000 |
commit | 2362b78887a63e2e7e5afe1c1cc539c4a6be959d (patch) | |
tree | ae98ce6455bebd229a9296f71c87fa320abd96e6 | |
parent | ff6d3524c18578dcdcdb44e0a457b9c20fa91230 (diff) | |
download | poky-2362b78887a63e2e7e5afe1c1cc539c4a6be959d.tar.gz |
waf.bbclass: explicitly pass bindir and libdir if supported
On some build hosts distros (e.g. Fedora 26) waf tries to be
smart about libdir detection and defaults to [EXEC_PREFIX/lib64].
This obviously is not what we want for 32-bit targets and usually
fails in the do_package phase:
WARNING: gstreamer1.0-plugins-imx-0.13.0-r0 do_package: QA Issue: gstreamer1.0-plugins-imx: Files/directories were installed but not shipped in any package:
/usr/lib64/libgstimxcommon.so.0
...
Depending on version, waf knows prefix or prefix, bindir and
libdir as default options. Explicitly pass the right set of
arguments.
(From OE-Core rev: 923f91d8d8606141ce218927bc943f4f4f34bcdd)
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/waf.bbclass | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/meta/classes/waf.bbclass b/meta/classes/waf.bbclass index c4698e910a..acbda278a2 100644 --- a/meta/classes/waf.bbclass +++ b/meta/classes/waf.bbclass | |||
@@ -25,8 +25,23 @@ def get_waf_parallel_make(d): | |||
25 | 25 | ||
26 | return "" | 26 | return "" |
27 | 27 | ||
28 | python waf_preconfigure() { | ||
29 | from distutils.version import StrictVersion | ||
30 | srcsubdir = d.getVar('S') | ||
31 | wafbin = os.path.join(srcsubdir, 'waf') | ||
32 | status, result = oe.utils.getstatusoutput(wafbin + " --version") | ||
33 | if status != 0: | ||
34 | bb.warn("Unable to execute waf --version, exit code %d. Assuming waf version without bindir/libdir support." % status) | ||
35 | return | ||
36 | version = result.split()[1] | ||
37 | if StrictVersion(version) >= StrictVersion("1.8.7"): | ||
38 | d.setVar("WAF_EXTRA_CONF", "--bindir=${bindir} --libdir=${libdir}") | ||
39 | } | ||
40 | |||
41 | do_configure[prefuncs] += "waf_preconfigure" | ||
42 | |||
28 | waf_do_configure() { | 43 | waf_do_configure() { |
29 | ${S}/waf configure --prefix=${prefix} ${EXTRA_OECONF} | 44 | ${S}/waf configure --prefix=${prefix} ${WAF_EXTRA_CONF} ${EXTRA_OECONF} |
30 | } | 45 | } |
31 | 46 | ||
32 | waf_do_compile() { | 47 | waf_do_compile() { |