<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 21, 2016 at 3:22 AM, Andre McCurdy <span dir="ltr">&lt;<a href="mailto:armccurdy@gmail.com" target="_blank">armccurdy@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 class="HOEnZb"><div class="h5">On Mon, Sep 19, 2016 at 11:00 AM, Christopher Larson<br>
&lt;<a href="mailto:chris_larson@mentor.com">chris_larson@mentor.com</a>&gt; wrote:<br>
&gt;<br>
&gt; On Mon, Sep 19, 2016 at 4:10 AM, sujith h &lt;<a href="mailto:sujith.h@gmail.com">sujith.h@gmail.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; On Thu, Sep 8, 2016 at 12:36 PM, Andre McCurdy &lt;<a href="mailto:armccurdy@gmail.com">armccurdy@gmail.com</a>&gt;<br>
&gt;&gt; wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On Wed, Sep 7, 2016 at 11:51 PM, Sujith H &lt;<a href="mailto:sujith.h@gmail.com">sujith.h@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt; &gt; From: Christopher Larson &lt;<a href="mailto:chris_larson@mentor.com">chris_larson@mentor.com</a>&gt;<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; When built on an i686 host for qemux86-64 without the<br>
&gt;&gt;&gt; &gt; fix to obey LD and it fails:<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; /scratch/dogwood/toolchains/<wbr>x86_64/bin/i686-pc-linux-gnu-<wbr>ld:<br>
&gt;&gt;&gt; &gt; Relocatable linking with relocations from format elf64-x86-64<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; (/scratch/dogwood/perf-ld-<wbr>test/build/tmp/work/qemux86_<wbr>64-mel-linux/perf/1.0-r9/perf-<wbr>1.0/fs/fs.o)<br>
&gt;&gt;&gt; &gt; to format elf32-i386<br>
&gt;&gt;&gt; &gt; (/scratch/dogwood/perf-ld-<wbr>test/build/tmp/work/qemux86_<wbr>64-mel-linux/perf/1.0-r9/perf-<wbr>1.0/fs/libapi-in.o)<br>
&gt;&gt;&gt; &gt; is not supported<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; This is because LD includes HOST_LD_ARCH, which contains TUNE_LDARGS,<br>
&gt;&gt;&gt; &gt; which is -m elf32_x86_64 for x86_64. Without that, direct use of ld<br>
&gt;&gt;&gt; &gt; will fail.<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; Signed-off-by: Christopher Larson &lt;<a href="mailto:chris_larson@mentor.com">chris_larson@mentor.com</a>&gt;<br>
&gt;&gt;&gt; &gt; Signed-off-by: Sujith Haridasan &lt;<a href="mailto:Sujith_Haridasan@mentor.com">Sujith_Haridasan@mentor.com</a>&gt;<br>
&gt;&gt;&gt; &gt; ---<br>
&gt;&gt;&gt; &gt;  meta/recipes-kernel/perf/<a href="http://perf.bb" rel="noreferrer" target="_blank">perf.<wbr>bb</a> | 9 +++++++++<br>
&gt;&gt;&gt; &gt;  1 file changed, 9 insertions(+)<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; diff --git a/meta/recipes-kernel/perf/<a href="http://perf.bb" rel="noreferrer" target="_blank">per<wbr>f.bb</a><br>
&gt;&gt;&gt; &gt; b/meta/recipes-kernel/perf/<a href="http://perf.bb" rel="noreferrer" target="_blank">per<wbr>f.bb</a><br>
&gt;&gt;&gt; &gt; index 88e3a0a..85fe0ea 100644<br>
&gt;&gt;&gt; &gt; --- a/meta/recipes-kernel/perf/<a href="http://perf.bb" rel="noreferrer" target="_blank">per<wbr>f.bb</a><br>
&gt;&gt;&gt; &gt; +++ b/meta/recipes-kernel/perf/<a href="http://perf.bb" rel="noreferrer" target="_blank">per<wbr>f.bb</a><br>
&gt;&gt;&gt; &gt; @@ -79,6 +79,7 @@ EXTRA_OEMAKE = &#39;\<br>
&gt;&gt;&gt; &gt;      ARCH=${ARCH} \<br>
&gt;&gt;&gt; &gt;      CC=&quot;${CC}&quot; \<br>
&gt;&gt;&gt; &gt;      AR=&quot;${AR}&quot; \<br>
&gt;&gt;&gt; &gt; +    LD=&quot;${LD}&quot; \<br>
&gt;&gt;&gt; &gt;      EXTRA_CFLAGS=&quot;-ldw&quot; \<br>
&gt;&gt;&gt; &gt;      perfexecdir=${libexecdir} \<br>
&gt;&gt;&gt; &gt;      NO_GTK2=1 ${TUI_DEFINES} NO_DWARF=1 ${LIBUNWIND_DEFINES} \<br>
&gt;&gt;&gt; &gt; @@ -98,6 +99,14 @@ EXTRA_OEMAKE += &quot;\<br>
&gt;&gt;&gt; &gt;      &#39;infodir=${@os.path.relpath(<wbr>infodir, prefix)}&#39; \<br>
&gt;&gt;&gt; &gt;  &quot;<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; +do_configure_prepend () {<br>
&gt;&gt;&gt; &gt; +    for makefile in &quot;${S}/tools/perf/Makefile.<wbr>perf&quot; \<br>
&gt;&gt;&gt; &gt; +                    &quot;${S}/tools/lib/api/Makefile&quot;; do<br>
&gt;&gt;&gt; &gt; +        if [ -e &quot;$makefile&quot; ]; then<br>
&gt;&gt;&gt; &gt; +            sed -i &#39;s,LD = $(CROSS_COMPILE)ld,#LD,&#39; &quot;$makefile&quot;<br>
&gt;&gt;&gt; &gt; +        fi<br>
&gt;&gt;&gt; &gt; +    done<br>
&gt;&gt;&gt; &gt; +}<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Isn&#39;t passing LD via the Make command line enough to over-ride these<br>
&gt;&gt;&gt; definitions in the Makefiles?<br>
&gt;&gt;<br>
&gt;&gt; Unfortunately that didn&#39;t helped I believe. That&#39;s the reason, this patch<br>
&gt;&gt; was created.<br>
&gt;<br>
&gt; The patch mirrored the handling of CC/AR, which also used sed at the time<br>
&gt; the append was created. If upstream removed the sed for those, then we can<br>
&gt; remove it for LD as well, presumably. I’d recommend actually testing that.<br>
<br>
</div></div>Brief testing suggests that commenting out LD in<br>
${S}/tools/lib/api/Makefile is still required.<br>
<br>
For clarity the new sed command should probably be added next to the<br>
existing ones for CC and AR though, rather than on its own in a new<br>
do_configure_prepend().<br>
<br>
There is no &quot;LD = ...&quot; line to comment out in ${S}/tools/perf/Makefile.perf.<br></blockquote><div><br></div><div>I will update the patch  as per the suggestion. <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5"><br>
&gt; --<br>
&gt; Christopher Larson<br>
&gt; kergoth at gmail dot com<br>
&gt; Founder - BitBake, OpenEmbedded, OpenZaurus<br>
&gt; Maintainer - Tslib<br>
&gt; Senior Software Engineer, Mentor Graphics<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>സുജിത് ഹരിദാസന്<br>Bangalore<br>&lt;Project&gt;Contributor to KDE project<br></div><div>&lt;Project&gt;Contributor to Yocto project<br></div><div><a href="http://fci.wikia.com/wiki/Anti-DRM-Campaign" target="_blank">http://fci.wikia.com/wiki/Anti-DRM-Campaign</a><br>&lt;Blog&gt; <a href="http://sujithh.info" target="_blank">http://sujithh.info</a><br></div><div>C-x C-c<br></div></div></div></div></div>
</div></div>