* [PATCH] perf: Fix to obey LD failure on qemux86-64
@ 2016-09-08 8:48 Sujith H
0 siblings, 0 replies; 4+ messages in thread
From: Sujith H @ 2016-09-08 8:48 UTC (permalink / raw)
To: openembedded-core; +Cc: Sujith Haridasan, Christopher Larson
From: Christopher Larson <chris_larson@mentor.com>
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 <chris_larson@mentor.com>
Signed-off-by: Sujith Haridasan <Sujith_Haridasan@mentor.com>
---
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] perf: Fix to obey LD failure on qemux86-64
2016-09-26 6:10 ` sujith h
@ 2016-09-26 9:32 ` sujith h
0 siblings, 0 replies; 4+ messages in thread
From: sujith h @ 2016-09-26 9:32 UTC (permalink / raw)
To: OE-core; +Cc: Sujith Haridasan, Christopher Larson
[-- Attachment #1: Type: text/plain, Size: 3124 bytes --]
On Mon, Sep 26, 2016 at 11:40 AM, sujith h <sujith.h@gmail.com> wrote:
> Hi,
>
> Let me know if we need to make any changes to this patch. If so I would be
> happy to do that.
>
Sorry for my earlier mail, this patch is merged:
http://git.openembedded.org/openembedded-core/commit/?id=0ce06611068e74e6ea2e226e3f967aaa91fecd25
>
> Thanks,
> Sujith H
>
> On Wed, Sep 21, 2016 at 10:47 AM, Sujith H <sujith.h@gmail.com> wrote:
>
>> From: Christopher Larson <chris_larson@mentor.com>
>>
>> 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 <chris_larson@mentor.com>
>> Signed-off-by: Sujith Haridasan <Sujith_Haridasan@mentor.com>
>> ---
>> meta/recipes-kernel/perf/perf.bb | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/
>> perf.bb
>> index 88e3a0a..0d104d3 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,7 +99,6 @@ EXTRA_OEMAKE += "\
>> 'infodir=${@os.path.relpath(infodir, prefix)}' \
>> "
>>
>> -
>> do_compile() {
>> # Linux kernel build system is expected to do the right thing
>> unset CFLAGS
>> @@ -174,6 +174,7 @@ do_configure_prepend () {
>> if [ -e "${S}/tools/lib/api/Makefile" ]; then
>> sed -i 's,CC = $(CROSS_COMPILE)gcc,#CC,'
>> ${S}/tools/lib/api/Makefile
>> sed -i 's,AR = $(CROSS_COMPILE)ar,#AR,'
>> ${S}/tools/lib/api/Makefile
>> + sed -i 's,LD = $(CROSS_COMPILE)ld,#LD,'
>> ${S}/tools/lib/api/Makefile
>> fi
>> if [ -e "${S}/tools/lib/subcmd/Makefile" ]; then
>> sed -i 's,CC = $(CROSS_COMPILE)gcc,#CC,'
>> ${S}/tools/lib/subcmd/Makefile
>> --
>> 1.9.1
>>
>>
>
>
> --
> സുജിത് ഹരിദാസന്
> Bangalore
> <Project>Contributor to KDE project
> <Project>Contributor to Yocto project
> http://fci.wikia.com/wiki/Anti-DRM-Campaign
> <Blog> http://sujithh.info
> C-x C-c
>
--
സുജിത് ഹരിദാസന്
Bangalore
<Project>Contributor to KDE project
<Project>Contributor to Yocto project
http://fci.wikia.com/wiki/Anti-DRM-Campaign
<Blog> http://sujithh.info
C-x C-c
[-- Attachment #2: Type: text/html, Size: 5588 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] perf: Fix to obey LD failure on qemux86-64
2016-09-21 5:17 Sujith H
@ 2016-09-26 6:10 ` sujith h
2016-09-26 9:32 ` sujith h
0 siblings, 1 reply; 4+ messages in thread
From: sujith h @ 2016-09-26 6:10 UTC (permalink / raw)
To: OE-core; +Cc: Sujith Haridasan, Christopher Larson
[-- Attachment #1: Type: text/plain, Size: 2577 bytes --]
Hi,
Let me know if we need to make any changes to this patch. If so I would be
happy to do that.
Thanks,
Sujith H
On Wed, Sep 21, 2016 at 10:47 AM, Sujith H <sujith.h@gmail.com> wrote:
> From: Christopher Larson <chris_larson@mentor.com>
>
> 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 <chris_larson@mentor.com>
> Signed-off-by: Sujith Haridasan <Sujith_Haridasan@mentor.com>
> ---
> meta/recipes-kernel/perf/perf.bb | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/
> perf.bb
> index 88e3a0a..0d104d3 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,7 +99,6 @@ EXTRA_OEMAKE += "\
> 'infodir=${@os.path.relpath(infodir, prefix)}' \
> "
>
> -
> do_compile() {
> # Linux kernel build system is expected to do the right thing
> unset CFLAGS
> @@ -174,6 +174,7 @@ do_configure_prepend () {
> if [ -e "${S}/tools/lib/api/Makefile" ]; then
> sed -i 's,CC = $(CROSS_COMPILE)gcc,#CC,'
> ${S}/tools/lib/api/Makefile
> sed -i 's,AR = $(CROSS_COMPILE)ar,#AR,'
> ${S}/tools/lib/api/Makefile
> + sed -i 's,LD = $(CROSS_COMPILE)ld,#LD,'
> ${S}/tools/lib/api/Makefile
> fi
> if [ -e "${S}/tools/lib/subcmd/Makefile" ]; then
> sed -i 's,CC = $(CROSS_COMPILE)gcc,#CC,'
> ${S}/tools/lib/subcmd/Makefile
> --
> 1.9.1
>
>
--
സുജിത് ഹരിദാസന്
Bangalore
<Project>Contributor to KDE project
<Project>Contributor to Yocto project
http://fci.wikia.com/wiki/Anti-DRM-Campaign
<Blog> http://sujithh.info
C-x C-c
[-- Attachment #2: Type: text/html, Size: 4104 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] perf: Fix to obey LD failure on qemux86-64
@ 2016-09-21 5:17 Sujith H
2016-09-26 6:10 ` sujith h
0 siblings, 1 reply; 4+ messages in thread
From: Sujith H @ 2016-09-21 5:17 UTC (permalink / raw)
To: openembedded-core; +Cc: Sujith Haridasan, Christopher Larson
From: Christopher Larson <chris_larson@mentor.com>
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 <chris_larson@mentor.com>
Signed-off-by: Sujith Haridasan <Sujith_Haridasan@mentor.com>
---
meta/recipes-kernel/perf/perf.bb | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb
index 88e3a0a..0d104d3 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,7 +99,6 @@ EXTRA_OEMAKE += "\
'infodir=${@os.path.relpath(infodir, prefix)}' \
"
-
do_compile() {
# Linux kernel build system is expected to do the right thing
unset CFLAGS
@@ -174,6 +174,7 @@ do_configure_prepend () {
if [ -e "${S}/tools/lib/api/Makefile" ]; then
sed -i 's,CC = $(CROSS_COMPILE)gcc,#CC,' ${S}/tools/lib/api/Makefile
sed -i 's,AR = $(CROSS_COMPILE)ar,#AR,' ${S}/tools/lib/api/Makefile
+ sed -i 's,LD = $(CROSS_COMPILE)ld,#LD,' ${S}/tools/lib/api/Makefile
fi
if [ -e "${S}/tools/lib/subcmd/Makefile" ]; then
sed -i 's,CC = $(CROSS_COMPILE)gcc,#CC,' ${S}/tools/lib/subcmd/Makefile
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-09-26 9:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-08 8:48 [PATCH] perf: Fix to obey LD failure on qemux86-64 Sujith H
2016-09-21 5:17 Sujith H
2016-09-26 6:10 ` sujith h
2016-09-26 9:32 ` sujith h
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.