<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"><<a href="mailto:armccurdy@gmail.com" target="_blank">armccurdy@gmail.com</a>></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>
<<a href="mailto:chris_larson@mentor.com">chris_larson@mentor.com</a>> wrote:<br>
><br>
> On Mon, Sep 19, 2016 at 4:10 AM, sujith h <<a href="mailto:sujith.h@gmail.com">sujith.h@gmail.com</a>> wrote:<br>
>><br>
>> On Thu, Sep 8, 2016 at 12:36 PM, Andre McCurdy <<a href="mailto:armccurdy@gmail.com">armccurdy@gmail.com</a>><br>
>> wrote:<br>
>>><br>
>>> On Wed, Sep 7, 2016 at 11:51 PM, Sujith H <<a href="mailto:sujith.h@gmail.com">sujith.h@gmail.com</a>> wrote:<br>
>>> > From: Christopher Larson <<a href="mailto:chris_larson@mentor.com">chris_larson@mentor.com</a>><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>
>>> ><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<br>
>>> > (/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<br>
>>> > will fail.<br>
>>> ><br>
>>> > Signed-off-by: Christopher Larson <<a href="mailto:chris_larson@mentor.com">chris_larson@mentor.com</a>><br>
>>> > Signed-off-by: Sujith Haridasan <<a href="mailto:Sujith_Haridasan@mentor.com">Sujith_Haridasan@mentor.com</a>><br>
>>> > ---<br>
>>> > meta/recipes-kernel/perf/<a href="http://perf.bb" rel="noreferrer" target="_blank">perf.<wbr>bb</a> | 9 +++++++++<br>
>>> > 1 file changed, 9 insertions(+)<br>
>>> ><br>
>>> > diff --git 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>
>>> > index 88e3a0a..85fe0ea 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 = '\<br>
>>> > ARCH=${ARCH} \<br>
>>> > CC="${CC}" \<br>
>>> > AR="${AR}" \<br>
>>> > + LD="${LD}" \<br>
>>> > EXTRA_CFLAGS="-ldw" \<br>
>>> > perfexecdir=${libexecdir} \<br>
>>> > NO_GTK2=1 ${TUI_DEFINES} NO_DWARF=1 ${LIBUNWIND_DEFINES} \<br>
>>> > @@ -98,6 +99,14 @@ EXTRA_OEMAKE += "\<br>
>>> > 'infodir=${@os.path.relpath(<wbr>infodir, prefix)}' \<br>
>>> > "<br>
>>> ><br>
>>> > +do_configure_prepend () {<br>
>>> > + for makefile in "${S}/tools/perf/Makefile.<wbr>perf" \<br>
>>> > + "${S}/tools/lib/api/Makefile"; do<br>
>>> > + if [ -e "$makefile" ]; then<br>
>>> > + sed -i 's,LD = $(CROSS_COMPILE)ld,#LD,' "$makefile"<br>
>>> > + fi<br>
>>> > + done<br>
>>> > +}<br>
>>><br>
>>> Isn't passing LD via the Make command line enough to over-ride these<br>
>>> definitions in the Makefiles?<br>
>><br>
>> Unfortunately that didn't helped I believe. That's the reason, this patch<br>
>> was created.<br>
><br>
> The patch mirrored the handling of CC/AR, which also used sed at the time<br>
> the append was created. If upstream removed the sed for those, then we can<br>
> 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 "LD = ..." 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>
> --<br>
> Christopher Larson<br>
> kergoth at gmail dot com<br>
> Founder - BitBake, OpenEmbedded, OpenZaurus<br>
> Maintainer - Tslib<br>
> 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><Project>Contributor to KDE project<br></div><div><Project>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><Blog> <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>