[Bug target/28247] [4.1/4.2 regression] libstdc++ cannot be build with Solaris threads
--- Comment #8 from jr at e-integration dot net 2006-08-09 13:52 --- Created an attachment (id=12046) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12046&action=view) gcc-4.1.1/gcc/gthr-solaris.h weak declaration Fails with latest gcc-4.1.1/gcc/gthr-solaris.h file during bootstrap. CONFIGURE: /gcc-4.1.1/configure sparc64-sun-solaris2.9 \ --prefix=/opt/compiler/GNU/gcc41/gcc-4.1.1 \ --with-gmp --with-mpfr \ --enable-threads=solaris \ --enable-static --enable-shared \ --enable-haifa --with-dwarf2 \ --enable-nls --with-cpu=v9 \ --with-included-gettext \ --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld \ --enable-languages=c,c++,objc,fortran Note: Using CPPFLAGS, CFLAGS, and CXXFLAGS for GMP and MPFR libraries/includes. MAKE BOOTSTRAP: make[4]: Leaving directory `/misc/reloc/root-unified/j/jtaisto/gcc-build/gcc' ./xgcc -B./ -B/opt/OIT/pkg/compiler/GNU/gcc41/gcc-4.1.1/sparc64-sun-solaris2.9/bin/ -isystem /opt/OIT/pkg/compiler/GNU/gcc41/gcc-4.1.1/sparc64-sun-solaris2.9/include -isystem /opt/OIT/pkg/compiler/GNU/gcc41/gcc-4.1.1/sparc64-sun-solaris2.9/sys-include -L/unified/j/jtaisto/gcc-build/gcc/../ld -O2 -O2 -g -O2 -DIN_GCC-W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I -I/gcc-4.1.1/gcc -I/gcc-4.1.1/gcc/ -I/gcc-4.1.1/gcc/../include -I./../intl -I/gcc-4.1.1/gcc/../libcpp/include -Iyes/include -Iyes/include -fexceptions -c /gcc-4.1.1/gcc/unwind-dw2.c -o libgcc/./unwind-dw2.o In file included from ./gthr-default.h:1, from /gcc-4.1.1/gcc/gthr.h:114, from /gcc-4.1.1/gcc/unwind-dw2.c:42: /gcc-4.1.1/gcc/gthr-solaris.h:74: error: weak declaration of '__gthrw_thr_keycreate' must be public /gcc-4.1.1/gcc/gthr-solaris.h:75: error: weak declaration of '__gthrw_thr_getspecific' must be public /gcc-4.1.1/gcc/gthr-solaris.h:76: error: weak declaration of '__gthrw_thr_setspecific' must be public /gcc-4.1.1/gcc/gthr-solaris.h:77: error: weak declaration of '__gthrw_thr_create' must be public /gcc-4.1.1/gcc/gthr-solaris.h:78: error: weak declaration of '__gthrw_thr_self' must be public /gcc-4.1.1/gcc/gthr-solaris.h:80: error: weak declaration of '__gthrw_mutex_init' must be public /gcc-4.1.1/gcc/gthr-solaris.h:81: error: weak declaration of '__gthrw_mutex_destroy' must be public /gcc-4.1.1/gcc/gthr-solaris.h:82: error: weak declaration of '__gthrw_mutex_lock' must be public /gcc-4.1.1/gcc/gthr-solaris.h:83: error: weak declaration of '__gthrw_mutex_trylock' must be public /gcc-4.1.1/gcc/gthr-solaris.h:84: error: weak declaration of '__gthrw_mutex_unlock' must be public make[3]: *** [libgcc/./unwind-dw2.o] Error 1 make[3]: Leaving directory `/misc/reloc/root-unified/j/jtaisto/gcc-build/gcc' make[2]: *** [stmp-multilib] Error 2 make[2]: Leaving directory `/misc/reloc/root-unified/j/jtaisto/gcc-build/gcc' make[1]: *** [stage1_build] Error 2 make[1]: Leaving directory `/misc/reloc/root-unified/j/jtaisto/gcc-build/gcc' make: *** [bootstrap] Error 2 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28247
[Bug target/28665] New: [4.1/4.2 regression] libstdc++ cannot be build with Solaris threads
+++ This bug was initially created as a clone of Bug #28247 +++ gcc 4.1.1 cannot buld on Solaris 9 sparc: $ ./configure --prefix=/home/gcc --enable-threads=solaris --enable-languages=c,c++ --enable-shared=libstdc++ --disable-multilib --disable-nls sparc64-sun-solaris2.9 $ make ... /home/devel/tmp/gcc-4.1.1/objdir/./gcc/xgcc -shared-libgcc -B/home/devel/tmp/gcc-4.1.1/objdir/./gcc -nostdinc++ -L/home/devel/tmp/gcc-4.1.1/objdir/sparc64-sun-solaris2.9/libstdc++-v3/src -L/home/devel/tmp/gcc-4.1.1/objdir/sparc64-sun-solaris2.9/libstdc++-v3/src/.libs -B/home/gcc/sparc64-sun-solaris2.9/bin/ -B/home/gcc/sparc64-sun-solaris2.9/lib/ -isystem /home/gcc/sparc64-sun-solaris2.9/include -isystem /home/gcc/sparc64-sun-solaris2.9/sys-include -I/home/devel/tmp/gcc-4.1.1/libstdc++-v3/../gcc -I/home/devel/tmp/gcc-4.1.1/objdir/sparc64-sun-solaris2.9/libstdc++-v3/include/sparc64-sun-solaris2.9 -I/home/devel/tmp/gcc-4.1.1/objdir/sparc64-sun-solaris2.9/libstdc++-v3/include -I/home/devel/tmp/gcc-4.1.1/libstdc++-v3/libsupc++ -g -O2 -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -c ../../../../libstdc++-v3/libsupc++/eh_alloc.cc -fPIC -DPIC -o eh_alloc.o /home/devel/tmp/gcc-4.1.1/objdir/sparc64-sun-solaris2.9/libstdc++-v3/include/sparc64-sun-solaris2.9/bits/gthr-default.h:437: warning: unused parameter 'key' /home/devel/tmp/gcc-4.1.1/objdir/sparc64-sun-solaris2.9/libstdc++-v3/include/sparc64-sun-solaris2.9/bits/gthr-default.h: In function 'int __gthread_setspecific(__gthread_key_t, const void*)': /home/devel/tmp/gcc-4.1.1/objdir/sparc64-sun-solaris2.9/libstdc++-v3/include/sparc64-sun-solaris2.9/bits/gthr-default.h:456: warning: cast from type 'const void*' to type 'void*' casts away constness /home/devel/tmp/gcc-4.1.1/objdir/sparc64-sun-solaris2.9/libstdc++-v3/include/sparc64-sun-solaris2.9/bits/gthr-default.h: In function 'int __gthread_recursive_mutex_init_function(__gthread_recursive_mutex_t*)': /home/devel/tmp/gcc-4.1.1/objdir/sparc64-sun-solaris2.9/libstdc++-v3/include/sparc64-sun-solaris2.9/bits/gthr-default.h:491: error: '__gthrw_mutex_init' was not declared in this scope /home/devel/tmp/gcc-4.1.1/objdir/sparc64-sun-solaris2.9/libstdc++-v3/include/sparc64-sun-solaris2.9/bits/gthr-default.h: In function 'int __gthread_recursive_mutex_lock(__gthread_recursive_mutex_t*)': /home/devel/tmp/gcc-4.1.1/objdir/sparc64-sun-solaris2.9/libstdc++-v3/include/sparc64-sun-solaris2.9/bits/gthr-default.h:499: error: '__gthrw_thr_self' was not declared in this scope /home/devel/tmp/gcc-4.1.1/objdir/sparc64-sun-solaris2.9/libstdc++-v3/include/sparc64-sun-solaris2.9/bits/gthr-default.h: In function 'int __gthread_recursive_mutex_trylock(__gthread_recursive_mutex_t*)': /home/devel/tmp/gcc-4.1.1/objdir/sparc64-sun-solaris2.9/libstdc++-v3/include/sparc64-sun-solaris2.9/bits/gthr-default.h:517: error: '__gthrw_thr_self' was not declared in this scope make[4]: *** [eh_alloc.lo] Error 1 make[4]: Leaving directory `/home/devel/tmp/gcc-4.1.1/objdir/sparc64-sun-solaris2.9/libstdc++-v3/libsupc++' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/home/devel/tmp/gcc-4.1.1/objdir/sparc64-sun-solaris2.9/libstdc++-v3' make[2]: *** [all] Error 2 make[2]: Leaving directory `/home/devel/tmp/gcc-4.1.1/objdir/sparc64-sun-solaris2.9/libstdc++-v3' make[1]: *** [all-target-libstdc++-v3] Error 2 make[1]: Leaving directory `/home/devel/tmp/gcc-4.1.1/objdir' make: *** [all] Error 2 try with gcc-4.0.3 and SUN cc 5.8 -- Summary: [4.1/4.2 regression] libstdc++ cannot be build with Solaris threads Product: gcc Version: 4.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jr at e-integration dot net GCC build triplet: *-*-solaris2.* GCC host triplet: *-*-solaris2.* GCC target triplet: *-*-solaris2.* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28665
[Bug target/28665] [4.1/4.2 regression] libstdc++ cannot be build with Solaris threads
--- Comment #2 from jr at e-integration dot net 2006-08-09 16:52 --- Created an attachment (id=12048) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12048&action=view) /gcc-4.1.1/gcc/gthr-solaris.h Solaris threads header file bootstrap fails: Here's my configure: /gcc-4.1.1/configure sparc64-sun-solaris2.9 \ --prefix=${PKG_BASE}/compiler/GNU/gcc41/gcc-4.1.1 \ --with-gmp --with-mpfr \ --enable-threads=solaris \ --enable-static --enable-shared \ --enable-haifa --with-dwarf2 \ --enable-nls --with-cpu=v9 \ --with-included-gettext \ --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld \ --enable-languages=c,c++,objc,fortran Note: Using CPPFLAGS, CFLAGS, and CXXFLAGS for GMP and MPFR libraries/includes. GMP is a 64-bit 4.2.1 build MPFR is a 64-bit 2.2.0 build make bootstrap output: make[4]: Leaving directory `/misc/reloc/root-unified/j/jtaisto/gcc-build/gcc' ./xgcc -B./ -B/opt/OIT/pkg/compiler/GNU/gcc41/gcc-4.1.1/sparc64-sun-solaris2.9/bin/ -isystem /opt/OIT/pkg/compiler/GNU/gcc41/gcc-4.1.1/sparc64-sun-solaris2.9/include -isystem /opt/OIT/pkg/compiler/GNU/gcc41/gcc-4.1.1/sparc64-sun-solaris2.9/sys-include -L/unified/j/jtaisto/gcc-build/gcc/../ld -O2 -O2 -g -O2 -DIN_GCC-W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I -I/gcc-4.1.1/gcc -I/gcc-4.1.1/gcc/ -I/gcc-4.1.1/gcc/../include -I./../intl -I/gcc-4.1.1/gcc/../libcpp/include -Iyes/include -Iyes/include -fexceptions -c /gcc-4.1.1/gcc/unwind-dw2.c -o libgcc/./unwind-dw2.o In file included from ./gthr-default.h:1, from /gcc-4.1.1/gcc/gthr.h:114, from /gcc-4.1.1/gcc/unwind-dw2.c:42: /gcc-4.1.1/gcc/gthr-solaris.h:74: error: weak declaration of '__gthrw_thr_keycreate' must be public /gcc-4.1.1/gcc/gthr-solaris.h:75: error: weak declaration of '__gthrw_thr_getspecific' must be public /gcc-4.1.1/gcc/gthr-solaris.h:76: error: weak declaration of '__gthrw_thr_setspecific' must be public /gcc-4.1.1/gcc/gthr-solaris.h:77: error: weak declaration of '__gthrw_thr_create' must be public /gcc-4.1.1/gcc/gthr-solaris.h:78: error: weak declaration of '__gthrw_thr_self' must be public /gcc-4.1.1/gcc/gthr-solaris.h:80: error: weak declaration of '__gthrw_mutex_init' must be public /gcc-4.1.1/gcc/gthr-solaris.h:81: error: weak declaration of '__gthrw_mutex_destroy' must be public /gcc-4.1.1/gcc/gthr-solaris.h:82: error: weak declaration of '__gthrw_mutex_lock' must be public /gcc-4.1.1/gcc/gthr-solaris.h:83: error: weak declaration of '__gthrw_mutex_trylock' must be public /gcc-4.1.1/gcc/gthr-solaris.h:84: error: weak declaration of '__gthrw_mutex_unlock' must be public make[3]: *** [libgcc/./unwind-dw2.o] Error 1 make[3]: Leaving directory `/misc/reloc/root-unified/j/jtaisto/gcc-build/gcc' make[2]: *** [stmp-multilib] Error 2 make[2]: Leaving directory `/misc/reloc/root-unified/j/jtaisto/gcc-build/gcc'