<div dir="ltr"><div><div><div>Hi,<br><br></div>Let me know if we need to make any changes to this patch. If so I would be happy to do that.<br><br></div>Thanks,<br></div>Sujith H<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 21, 2016 at 10:47 AM, Sujith H <span dir="ltr">&lt;<a href="mailto:sujith.h@gmail.com" target="_blank">sujith.h@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">From: Christopher Larson &lt;<a href="mailto:chris_larson@mentor.com">chris_larson@mentor.com</a>&gt;<br>
<br>
When built on an i686 host for qemux86-64 without the<br>
fix to obey LD and it fails:<br>
<br>
/scratch/dogwood/toolchains/<wbr>x86_64/bin/i686-pc-linux-gnu-<wbr>ld:<br>
Relocatable linking with relocations from format elf64-x86-64<br>
(/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>
to format elf32-i386 (/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>
is not supported<br>
<br>
This is because LD includes HOST_LD_ARCH, which contains TUNE_LDARGS,<br>
which is -m elf32_x86_64 for x86_64. Without that, direct use of ld will fail.<br>
<br>
Signed-off-by: Christopher Larson &lt;<a href="mailto:chris_larson@mentor.com">chris_larson@mentor.com</a>&gt;<br>
Signed-off-by: Sujith Haridasan &lt;<a href="mailto:Sujith_Haridasan@mentor.com">Sujith_Haridasan@mentor.com</a>&gt;<br>
---<br>
 meta/recipes-kernel/perf/<a href="http://perf.bb" rel="noreferrer" target="_blank">perf.<wbr>bb</a> | 3 ++-<br>
 1 file changed, 2 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/meta/recipes-kernel/perf/<a href="http://perf.bb" rel="noreferrer" target="_blank">per<wbr>f.bb</a> b/meta/recipes-kernel/perf/<a href="http://perf.bb" rel="noreferrer" target="_blank">per<wbr>f.bb</a><br>
index 88e3a0a..0d104d3 100644<br>
--- a/meta/recipes-kernel/perf/<a href="http://perf.bb" rel="noreferrer" target="_blank">per<wbr>f.bb</a><br>
+++ b/meta/recipes-kernel/perf/<a href="http://perf.bb" rel="noreferrer" target="_blank">per<wbr>f.bb</a><br>
@@ -79,6 +79,7 @@ EXTRA_OEMAKE = &#39;\<br>
     ARCH=${ARCH} \<br>
     CC=&quot;${CC}&quot; \<br>
     AR=&quot;${AR}&quot; \<br>
+    LD=&quot;${LD}&quot; \<br>
     EXTRA_CFLAGS=&quot;-ldw&quot; \<br>
     perfexecdir=${libexecdir} \<br>
     NO_GTK2=1 ${TUI_DEFINES} NO_DWARF=1 ${LIBUNWIND_DEFINES} \<br>
@@ -98,7 +99,6 @@ EXTRA_OEMAKE += &quot;\<br>
     &#39;infodir=${@os.path.relpath(<wbr>infodir, prefix)}&#39; \<br>
 &quot;<br>
<br>
-<br>
 do_compile() {<br>
        # Linux kernel build system is expected to do the right thing<br>
        unset CFLAGS<br>
@@ -174,6 +174,7 @@ do_configure_prepend () {<br>
     if [ -e &quot;${S}/tools/lib/api/Makefile&quot; ]; then<br>
         sed -i &#39;s,CC = $(CROSS_COMPILE)gcc,#CC,&#39; ${S}/tools/lib/api/Makefile<br>
         sed -i &#39;s,AR = $(CROSS_COMPILE)ar,#AR,&#39; ${S}/tools/lib/api/Makefile<br>
+        sed -i &#39;s,LD = $(CROSS_COMPILE)ld,#LD,&#39; ${S}/tools/lib/api/Makefile<br>
     fi<br>
     if [ -e &quot;${S}/tools/lib/subcmd/<wbr>Makefile&quot; ]; then<br>
         sed -i &#39;s,CC = $(CROSS_COMPILE)gcc,#CC,&#39; ${S}/tools/lib/subcmd/Makefile<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.9.1<br>
<br>
</font></span></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>