This is the mail archive of the 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: [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/    -DDEBUG_ASSERT -lm   -o ./rope    (timeout = 300)
> /usr/ccs/bin/ld: Unsatisfied symbols:
>    std::_Swap_lock_struct<0>::_S_swap_lock       (data)


see src/

  // 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;

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>
    _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?



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