Re: [OE-core] [PATCH] perf: Fix to obey LD failure on host i686

2016-09-20 Thread sujith h
On Wed, Sep 21, 2016 at 3:22 AM, Andre McCurdy  wrote:

> On Mon, Sep 19, 2016 at 11:00 AM, Christopher Larson
>  wrote:
> >
> > On Mon, Sep 19, 2016 at 4:10 AM, sujith h  wrote:
> >>
> >> On Thu, Sep 8, 2016 at 12:36 PM, Andre McCurdy 
> >> wrote:
> >>>
> >>> On Wed, Sep 7, 2016 at 11:51 PM, Sujith H  wrote:
> >>> > From: Christopher Larson 
> >>> >
> >>> > When built on an i686 host for qemux86-64 without the
> >>> > fix to obey LD and it fails:
> >>> >
> >>> > /scratch/dogwood/toolchains/x86_64/bin/i686-pc-linux-gnu-ld:
> >>> > Relocatable linking with relocations from format elf64-x86-64
> >>> >
> >>> > (/scratch/dogwood/perf-ld-test/build/tmp/work/qemux86_
> 64-mel-linux/perf/1.0-r9/perf-1.0/fs/fs.o)
> >>> > to format elf32-i386
> >>> > (/scratch/dogwood/perf-ld-test/build/tmp/work/qemux86_
> 64-mel-linux/perf/1.0-r9/perf-1.0/fs/libapi-in.o)
> >>> > is not supported
> >>> >
> >>> > This is because LD includes HOST_LD_ARCH, which contains TUNE_LDARGS,
> >>> > which is -m elf32_x86_64 for x86_64. Without that, direct use of ld
> >>> > will fail.
> >>> >
> >>> > Signed-off-by: Christopher Larson 
> >>> > Signed-off-by: Sujith Haridasan 
> >>> > ---
> >>> >  meta/recipes-kernel/perf/perf.bb | 9 +
> >>> >  1 file changed, 9 insertions(+)
> >>> >
> >>> > diff --git a/meta/recipes-kernel/perf/perf.bb
> >>> > b/meta/recipes-kernel/perf/perf.bb
> >>> > index 88e3a0a..85fe0ea 100644
> >>> > --- a/meta/recipes-kernel/perf/perf.bb
> >>> > +++ b/meta/recipes-kernel/perf/perf.bb
> >>> > @@ -79,6 +79,7 @@ EXTRA_OEMAKE = '\
> >>> >  ARCH=${ARCH} \
> >>> >  CC="${CC}" \
> >>> >  AR="${AR}" \
> >>> > +LD="${LD}" \
> >>> >  EXTRA_CFLAGS="-ldw" \
> >>> >  perfexecdir=${libexecdir} \
> >>> >  NO_GTK2=1 ${TUI_DEFINES} NO_DWARF=1 ${LIBUNWIND_DEFINES} \
> >>> > @@ -98,6 +99,14 @@ EXTRA_OEMAKE += "\
> >>> >  'infodir=${@os.path.relpath(infodir, prefix)}' \
> >>> >  "
> >>> >
> >>> > +do_configure_prepend () {
> >>> > +for makefile in "${S}/tools/perf/Makefile.perf" \
> >>> > +"${S}/tools/lib/api/Makefile"; do
> >>> > +if [ -e "$makefile" ]; then
> >>> > +sed -i 's,LD = $(CROSS_COMPILE)ld,#LD,' "$makefile"
> >>> > +fi
> >>> > +done
> >>> > +}
> >>>
> >>> Isn't passing LD via the Make command line enough to over-ride these
> >>> definitions in the Makefiles?
> >>
> >> Unfortunately that didn't helped I believe. That's the reason, this
> patch
> >> was created.
> >
> > 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.
>
> Brief testing suggests that commenting out LD in
> ${S}/tools/lib/api/Makefile is still required.
>
> For clarity the new sed command should probably be added next to the
> existing ones for CC and AR though, rather than on its own in a new
> do_configure_prepend().
>
> There is no "LD = ..." line to comment out in
> ${S}/tools/perf/Makefile.perf.
>

I will update the patch  as per the suggestion.

>
> > --
> > Christopher Larson
> > kergoth at gmail dot com
> > Founder - BitBake, OpenEmbedded, OpenZaurus
> > Maintainer - Tslib
> > Senior Software Engineer, Mentor Graphics
>



-- 
സുജിത് ഹരിദാസന്
Bangalore
Contributor to KDE project
Contributor to Yocto project
http://fci.wikia.com/wiki/Anti-DRM-Campaign
 http://sujithh.info
C-x C-c
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] perf: Fix to obey LD failure on host i686

2016-09-20 Thread Andre McCurdy
On Mon, Sep 19, 2016 at 11:00 AM, Christopher Larson
 wrote:
>
> On Mon, Sep 19, 2016 at 4:10 AM, sujith h  wrote:
>>
>> On Thu, Sep 8, 2016 at 12:36 PM, Andre McCurdy 
>> wrote:
>>>
>>> On Wed, Sep 7, 2016 at 11:51 PM, Sujith H  wrote:
>>> > From: Christopher Larson 
>>> >
>>> > When built on an i686 host for qemux86-64 without the
>>> > fix to obey LD and it fails:
>>> >
>>> > /scratch/dogwood/toolchains/x86_64/bin/i686-pc-linux-gnu-ld:
>>> > Relocatable linking with relocations from format elf64-x86-64
>>> >
>>> > (/scratch/dogwood/perf-ld-test/build/tmp/work/qemux86_64-mel-linux/perf/1.0-r9/perf-1.0/fs/fs.o)
>>> > to format elf32-i386
>>> > (/scratch/dogwood/perf-ld-test/build/tmp/work/qemux86_64-mel-linux/perf/1.0-r9/perf-1.0/fs/libapi-in.o)
>>> > is not supported
>>> >
>>> > This is because LD includes HOST_LD_ARCH, which contains TUNE_LDARGS,
>>> > which is -m elf32_x86_64 for x86_64. Without that, direct use of ld
>>> > will fail.
>>> >
>>> > Signed-off-by: Christopher Larson 
>>> > Signed-off-by: Sujith Haridasan 
>>> > ---
>>> >  meta/recipes-kernel/perf/perf.bb | 9 +
>>> >  1 file changed, 9 insertions(+)
>>> >
>>> > diff --git a/meta/recipes-kernel/perf/perf.bb
>>> > b/meta/recipes-kernel/perf/perf.bb
>>> > index 88e3a0a..85fe0ea 100644
>>> > --- a/meta/recipes-kernel/perf/perf.bb
>>> > +++ b/meta/recipes-kernel/perf/perf.bb
>>> > @@ -79,6 +79,7 @@ EXTRA_OEMAKE = '\
>>> >  ARCH=${ARCH} \
>>> >  CC="${CC}" \
>>> >  AR="${AR}" \
>>> > +LD="${LD}" \
>>> >  EXTRA_CFLAGS="-ldw" \
>>> >  perfexecdir=${libexecdir} \
>>> >  NO_GTK2=1 ${TUI_DEFINES} NO_DWARF=1 ${LIBUNWIND_DEFINES} \
>>> > @@ -98,6 +99,14 @@ EXTRA_OEMAKE += "\
>>> >  'infodir=${@os.path.relpath(infodir, prefix)}' \
>>> >  "
>>> >
>>> > +do_configure_prepend () {
>>> > +for makefile in "${S}/tools/perf/Makefile.perf" \
>>> > +"${S}/tools/lib/api/Makefile"; do
>>> > +if [ -e "$makefile" ]; then
>>> > +sed -i 's,LD = $(CROSS_COMPILE)ld,#LD,' "$makefile"
>>> > +fi
>>> > +done
>>> > +}
>>>
>>> Isn't passing LD via the Make command line enough to over-ride these
>>> definitions in the Makefiles?
>>
>> Unfortunately that didn't helped I believe. That's the reason, this patch
>> was created.
>
> 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.

Brief testing suggests that commenting out LD in
${S}/tools/lib/api/Makefile is still required.

For clarity the new sed command should probably be added next to the
existing ones for CC and AR though, rather than on its own in a new
do_configure_prepend().

There is no "LD = ..." line to comment out in ${S}/tools/perf/Makefile.perf.

> --
> Christopher Larson
> kergoth at gmail dot com
> Founder - BitBake, OpenEmbedded, OpenZaurus
> Maintainer - Tslib
> Senior Software Engineer, Mentor Graphics
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] perf: Fix to obey LD failure on host i686

2016-09-19 Thread Christopher Larson
On Mon, Sep 19, 2016 at 4:10 AM, sujith h  wrote:

>
>
> On Thu, Sep 8, 2016 at 12:36 PM, Andre McCurdy 
> wrote:
>
>> On Wed, Sep 7, 2016 at 11:51 PM, Sujith H  wrote:
>> > From: Christopher Larson 
>> >
>> > When built on an i686 host for qemux86-64 without the
>> > fix to obey LD and it fails:
>> >
>> > /scratch/dogwood/toolchains/x86_64/bin/i686-pc-linux-gnu-ld:
>> > Relocatable linking with relocations from format elf64-x86-64
>> > (/scratch/dogwood/perf-ld-test/build/tmp/work/qemux86_64-mel-linux/perf
>> /1.0-r9/perf-1.0/fs/fs.o)
>> > to format elf32-i386 (/scratch/dogwood/perf-ld-test
>> /build/tmp/work/qemux86_64-mel-linux/perf/1.0-r9/perf-1.0/fs/libapi-in.o)
>> > is not supported
>> >
>> > This is because LD includes HOST_LD_ARCH, which contains TUNE_LDARGS,
>> > which is -m elf32_x86_64 for x86_64. Without that, direct use of ld
>> will fail.
>> >
>> > Signed-off-by: Christopher Larson 
>> > Signed-off-by: Sujith Haridasan 
>> > ---
>> >  meta/recipes-kernel/perf/perf.bb | 9 +
>> >  1 file changed, 9 insertions(+)
>> >
>> > diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/
>> perf/perf.bb
>> > index 88e3a0a..85fe0ea 100644
>> > --- a/meta/recipes-kernel/perf/perf.bb
>> > +++ b/meta/recipes-kernel/perf/perf.bb
>> > @@ -79,6 +79,7 @@ EXTRA_OEMAKE = '\
>> >  ARCH=${ARCH} \
>> >  CC="${CC}" \
>> >  AR="${AR}" \
>> > +LD="${LD}" \
>> >  EXTRA_CFLAGS="-ldw" \
>> >  perfexecdir=${libexecdir} \
>> >  NO_GTK2=1 ${TUI_DEFINES} NO_DWARF=1 ${LIBUNWIND_DEFINES} \
>> > @@ -98,6 +99,14 @@ EXTRA_OEMAKE += "\
>> >  'infodir=${@os.path.relpath(infodir, prefix)}' \
>> >  "
>> >
>> > +do_configure_prepend () {
>> > +for makefile in "${S}/tools/perf/Makefile.perf" \
>> > +"${S}/tools/lib/api/Makefile"; do
>> > +if [ -e "$makefile" ]; then
>> > +sed -i 's,LD = $(CROSS_COMPILE)ld,#LD,' "$makefile"
>> > +fi
>> > +done
>> > +}
>>
>> Isn't passing LD via the Make command line enough to over-ride these
>> definitions in the Makefiles?
>>
>
> Unfortunately that didn't helped I believe. That's the reason, this patch
> was created.
>

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.
-- 
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] perf: Fix to obey LD failure on host i686

2016-09-19 Thread sujith h
On Thu, Sep 8, 2016 at 12:36 PM, Andre McCurdy  wrote:

> On Wed, Sep 7, 2016 at 11:51 PM, Sujith H  wrote:
> > From: Christopher Larson 
> >
> > When built on an i686 host for qemux86-64 without the
> > fix to obey LD and it fails:
> >
> > /scratch/dogwood/toolchains/x86_64/bin/i686-pc-linux-gnu-ld:
> > Relocatable linking with relocations from format elf64-x86-64
> > (/scratch/dogwood/perf-ld-test/build/tmp/work/qemux86_
> 64-mel-linux/perf/1.0-r9/perf-1.0/fs/fs.o)
> > to format elf32-i386 (/scratch/dogwood/perf-ld-
> test/build/tmp/work/qemux86_64-mel-linux/perf/1.0-r9/perf-
> 1.0/fs/libapi-in.o)
> > is not supported
> >
> > This is because LD includes HOST_LD_ARCH, which contains TUNE_LDARGS,
> > which is -m elf32_x86_64 for x86_64. Without that, direct use of ld will
> fail.
> >
> > Signed-off-by: Christopher Larson 
> > Signed-off-by: Sujith Haridasan 
> > ---
> >  meta/recipes-kernel/perf/perf.bb | 9 +
> >  1 file changed, 9 insertions(+)
> >
> > diff --git a/meta/recipes-kernel/perf/perf.bb
> b/meta/recipes-kernel/perf/perf.bb
> > index 88e3a0a..85fe0ea 100644
> > --- a/meta/recipes-kernel/perf/perf.bb
> > +++ b/meta/recipes-kernel/perf/perf.bb
> > @@ -79,6 +79,7 @@ EXTRA_OEMAKE = '\
> >  ARCH=${ARCH} \
> >  CC="${CC}" \
> >  AR="${AR}" \
> > +LD="${LD}" \
> >  EXTRA_CFLAGS="-ldw" \
> >  perfexecdir=${libexecdir} \
> >  NO_GTK2=1 ${TUI_DEFINES} NO_DWARF=1 ${LIBUNWIND_DEFINES} \
> > @@ -98,6 +99,14 @@ EXTRA_OEMAKE += "\
> >  'infodir=${@os.path.relpath(infodir, prefix)}' \
> >  "
> >
> > +do_configure_prepend () {
> > +for makefile in "${S}/tools/perf/Makefile.perf" \
> > +"${S}/tools/lib/api/Makefile"; do
> > +if [ -e "$makefile" ]; then
> > +sed -i 's,LD = $(CROSS_COMPILE)ld,#LD,' "$makefile"
> > +fi
> > +done
> > +}
>
> Isn't passing LD via the Make command line enough to over-ride these
> definitions in the Makefiles?
>

Unfortunately that didn't helped I believe. That's the reason, this patch
was created.


>
> >  do_compile() {
> > # Linux kernel build system is expected to do the right thing
> > --
> > 1.9.1
> >
> > --
> > ___
> > Openembedded-core mailing list
> > Openembedded-core@lists.openembedded.org
> > http://lists.openembedded.org/mailman/listinfo/openembedded-core
>



-- 
സുജിത് ഹരിദാസന്
Bangalore
Contributor to KDE project
Contributor to Yocto project
http://fci.wikia.com/wiki/Anti-DRM-Campaign
 http://sujithh.info
C-x C-c
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] perf: Fix to obey LD failure on host i686

2016-09-08 Thread Andre McCurdy
On Wed, Sep 7, 2016 at 11:51 PM, Sujith H  wrote:
> From: Christopher Larson 
>
> When built on an i686 host for qemux86-64 without the
> fix to obey LD and it fails:
>
> /scratch/dogwood/toolchains/x86_64/bin/i686-pc-linux-gnu-ld:
> Relocatable linking with relocations from format elf64-x86-64
> (/scratch/dogwood/perf-ld-test/build/tmp/work/qemux86_64-mel-linux/perf/1.0-r9/perf-1.0/fs/fs.o)
> to format elf32-i386 
> (/scratch/dogwood/perf-ld-test/build/tmp/work/qemux86_64-mel-linux/perf/1.0-r9/perf-1.0/fs/libapi-in.o)
> is not supported
>
> This is because LD includes HOST_LD_ARCH, which contains TUNE_LDARGS,
> which is -m elf32_x86_64 for x86_64. Without that, direct use of ld will fail.
>
> Signed-off-by: Christopher Larson 
> Signed-off-by: Sujith Haridasan 
> ---
>  meta/recipes-kernel/perf/perf.bb | 9 +
>  1 file changed, 9 insertions(+)
>
> diff --git a/meta/recipes-kernel/perf/perf.bb 
> b/meta/recipes-kernel/perf/perf.bb
> index 88e3a0a..85fe0ea 100644
> --- a/meta/recipes-kernel/perf/perf.bb
> +++ b/meta/recipes-kernel/perf/perf.bb
> @@ -79,6 +79,7 @@ EXTRA_OEMAKE = '\
>  ARCH=${ARCH} \
>  CC="${CC}" \
>  AR="${AR}" \
> +LD="${LD}" \
>  EXTRA_CFLAGS="-ldw" \
>  perfexecdir=${libexecdir} \
>  NO_GTK2=1 ${TUI_DEFINES} NO_DWARF=1 ${LIBUNWIND_DEFINES} \
> @@ -98,6 +99,14 @@ EXTRA_OEMAKE += "\
>  'infodir=${@os.path.relpath(infodir, prefix)}' \
>  "
>
> +do_configure_prepend () {
> +for makefile in "${S}/tools/perf/Makefile.perf" \
> +"${S}/tools/lib/api/Makefile"; do
> +if [ -e "$makefile" ]; then
> +sed -i 's,LD = $(CROSS_COMPILE)ld,#LD,' "$makefile"
> +fi
> +done
> +}

Isn't passing LD via the Make command line enough to over-ride these
definitions in the Makefiles?

>  do_compile() {
> # Linux kernel build system is expected to do the right thing
> --
> 1.9.1
>
> --
> ___
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] perf: Fix to obey LD failure on host i686

2016-09-08 Thread Sujith H
From: Christopher Larson 

When built on an i686 host for qemux86-64 without the
fix to obey LD and it fails:

/scratch/dogwood/toolchains/x86_64/bin/i686-pc-linux-gnu-ld:
Relocatable linking with relocations from format elf64-x86-64
(/scratch/dogwood/perf-ld-test/build/tmp/work/qemux86_64-mel-linux/perf/1.0-r9/perf-1.0/fs/fs.o)
to format elf32-i386 
(/scratch/dogwood/perf-ld-test/build/tmp/work/qemux86_64-mel-linux/perf/1.0-r9/perf-1.0/fs/libapi-in.o)
is not supported

This is because LD includes HOST_LD_ARCH, which contains TUNE_LDARGS,
which is -m elf32_x86_64 for x86_64. Without that, direct use of ld will fail.

Signed-off-by: Christopher Larson 
Signed-off-by: Sujith Haridasan 
---
 meta/recipes-kernel/perf/perf.bb | 9 +
 1 file changed, 9 insertions(+)

diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb
index 88e3a0a..85fe0ea 100644
--- a/meta/recipes-kernel/perf/perf.bb
+++ b/meta/recipes-kernel/perf/perf.bb
@@ -79,6 +79,7 @@ EXTRA_OEMAKE = '\
 ARCH=${ARCH} \
 CC="${CC}" \
 AR="${AR}" \
+LD="${LD}" \
 EXTRA_CFLAGS="-ldw" \
 perfexecdir=${libexecdir} \
 NO_GTK2=1 ${TUI_DEFINES} NO_DWARF=1 ${LIBUNWIND_DEFINES} \
@@ -98,6 +99,14 @@ EXTRA_OEMAKE += "\
 'infodir=${@os.path.relpath(infodir, prefix)}' \
 "
 
+do_configure_prepend () {
+for makefile in "${S}/tools/perf/Makefile.perf" \
+"${S}/tools/lib/api/Makefile"; do
+if [ -e "$makefile" ]; then
+sed -i 's,LD = $(CROSS_COMPILE)ld,#LD,' "$makefile"
+fi
+done
+}
 
 do_compile() {
# Linux kernel build system is expected to do the right thing
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core