This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [v3] patch for Missing explicit instantiations in libstdc++
- From: Benjamin Kosnik <bkoz at redhat dot com>
- To: John David Anglin <dave at hiauly1 dot hia dot nrc dot ca>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 7 Dec 2001 08:59:10 -0800 (PST)
- Subject: Re: [v3] patch for Missing explicit instantiations in libstdc++
> Executing on host: /xxx/gnu/gcc-3.1/objdir/gcc/g++ -B/xxx/gnu/gcc-3.1/objdir/gcc/ -nostdinc++ -L/xxx/gnu/gcc-3.1/objdir/hppa2.0w-hp-hpux11.11/libstdc++-v3/src -L/xxx/gnu/gcc-3.1/objdir/hppa2.0w-hp-hpux11.11/libstdc++-v3/src/.libs -B/usr/local/hppa2.0w-hp-hpux11.11/bin/ -B/usr/local/hppa2.0w-hp-hpux11.11/lib/ -isystem /usr/local/hppa2.0w-hp-hpux11.11/include -g -DDEBUG_ASSERT -DLOCALEDIR="/xxx/gnu/gcc-3.1/objdir/hppa2.0w-hp-hpux11.11/libstdc++-v3/po/share/locale" -nostdinc++ -I/xxx/gnu/gcc-3.1/objdir/hppa2.0w-hp-hpux11.11/libstdc++-v3/include/hppa2.0w-hp-hpux11.11 -I/xxx/gnu/gcc-3.1/objdir/hppa2.0w-hp-hpux11.11/libstdc++-v3/include -I/xxx/gnu/gcc-3.1/libstdc++-v3/libsupc++ -I/xxx/gnu/gcc-3.1/libstdc++-v3/libio -I/xxx/gnu/gcc-3.1/libstdc++-v3/include/backward -I/xxx/gnu/gcc-3.1/libstdc++-v3/testsuite /xxx/gnu/gcc-3.1/libstdc++-v3/testsuite/ext/rope.cc -DDEBUG_ASSERT -lm -o ./rope (timeout = 300)
> /usr/ccs/bin/ld: Unsatisfied symbols:
> std::_Swap_lock_struct<0>::_S_swap_lock (data)
Huh.
see src/globalc.cc:
#if __GTHREADS
#ifdef __GTHREAD_MUTEX_INIT
// Need to provide explicit instantiations of static data for
// systems with broken weak linkage support.
template __gthread_mutex_t _Swap_lock_struct<0>::_S_swap_lock;
#elif defined(__GTHREAD_MUTEX_INIT_FUNCTION)
and from include/bits/stl_threads.h:
#if defined (__GTHREAD_MUTEX_INIT)
// This could be optimized to use the atomicity.h abstraction layer.
// vyzo: simple _Atomic_swap implementation following the guidelines above
// We use a template here only to get a unique initialized instance.
template<int __dummy>
struct _Swap_lock_struct
{ static __gthread_mutex_t _S_swap_lock; };
template<int __dummy>
__gthread_mutex_t
_Swap_lock_struct<__dummy>::_S_swap_lock = __GTHREAD_MUTEX_INIT;
...
This is the only place it's defined and declared, and the macro guards
match. Are you sure that (build)/include/bits/c++config.h has the correct
threading info?
??
-benjamin