On 10 Nov 2011, at 20:33, Patrick Marlier wrote:

On 11/10/2011 03:25 PM, Iain Sandoe wrote:
libtool: link: /GCC/gcc-4-7-trunk-build/./gcc/xgcc
-B/GCC/gcc-4-7-trunk-build/./gcc/
-B/GCC/gcc-4-7-install/i686-apple-darwin9/bin/
-B/GCC/gcc-4-7-install/i686-apple-darwin9/lib/ -isystem
/GCC/gcc-4-7-install/i686-apple-darwin9/include -isystem
/GCC/gcc-4-7-install/i686-apple-darwin9/sys-include -m64 -dynamiclib
-Wl,-undefined -Wl,dynamic_lookup -o .libs/libitm.0.dylib .libs/ aatree.o
.libs/alloc.o .libs/alloc_c.o .libs/alloc_cpp.o .libs/barrier.o
.libs/beginend.o .libs/clone.o .libs/eh_cpp.o .libs/local.o
.libs/query.o .libs/retry.o .libs/rwlock.o .libs/useraction.o
.libs/util.o .libs/sjlj.o .libs/tls.o .libs/method-serial.o
.libs/method-gl.o .libs/x86_sse.o .libs/x86_avx.o -m64 -pthread - pthread
-m64 -m64 -pthread -install_name
/GCC/gcc-4-7-install/lib/gcc/i686-apple-darwin9/4.7.0/x86_64/libitm. 0.dylib
-compatibility_version 1 -current_version 1.0 -Wl,-single_module
ld: codegen problem, can't use rel32 to external symbol in __ITM_malloc
from .libs/alloc_c.o
collect2: error: ld returned 1 exit status

(I think the symbol in question is an __emutls var)

The symbol _ITM_malloc is in libitm. Maybe the problem is an extra _ before the _ITM_malloc?

Actually, I think the missing symbol is ___emutls_v._ZN3GTM12_gtm_thr_tlsE
and (although the m32 lib builds OK - the symbol is also missing there).

The m64 build fails because of the -Wl,-undefined -Wl,dynamic_lookup in combination with the missing var.

the m32 build succeed - but none of the testsuite runs, because the emutls var is missing (not resolved at load).

----

... I strongly suspect it might be another manifestation of:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50598

Has anyone succeeded in building libitm on an emutls target?

Iain

Reply via email to