summaryrefslogtreecommitdiffstats
path: root/meta/classes/package.bbclass
diff options
context:
space:
mode:
authorJoshua Watt <JPEWhacker@gmail.com>2020-07-21 17:52:19 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-07-22 11:45:56 (GMT)
commit0f5ae7e79b87c6d903ca57cb695d802deb8d61d8 (patch)
tree50b59adfce61f426ce3e28bbf86fafbe9818fd0f /meta/classes/package.bbclass
parent3afe7395eedc02aa8f680f606e6bd4b6e57eade8 (diff)
downloadpoky-0f5ae7e79b87c6d903ca57cb695d802deb8d61d8.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: f284c5b2df220b520b025a59874e04ef4becd829) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/package.bbclass')
-rw-r--r--meta/classes/package.bbclass10
1 files changed, 5 insertions, 5 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 0af5f66..f8dc1bb 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1039,7 +1039,7 @@ python split_and_strip_files () {
1039 1039
1040 dvar = d.getVar('PKGD') 1040 dvar = d.getVar('PKGD')
1041 pn = d.getVar('PN') 1041 pn = d.getVar('PN')
1042 targetos = d.getVar('TARGET_OS') 1042 hostos = d.getVar('HOST_OS')
1043 1043
1044 oldcwd = os.getcwd() 1044 oldcwd = os.getcwd()
1045 os.chdir(dvar) 1045 os.chdir(dvar)
@@ -1194,7 +1194,7 @@ python split_and_strip_files () {
1194 if (d.getVar('INHIBIT_PACKAGE_DEBUG_SPLIT') != '1'): 1194 if (d.getVar('INHIBIT_PACKAGE_DEBUG_SPLIT') != '1'):
1195 results = oe.utils.multiprocess_launch(splitdebuginfo, list(elffiles), d, extraargs=(dvar, debugdir, debuglibdir, debugappend, debugsrcdir, d)) 1195 results = oe.utils.multiprocess_launch(splitdebuginfo, list(elffiles), d, extraargs=(dvar, debugdir, debuglibdir, debugappend, debugsrcdir, d))
1196 1196
1197 if debugsrcdir and not targetos.startswith("mingw"): 1197 if debugsrcdir and not hostos.startswith("mingw"):
1198 if (d.getVar('PACKAGE_DEBUG_STATIC_SPLIT') == '1'): 1198 if (d.getVar('PACKAGE_DEBUG_STATIC_SPLIT') == '1'):
1199 results = oe.utils.multiprocess_launch(splitstaticdebuginfo, staticlibs, d, extraargs=(dvar, debugstaticdir, debugstaticlibdir, debugstaticappend, debugsrcdir, d)) 1199 results = oe.utils.multiprocess_launch(splitstaticdebuginfo, staticlibs, d, extraargs=(dvar, debugstaticdir, debugstaticlibdir, debugstaticappend, debugsrcdir, d))
1200 else: 1200 else:
@@ -1761,7 +1761,7 @@ python package_do_shlibs() {
1761 else: 1761 else:
1762 shlib_pkgs = packages.split() 1762 shlib_pkgs = packages.split()
1763 1763
1764 targetos = d.getVar('TARGET_OS') 1764 hostos = d.getVar('HOST_OS')
1765 1765
1766 workdir = d.getVar('WORKDIR') 1766 workdir = d.getVar('WORKDIR')
1767 1767
@@ -1912,9 +1912,9 @@ python package_do_shlibs() {
1912 soname = None 1912 soname = None
1913 if cpath.islink(file): 1913 if cpath.islink(file):
1914 continue 1914 continue
1915 if targetos == "darwin" or targetos == "darwin8": 1915 if hostos == "darwin" or hostos == "darwin8":
1916 darwin_so(file, needed, sonames, renames, pkgver) 1916 darwin_so(file, needed, sonames, renames, pkgver)
1917 elif targetos.startswith("mingw"): 1917 elif hostos.startswith("mingw"):
1918 mingw_dll(file, needed, sonames, renames, pkgver) 1918 mingw_dll(file, needed, sonames, renames, pkgver)
1919 elif os.access(file, os.X_OK) or lib_re.match(file): 1919 elif os.access(file, os.X_OK) or lib_re.match(file):
1920 linuxlist.append(file) 1920 linuxlist.append(file)