diff options
author | Christopher Larson <chris_larson@mentor.com> | 2016-09-21 10:47:42 +0530 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-11-08 23:47:14 +0000 |
commit | c9f172aa5eebb649dccd07ec06fc269cfce09e33 (patch) | |
tree | baee374256f6453efc8676ed9cc93a6bce371a03 /meta/recipes-kernel | |
parent | f7e1cd9f85f8bd5f6ea92e747a80786a73b2aa0e (diff) | |
download | poky-c9f172aa5eebb649dccd07ec06fc269cfce09e33.tar.gz |
perf: Fix to obey LD failure on qemux86-64
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.
(From OE-Core rev: 0ce06611068e74e6ea2e226e3f967aaa91fecd25)
(From OE-Core rev: a98f6ed189f564bd1897308a893e294456c1666a)
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Sujith Haridasan <Sujith_Haridasan@mentor.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel')
-rw-r--r-- | meta/recipes-kernel/perf/perf.bb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb index 3d6ffb30fb..9c0d0f32c5 100644 --- a/meta/recipes-kernel/perf/perf.bb +++ b/meta/recipes-kernel/perf/perf.bb | |||
@@ -81,6 +81,7 @@ EXTRA_OEMAKE = '\ | |||
81 | ARCH=${ARCH} \ | 81 | ARCH=${ARCH} \ |
82 | CC="${CC}" \ | 82 | CC="${CC}" \ |
83 | AR="${AR}" \ | 83 | AR="${AR}" \ |
84 | LD="${LD}" \ | ||
84 | EXTRA_CFLAGS="-ldw" \ | 85 | EXTRA_CFLAGS="-ldw" \ |
85 | perfexecdir=${libexecdir} \ | 86 | perfexecdir=${libexecdir} \ |
86 | NO_GTK2=1 ${TUI_DEFINES} NO_DWARF=1 ${LIBUNWIND_DEFINES} \ | 87 | NO_GTK2=1 ${TUI_DEFINES} NO_DWARF=1 ${LIBUNWIND_DEFINES} \ |
@@ -101,7 +102,6 @@ EXTRA_OEMAKE += "\ | |||
101 | 'infodir=${@os.path.relpath(infodir, prefix)}' \ | 102 | 'infodir=${@os.path.relpath(infodir, prefix)}' \ |
102 | " | 103 | " |
103 | 104 | ||
104 | |||
105 | do_compile() { | 105 | do_compile() { |
106 | # Linux kernel build system is expected to do the right thing | 106 | # Linux kernel build system is expected to do the right thing |
107 | unset CFLAGS | 107 | unset CFLAGS |
@@ -164,6 +164,7 @@ do_configure_prepend () { | |||
164 | if [ -e "${S}/tools/lib/api/Makefile" ]; then | 164 | if [ -e "${S}/tools/lib/api/Makefile" ]; then |
165 | sed -i 's,CC = $(CROSS_COMPILE)gcc,#CC,' ${S}/tools/lib/api/Makefile | 165 | sed -i 's,CC = $(CROSS_COMPILE)gcc,#CC,' ${S}/tools/lib/api/Makefile |
166 | sed -i 's,AR = $(CROSS_COMPILE)ar,#AR,' ${S}/tools/lib/api/Makefile | 166 | sed -i 's,AR = $(CROSS_COMPILE)ar,#AR,' ${S}/tools/lib/api/Makefile |
167 | sed -i 's,LD = $(CROSS_COMPILE)ld,#LD,' ${S}/tools/lib/api/Makefile | ||
167 | fi | 168 | fi |
168 | if [ -e "${S}/tools/lib/subcmd/Makefile" ]; then | 169 | if [ -e "${S}/tools/lib/subcmd/Makefile" ]; then |
169 | sed -i 's,CC = $(CROSS_COMPILE)gcc,#CC,' ${S}/tools/lib/subcmd/Makefile | 170 | sed -i 's,CC = $(CROSS_COMPILE)gcc,#CC,' ${S}/tools/lib/subcmd/Makefile |