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>
20 lines
562 B
Diff
20 lines
562 B
Diff
Avoid using libdir from .la which usually points to a host path
|
|
|
|
Upstream-Status: Inappropriate [embedded specific]
|
|
Signed-off-by: Jonathan Liu <net147@gmail.com>
|
|
|
|
diff --git a/ltmain.sh b/ltmain.sh
|
|
index a03433f..1902a90 100644
|
|
--- a/ltmain.sh
|
|
+++ b/ltmain.sh
|
|
@@ -5628,6 +5628,9 @@ func_mode_link ()
|
|
absdir="$abs_ladir"
|
|
libdir="$abs_ladir"
|
|
else
|
|
+ # Instead of using libdir from .la which usually points to a host path,
|
|
+ # use the path the .la is contained in.
|
|
+ libdir="$abs_ladir"
|
|
dir="$libdir"
|
|
absdir="$libdir"
|
|
fi
|