summaryrefslogtreecommitdiffstats
path: root/meta/classes/uninative.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/uninative.bbclass')
-rw-r--r--meta/classes/uninative.bbclass8
1 files changed, 4 insertions, 4 deletions
diff --git a/meta/classes/uninative.bbclass b/meta/classes/uninative.bbclass
index 0a27ec41a7..01fcbc10ca 100644
--- a/meta/classes/uninative.bbclass
+++ b/meta/classes/uninative.bbclass
@@ -63,9 +63,7 @@ python uninative_event_fetchloader() {
63 cmd = d.expand("mkdir -p ${STAGING_DIR}-uninative; cd ${STAGING_DIR}-uninative; tar -xjf ${UNINATIVE_DLDIR}/${UNINATIVE_TARBALL}; ${STAGING_DIR}-uninative/relocate_sdk.py ${STAGING_DIR}-uninative/${BUILD_ARCH}-linux ${UNINATIVE_LOADER} ${UNINATIVE_LOADER} ${STAGING_DIR}-uninative/${BUILD_ARCH}-linux/${bindir_native}/patchelf-uninative") 63 cmd = d.expand("mkdir -p ${STAGING_DIR}-uninative; cd ${STAGING_DIR}-uninative; tar -xjf ${UNINATIVE_DLDIR}/${UNINATIVE_TARBALL}; ${STAGING_DIR}-uninative/relocate_sdk.py ${STAGING_DIR}-uninative/${BUILD_ARCH}-linux ${UNINATIVE_LOADER} ${UNINATIVE_LOADER} ${STAGING_DIR}-uninative/${BUILD_ARCH}-linux/${bindir_native}/patchelf-uninative")
64 subprocess.check_call(cmd, shell=True) 64 subprocess.check_call(cmd, shell=True)
65 65
66 d.setVar("NATIVELSBSTRING", "universal") 66 enable_uninative(d)
67 d.appendVar("SSTATEPOSTUNPACKFUNCS", " uninative_changeinterp")
68 d.prependVar("PATH", "${STAGING_DIR}-uninative/${BUILD_ARCH}-linux${bindir_native}:")
69 67
70 except bb.fetch2.BBFetchException as exc: 68 except bb.fetch2.BBFetchException as exc:
71 bb.warn("Disabling uninative as unable to fetch uninative tarball: %s" % str(exc)) 69 bb.warn("Disabling uninative as unable to fetch uninative tarball: %s" % str(exc))
@@ -82,14 +80,16 @@ python uninative_event_enable() {
82 This event handler is called in the workers and is responsible for setting 80 This event handler is called in the workers and is responsible for setting
83 up uninative if a loader is found. 81 up uninative if a loader is found.
84 """ 82 """
83 enable_uninative(d)
84}
85 85
86def enable_uninative(d):
86 loader = d.getVar("UNINATIVE_LOADER", True) 87 loader = d.getVar("UNINATIVE_LOADER", True)
87 if os.path.exists(loader): 88 if os.path.exists(loader):
88 bb.debug(2, "Enabling uninative") 89 bb.debug(2, "Enabling uninative")
89 d.setVar("NATIVELSBSTRING", "universal") 90 d.setVar("NATIVELSBSTRING", "universal")
90 d.appendVar("SSTATEPOSTUNPACKFUNCS", " uninative_changeinterp") 91 d.appendVar("SSTATEPOSTUNPACKFUNCS", " uninative_changeinterp")
91 d.prependVar("PATH", "${STAGING_DIR}-uninative/${BUILD_ARCH}-linux${bindir_native}:") 92 d.prependVar("PATH", "${STAGING_DIR}-uninative/${BUILD_ARCH}-linux${bindir_native}:")
92}
93 93
94python uninative_changeinterp () { 94python uninative_changeinterp () {
95 import subprocess 95 import subprocess