gcc-4.8: fix compiling GCC when /usr/lib/libstdc++.so is present
authorJonathan Liu <net147@gmail.com>
Sun, 21 Jul 2013 10:07:42 +0000 (20:07 +1000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 29 Jul 2013 12:08:58 +0000 (13:08 +0100)
commit8e4800a842baeb426b115e50bd231e4480332d09
treedca79074ccc25aa070a298944979f79884d1ef56
parentac5b3b0ec33b8ac29b2f68d851ecaa668d4fce98
gcc-4.8: fix compiling GCC when /usr/lib/libstdc++.so is present

libtool is picking up libstdc++.so from /usr/lib when trying to link
libasan due to libstdc++.la containing libdir="/usr/lib". If compiling
for x86 and the host has 64-bit /usr/lib/libstdc++.so, the compilation
fails linking libasan with:
/usr/lib/libstdc++.so: could not read symbols: File in wrong format

To resolve this, patch libtool to look for the library in the path the
.la is contained in rather than use the libdir which usually points to
a host path.

[YOCTO #4879]

(From OE-Core rev: ec95dfeea1f17eb232563e105085852058a86c0b)

Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/gcc/gcc-4.8.inc
meta/recipes-devtools/gcc/gcc-4.8/0041-libtool-avoid-libdir.patch [new file with mode: 0644]