aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-4.8
diff options
context:
space:
mode:
authorJonathan Liu <net147@gmail.com>2013-07-21 20:07:42 +1000
committerSaul Wold <sgw@linux.intel.com>2013-07-25 23:44:26 -0700
commitec95dfeea1f17eb232563e105085852058a86c0b (patch)
tree23b5a71a19d2b4817cf4ca69b3a0da135c97912a /meta/recipes-devtools/gcc/gcc-4.8
parentac5d20f4adac69ea1702694fb50849c9e465b443 (diff)
downloadopenembedded-core-contrib-ec95dfeea1f17eb232563e105085852058a86c0b.tar.gz
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] Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.8')
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/0041-libtool-avoid-libdir.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/0041-libtool-avoid-libdir.patch b/meta/recipes-devtools/gcc/gcc-4.8/0041-libtool-avoid-libdir.patch
new file mode 100644
index 0000000000..2dd9610a2f
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.8/0041-libtool-avoid-libdir.patch
@@ -0,0 +1,19 @@
+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