<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 19, 2016 at 4:10 AM, sujith h <span dir="ltr"><<a href="mailto:sujith.h@gmail.com" target="_blank">sujith.h@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="adM"><br></div><div class="gmail_extra"><div class="adM"><br></div><div class="gmail_quote"><div class="adM"><div class="h5">On Thu, Sep 8, 2016 at 12:36 PM, 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><div>On Wed, Sep 7, 2016 at 11:51 PM, Sujith H <<a href="mailto:sujith.h@gmail.com" target="_blank">sujith.h@gmail.com</a>> wrote:<br>
> From: Christopher Larson <<a href="mailto:chris_larson@mentor.com" target="_blank">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/x8<wbr>6_64/bin/i686-pc-linux-gnu-ld:<br>
> Relocatable linking with relocations from format elf64-x86-64<br>
> (/scratch/dogwood/<span class="il">perf</span>-ld-test<wbr>/build/tmp/work/qemux86_64-<wbr>mel-linux/<span class="il">perf</span>/1.0-r9/<span class="il">perf</span>-1.<wbr>0/fs/fs.o)<br>
> to format elf32-i386 (/scratch/dogwood/<span class="il">perf</span>-ld-test<wbr>/build/tmp/work/qemux86_64-<wbr>mel-linux/<span class="il">perf</span>/1.0-r9/<span class="il">perf</span>-1.<wbr>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 <<a href="mailto:chris_larson@mentor.com" target="_blank">chris_larson@mentor.com</a>><br>
> Signed-off-by: Sujith Haridasan <<a href="mailto:Sujith_Haridasan@mentor.com" target="_blank">Sujith_Haridasan@mentor.com</a>><br>
> ---<br>
> meta/recipes-kernel/<span class="il">perf</span>/<a href="http://perf.bb" rel="noreferrer" target="_blank"><span class="il">perf</span>.<wbr>bb</a> | 9 +++++++++<br>
> 1 file changed, 9 insertions(+)<br>
><br>
> diff --git a/meta/recipes-kernel/<span class="il">perf</span>/<a href="http://perf.bb" rel="noreferrer" target="_blank">per<wbr>f.bb</a> b/meta/recipes-kernel/<span class="il">perf</span>/<a href="http://perf.bb" rel="noreferrer" target="_blank">per<wbr>f.bb</a><br>
> index 88e3a0a..85fe0ea 100644<br>
> --- a/meta/recipes-kernel/<span class="il">perf</span>/<a href="http://perf.bb" rel="noreferrer" target="_blank">per<wbr>f.bb</a><br>
> +++ b/meta/recipes-kernel/<span class="il">perf</span>/<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(in<wbr>fodir, prefix)}' \<br>
> "<br>
><br>
> +do_configure_prepend () {<br>
> + for makefile in "${S}/tools/<span class="il">perf</span>/Makefile.<span class="il">perf</span><wbr>" \<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>
</div></div>Isn't passing LD via the Make command line enough to over-ride these<br>
definitions in the Makefiles?<br></blockquote><div><br></div></div></div><div>Unfortunately that didn't helped I believe. That's the reason, this patch was created.</div></div></div></blockquote></div><br>The patch mirrored the handling of CC/AR, which also used sed at the time the append was created. If upstream removed the sed for those, then we can remove it for LD as well, presumably. I’d recommend actually testing that.<br>-- <br><div class="gmail_signature" data-smartmail="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>