diff options
author | Joshua Watt <JPEWhacker@gmail.com> | 2020-07-21 12:52:19 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-07-31 22:02:52 +0100 |
commit | 9d7e7b5b574f1620a6516a27e8f8cfd418b827b0 (patch) | |
tree | d0856cb1500ebfb94d1529f9cdffaf4cf0a3262c /meta/classes/package.bbclass | |
parent | aea80fa7d11a56a2d17458ce0f51fc3c8fc9a49b (diff) | |
download | poky-9d7e7b5b574f1620a6516a27e8f8cfd418b827b0.tar.gz |
classes/package: Use HOST_OS for runtime dependencies
The code was using TARGET_OS to try and detect what type of OS the
packages would be running on, but this is incorrect. TARGET_OS is the OS
for which the package will generate output (e.g. GCC output target or
GDB debugging target). The OS where the package will run is the HOST_OS.
Note that HOST_OS only differs from TARGET_OS when doing a
canadian cross compile, and even then in our case only when doing so for
a non-Linux host (e.g. MinGW).
Fix the code to use HOST_OS instead.
(From OE-Core rev: 2541b5be1e9c2c33ca8017130461a19f8734d883)
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit f284c5b2df220b520b025a59874e04ef4becd829)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/package.bbclass')
-rw-r--r-- | meta/classes/package.bbclass | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index d4c6a90e84..099d0459f3 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass | |||
@@ -950,7 +950,7 @@ python split_and_strip_files () { | |||
950 | 950 | ||
951 | dvar = d.getVar('PKGD') | 951 | dvar = d.getVar('PKGD') |
952 | pn = d.getVar('PN') | 952 | pn = d.getVar('PN') |
953 | targetos = d.getVar('TARGET_OS') | 953 | hostos = d.getVar('HOST_OS') |
954 | 954 | ||
955 | oldcwd = os.getcwd() | 955 | oldcwd = os.getcwd() |
956 | os.chdir(dvar) | 956 | os.chdir(dvar) |
@@ -1105,7 +1105,7 @@ python split_and_strip_files () { | |||
1105 | if (d.getVar('INHIBIT_PACKAGE_DEBUG_SPLIT') != '1'): | 1105 | if (d.getVar('INHIBIT_PACKAGE_DEBUG_SPLIT') != '1'): |
1106 | results = oe.utils.multiprocess_launch(splitdebuginfo, list(elffiles), d, extraargs=(dvar, debugdir, debuglibdir, debugappend, debugsrcdir, d)) | 1106 | results = oe.utils.multiprocess_launch(splitdebuginfo, list(elffiles), d, extraargs=(dvar, debugdir, debuglibdir, debugappend, debugsrcdir, d)) |
1107 | 1107 | ||
1108 | if debugsrcdir and not targetos.startswith("mingw"): | 1108 | if debugsrcdir and not hostos.startswith("mingw"): |
1109 | if (d.getVar('PACKAGE_DEBUG_STATIC_SPLIT') == '1'): | 1109 | if (d.getVar('PACKAGE_DEBUG_STATIC_SPLIT') == '1'): |
1110 | results = oe.utils.multiprocess_launch(splitstaticdebuginfo, staticlibs, d, extraargs=(dvar, debugstaticdir, debugstaticlibdir, debugstaticappend, debugsrcdir, d)) | 1110 | results = oe.utils.multiprocess_launch(splitstaticdebuginfo, staticlibs, d, extraargs=(dvar, debugstaticdir, debugstaticlibdir, debugstaticappend, debugsrcdir, d)) |
1111 | else: | 1111 | else: |
@@ -1667,7 +1667,7 @@ python package_do_shlibs() { | |||
1667 | else: | 1667 | else: |
1668 | shlib_pkgs = packages.split() | 1668 | shlib_pkgs = packages.split() |
1669 | 1669 | ||
1670 | targetos = d.getVar('TARGET_OS') | 1670 | hostos = d.getVar('HOST_OS') |
1671 | 1671 | ||
1672 | workdir = d.getVar('WORKDIR') | 1672 | workdir = d.getVar('WORKDIR') |
1673 | 1673 | ||
@@ -1818,9 +1818,9 @@ python package_do_shlibs() { | |||
1818 | soname = None | 1818 | soname = None |
1819 | if cpath.islink(file): | 1819 | if cpath.islink(file): |
1820 | continue | 1820 | continue |
1821 | if targetos == "darwin" or targetos == "darwin8": | 1821 | if hostos == "darwin" or hostos == "darwin8": |
1822 | darwin_so(file, needed, sonames, renames, pkgver) | 1822 | darwin_so(file, needed, sonames, renames, pkgver) |
1823 | elif targetos.startswith("mingw"): | 1823 | elif hostos.startswith("mingw"): |
1824 | mingw_dll(file, needed, sonames, renames, pkgver) | 1824 | mingw_dll(file, needed, sonames, renames, pkgver) |
1825 | elif os.access(file, os.X_OK) or lib_re.match(file): | 1825 | elif os.access(file, os.X_OK) or lib_re.match(file): |
1826 | linuxlist.append(file) | 1826 | linuxlist.append(file) |