This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/16248] New: recent concurrence.h chanes breaks mingw bootstrap
- From: "bothner at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Jun 2004 16:38:04 -0000
- Subject: [Bug libstdc++/16248] New: recent concurrence.h chanes breaks mingw bootstrap
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The problem is that we get this case in concurrence.h:
// Implies __GTHREAD_MUTEX_INIT_FUNCTION
# define __glibcxx_mutex_define_initialized(NAME) \
__gthread_mutex_t NAME; \
__gthread_once_t NAME ## _once = __GTHREAD_ONCE_INIT; \
void NAME ## _init() { __GTHREAD_MUTEX_INIT_FUNCTION(&NAME); }
# define __glibcxx_mutex_lock(NAME) \
__gthread_once(&NAME ## _once, NAME ## _init); \
__gthread_mutex_lock(&NAME)
The class lock uses the macro __glibcxx_mutex_lock.
This makes reference to device_once and device_init.
/home/bothner/GNU/MinGW/build/crossgcc_build/gcc/xgcc -shared-libgcc
-B/home/bothner/GNU/MinGW/build/crossgcc_build/gcc/ -nostdinc++
-L/home/bothner/GNU/MinGW/build/crossgcc_build/i686-pc-mingw32/libstdc++-v3/src
-L/home/bothner/GNU/MinGW/build/crossgcc_build/i686-pc-mingw32/libstdc++-v3/src/.libs
-B/home/bothner/GNU/MinGW/build/crossgcc/i686-pc-mingw32/bin/
-B/home/bothner/GNU/MinGW/build/crossgcc/i686-pc-mingw32/lib/ -isystem
/home/bothner/GNU/MinGW/build/crossgcc/i686-pc-mingw32/include -isystem
/home/bothner/GNU/MinGW/build/crossgcc/i686-pc-mingw32/sys-include
-I/home/bothner/GNU/MinGW/build/crossgcc_build/i686-pc-mingw32/libstdc++-v3/include/i686-pc-mingw32
-I/home/bothner/GNU/MinGW/build/crossgcc_build/i686-pc-mingw32/libstdc++-v3/include
-I/home/bothner/GNU/MinGW/gcc/libstdc++-v3/libsupc++ -O2 -g -g
-fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual
-fdiagnostics-show-location=once -c
/home/bothner/GNU/MinGW/gcc/libstdc++-v3/src/allocator.cc -o allocator.o
In file included from
/home/bothner/GNU/MinGW/build/crossgcc_build/i686-pc-mingw32/libstdc++-v3/include/ext/pool_allocator.h:54,
from /home/bothner/GNU/MinGW/gcc/libstdc++-v3/src/allocator.cc:37:
/home/bothner/GNU/MinGW/build/crossgcc_build/i686-pc-mingw32/libstdc++-v3/include/bits/concurrence.h:
In constructor `__gnu_cxx::lock::lock(__gthread_mutex_t&)':
/home/bothner/GNU/MinGW/build/crossgcc_build/i686-pc-mingw32/libstdc++-v3/include/bits/concurrence.h:76:
error: `device_once' was not declared in this scope
/home/bothner/GNU/MinGW/build/crossgcc_build/i686-pc-mingw32/libstdc++-v3/include/bits/concurrence.h:76:
error: `device_init' was not declared in this scope
/home/bothner/GNU/MinGW/build/crossgcc_build/i686-pc-mingw32/libstdc++-v3/include/bits/concurrence.h:76:
warning: unused variable 'device_once'
/home/bothner/GNU/MinGW/build/crossgcc_build/i686-pc-mingw32/libstdc++-v3/include/bits/concurrence.h:76:
warning: unused variable 'device_init'
make[3]: *** [allocator.lo] Error 1
The problem is these are never defined, as there is no
invocation of the macro __glibcxx_mutex_define_initialized.
I don't see how to fix the lock class to invoke the macro,
since the macro needs to define a C-style function - for
each lock *instance*, which isn't easy to do.
The problem would be for any target that defines __GTHREADS
but not __GTHREAD_MUTEX_INIT - i.e. that uses
__GTHREAD_MUTEX_INIT_FUNCTION.
--
Summary: recent concurrence.h chanes breaks mingw bootstrap
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Severity: critical
Priority: P3
Component: libstdc++
AssignedTo: bkoz at constant dot com
ReportedBy: bothner at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-mingw32
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16248