This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [libitm] Work around missing AVX support


An update .. in case anyone is following...

On 11 Nov 2011, at 00:21, Richard Henderson wrote:

On 11/10/2011 03:29 PM, Iain Sandoe wrote:
The m64 build fails because of the -Wl,-undefined -Wl,dynamic_lookup

FAOD, Is there some reason that this library needs to resolve symbols from some external source at load time?

Not that I know of. I think that's generic libtool giving you that.

hmmm. Some things are not stacking up.


If I:
a) patch around PR50596.
b) patch sjls.S to include the leading "_" on _ITM_beginTransaction and GTM_longjmp.
c) patch varasm to use "__DATA,__tm_clone_table" for the tm_clone_table section name.


most of the test-suite runs on x86-64-darwin10 (with fails on clone, memcpy, memset).
mem{cpy,set} are caused by a different naming for MAP_ANON (vs. MAP_ANONYMOUS).


however, most of the suite fails on darwin9 - with an undefined reference to delete(void*).

This is all puzzling me - because the Makefile.am contains

# Force link with C, not C++.  For now, while we're using C++ we don't
# want or need libstdc++.
libitm_la_LINK = $(LINK)
libitm_la_LDFLAGS = $(libitm_version_info) $(libitm_version_script) \
        -no-undefined

===

however, if I hack the libtool to remove the -Wl,-undefined - Wl,dynamic_lookup ...
... I get :


/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 -dynamiclib -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 -march=i486 -mtune=i686 - pthread -install_name /GCC/gcc-4-7-install/lib/gcc/i686-apple- darwin9/4.7.0/libitm.0.dylib -compatibility_version 1 -current_version 1.0 -Wl,-single_module
Undefined symbols:
"operator delete(void*, std::nothrow_t const&)", referenced from:
_del_opnt in alloc_cpp.o
"operator delete(void*)", referenced from:
__ZdlPv$non_lazy_ptr in alloc_cpp.o
"___cxa_tm_cleanup", referenced from:
GTM::gtm_thread::revert_cpp_exceptions(GTM::gtm_transaction_cp*) in eh_cpp.o
GTM::gtm_thread::revert_cpp_exceptions(GTM::gtm_transaction_cp*) in eh_cpp.o
"operator new[](unsigned long)", referenced from:
transaction clone for operator new[](unsigned long) in alloc_cpp.o
"operator delete[](void*)", referenced from:
__ZdaPv$non_lazy_ptr in alloc_cpp.o
"___cxa_begin_catch", referenced from:
__ITM_cxa_begin_catch in eh_cpp.o
"operator delete[](void*, std::nothrow_t const&)", referenced from:
_del_opvnt in alloc_cpp.o
"operator new[](unsigned long, std::nothrow_t const&)", referenced from:
transaction clone for operator new[](unsigned long, std::nothrow_t const&) in alloc_cpp.o
"operator new(unsigned long, std::nothrow_t const&)", referenced from:
transaction clone for operator new(unsigned long, std::nothrow_t const&) in alloc_cpp.o
"operator new(unsigned long)", referenced from:
transaction clone for operator new(unsigned long) in alloc_cpp.o
"___cxa_allocate_exception", referenced from:
__ITM_cxa_allocate_exception in eh_cpp.o
"___cxa_throw", referenced from:
__ITM_cxa_throw in eh_cpp.o
"___cxa_end_catch", referenced from:
__ITM_cxa_end_catch in eh_cpp.o
ld: symbol(s) not found


i.e. a bunch of undefined c++ symbols...

(have to do some other stuff for a while.. will try to get back o this later).

Iain


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]