This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: libgo patch committed: Use libbacktrace
- From: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: gcc-patches at gcc dot gnu dot org, gofrontend-dev at googlegroups dot com
- Date: Thu, 04 Oct 2012 14:11:19 +0200
- Subject: Re: libgo patch committed: Use libbacktrace
- References: <mcr3922fbjw.fsf@google.com>
Ian Lance Taylor <iant@google.com> writes:
> This patch to libgo changes it to use libbacktrace. Previously
> backtraces required the Go package debug/elf to register itself with the
> runtime during the package initialization, which only worked if the
> program actually imported debug/elf one way or another. Bootstrapped
> and ran Go testsuite on x86_64-unknown-linux-gnu. Committed to
> mainline.
Unfortunately, this breaks all use of libgo on versions of Solaris < 11
which lack strnlen:
Undefined first referenced
symbol in file
strnlen /var/gcc/regression/trunk/10-gcc/build/i386-
pc-solaris2.10/libgo/.libs/libgo.so
ld: fatal: symbol referencing errors. No output written to a.out
collect2: error: ld returned 1 exit status
FAIL: bufio
One could either try to also link libiberty into libgo.la, but that has
the complication of needing to decide whether to use libiberty.a or
pic/libiberty.a since libiberty is no libtool library.
Alternatively, one could add another implementation of strnlen to libgo,
which duplicates code.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University