<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Nov 12, 2015 at 4:40 PM, Christopher Larson <span dir="ltr">&lt;<a href="mailto:kergoth@gmail.com" target="_blank">kergoth@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":2ki" class="a3s" style="overflow:hidden">From: Christopher Larson &lt;<a href="mailto:chris_larson@mentor.com">chris_larson@mentor.com</a>&gt;<br>
<br>
Rather than relying on OECORE_NATIVE_SYSROOT, we can operate relative to the<br>
wrapper binary location.<br>
<br>
Signed-off-by: Christopher Larson &lt;<a href="mailto:chris_larson@mentor.com">chris_larson@mentor.com</a>&gt;<br>
---<br>
 meta/recipes-devtools/perl/<a href="http://perl_5.22.0.bb" rel="noreferrer" target="_blank">perl_5.22.0.bb</a> | 4 +++-<br>
 1 file changed, 3 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/meta/recipes-devtools/perl/<a href="http://perl_5.22.0.bb" rel="noreferrer" target="_blank">perl_5.22.0.bb</a> b/meta/recipes-devtools/perl/<a href="http://perl_5.22.0.bb" rel="noreferrer" target="_blank">perl_5.22.0.bb</a><br>
index 9df8d04..ea0677a 100644<br>
--- a/meta/recipes-devtools/perl/<a href="http://perl_5.22.0.bb" rel="noreferrer" target="_blank">perl_5.22.0.bb</a><br>
+++ b/meta/recipes-devtools/perl/<a href="http://perl_5.22.0.bb" rel="noreferrer" target="_blank">perl_5.22.0.bb</a><br>
@@ -244,9 +244,11 @@ do_install() {<br>
         ln -s Config_heavy.pl ${D}${libdir}/perl/${PV}/Config_heavy-target.pl<br>
 }<br>
<br>
+REL_PERLLIB = &quot;${@os.path.relpath(&#39;${libdir}&#39;, &#39;${bindir}&#39;)}/perl&quot;<br>
+<br>
 do_install_append_class-nativesdk () {<br>
         create_wrapper ${D}${bindir}/perl \<br>
-            PERL5LIB=&#39;$PERL5LIB:$OECORE_NATIVE_SYSROOT/${libdir_nativesdk}/perl/site_perl/${PV}:$OECORE_NATIVE_SYSROOT/${libdir_nativesdk}/perl/vendor_perl/${PV}:$OECORE_NATIVE_SYSROOT/${libdir_nativesdk}/perl/${PV}&#39;<br>
+            PERL5LIB=&#39;$PERL5LIB:`dirname $realpath`/${REL_PERLLIB}/site_perl/${PV}:`dirname $realpath`/${REL_PERLLIB}/vendor_perl/${PV}:`dirname $realpath`/${REL_PERLLIB}/${PV}&#39;</div></blockquote></div><br>Hmm, perhaps create_wrapper should be altered to provide the binary dirname as a variable so we can easily reference it, avoiding the need to repeatedly dirname here.<br>-- <br><div class="gmail_signature"><div dir="ltr">Christopher Larson<br>kergoth at gmail dot com<br>Founder - BitBake, OpenEmbedded, OpenZaurus<br>Maintainer - Tslib<br>Senior Software Engineer, Mentor Graphics</div></div>
</div></div>