The xtensa port uses __xtensa_libgcc_window_spill in libgcc to implement
__builtin_frame_address. This symbol is local/hidden in libgcc. This is not a
problem when linking against static libgcc. But g++ defaults to
-shared-libgcc, thus breaking link against C++ shared libraries that are using
__builtin_frame_address as follows:
ld: test: hidden symbol `__xtensa_libgcc_window_spill' in
.../libgcc.a(lib2funcs.o) is referenced by DSO
Make libgcc_s.so a linker script that links in unresolved symbols from the
static libgcc, similar to the ARM and PowerPC ports.
libgcc/
* config.host (tmake_file): add t-slibgcc-libgcc for xtensa*-*-linux*.
---
libgcc/config.host | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libgcc/config.host b/libgcc/config.host
index 75a17e3..178f6d9 100644
--- a/libgcc/config.host
+++ b/libgcc/config.host
@@ -1181,7 +1181,7 @@ xtensa*-*-elf*)
extra_parts="$extra_parts crti.o crtn.o"
;;
xtensa*-*-linux*)
- tmake_file="$tmake_file xtensa/t-xtensa xtensa/t-linux"
+ tmake_file="$tmake_file xtensa/t-xtensa xtensa/t-linux t-slibgcc-libgcc"
md_unwind_header=xtensa/linux-unwind.h
;;
am33_2.0-*-linux*)
--
1.8.5.2