This is the mail archive of the gcc-bugs@gcc.gnu.org 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]

970917 libio has undefined pthread references with Linux/glibc2


On a Linux system with glibc 2.0.5, the "libio/config/linux.mt"
configuration file sets up the build to use "-D_IO_MTSAFE_IO".  When
this value is defined, "iostream.cc" and "osform.cc" use the pthread
routines "pthread_cleanup_pop_restore" and "pthread_cleanup_push_defer"
internally.  These become undefined references in the object files.

When linking against "libstdc++", these references are still undefined,
and the linker exits with an error.  The only way to successfully link
a program using "libstdc++" is to add "-lpthread" to the link acommand.
This is probably not acceptable in the long term.  Removing the
"IO_MTSAFE_IO" definition is a temporary workaround for people not
using multi-threading.  The best solution to the problem is unclear.

Derek

-- 
Derek Upham
sand@celia.serv.net                                 http://www.serv.net/~sand

"Ha!  Your Leaping Tiger Kung Fu is no match for my Frightened Piglet style!"


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