This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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: libstdc++ related boostrap failure


In article <Pine.BSF.4.51.0302131144330.83957@naos.dbai.tuwien.ac.at> you write:
>Mainline fails to bootstrap on i386-unknown-freebsd4.7:
[...]
>Checking the ChangeLog, I suspect this might be related to the following
>patch:
>
>  2003-02-12  Phil Edwards  <pme@gcc.gnu.org>
>
>        * config/cpu/generic/atomicity.h (_Atomic_add_mutex):  Fix declaration.
>        (_GLIBCPP_NEED_GENERIC_MUTEX):  Define for this file.
>        (_Atomic_add_mutex_once, __gthread_atomic_add_mutex_once):  Declare
>        when we don't have static mutex initialization.
>        (__exchange_and_add):  Use _Atomic_add_mutex_once.
>        * src/misc-inst.cc:  Definitions of all the above.

Yes, I agree it is that change.  I updated only libstdc++-v3 and
rebuilt it against yesterday's compiler bootstrap.  I see the same
failure as Gerald.  The problem is this exact change:

<   __gthread_mutex_t _Atomic_add_mutex __attribute__ ((__weak__))
<                                                       = __GTHREAD_MUTEX_INIT;
---
>   extern __gthread_mutex_t _Atomic_add_mutex;

The non-extern implementation was moved into the library without being
exported in the symbol map (i.e. hidden, not available for satisfying
the linker).

I think I shall allow Phil to handle considering the export of ABI
symbols that are conditionally available on a per-port basis.  OTOH,
the included patch does solve Gerald's problem.

Regards,
Loren

Index: libstdc++-v3/config/linker-map.gnu
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/config/linker-map.gnu,v
retrieving revision 1.30
diff -c -r1.30 linker-map.gnu
*** libstdc++-v3/config/linker-map.gnu	3 Feb 2003 19:37:53 -0000	1.30
--- libstdc++-v3/config/linker-map.gnu	14 Feb 2003 03:12:50 -0000
***************
*** 62,68 ****
        std::__basic_file*;
        std::__num_base*;
        std::__timepunct*;
!       std::__numeric_limits_base*
      };
  
      # Names not in an 'extern' block are mangled names.
--- 62,69 ----
        std::__basic_file*;
        std::__num_base*;
        std::__timepunct*;
!       std::__numeric_limits_base*;
!       __gnu_cxx::_Atomic_add_mutex
      };
  
      # Names not in an 'extern' block are mangled names.


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