Re: New threads way questions
On Wed, 31 Jan 2001, Andrey A. Chernov wrote: > I have some questions about new threads way. Daniel says that new way is: > > > gcc -Wall -o foo foo.c -lc_r Only in -current, in -stable continue to use -pthread instead of -lc_r. > 1) What about libgcc_r.a? Is it picked automatically in this case or > not? Is it ever needed now? libgcc_r is gone in both -current and -stable. There is only libgcc.a. libgcc_r may still exist for sometime until folks manually delete it, so ports that are built to require it (-lgcc_r) will work on some systems and fail on others. > 2) Is new way is backward-compatible with old way? I.e. can we just change > ports to use new way and assume that still works on -stable? No, -lc_r will not work under -stable. What might make sense is to have a bsd.port.mk knob, THREADSLIB or something like that, that can be automatically set to -lc_r under -current or -pthread under stable. When we get a libpthread, or even if users want to use LinuxThreads, they can change this knob in /etc/make.conf and have their ports built with whatever threads library they want. Under -current, -pthread has been changed to Do The Right Thing and link in both libc_r and libc. All ports should work without changing them under -current, at least for now. But the -pthread option should go away at some point, so ports need to be changed eventually. > 3) Is -D_THREAD_SAFE required now? Not in -current. You should use it in -stable though. -- Dan Eischen To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: New threads way questions
hi, there! On Wed, 31 Jan 2001, Andrey A. Chernov wrote: > I have some questions about new threads way. Daniel says that new way is: > > > gcc -Wall -o foo foo.c -lc_r > 1) What about libgcc_r.a? Is it picked automatically in this case or > not? Is it ever needed now? we do not have libgcc_r.a in both -current and -stable anymore > 2) Is new way is backward-compatible with old way? I.e. can we just change > ports to use new way and assume that still works on -stable? no > 3) Is -D_THREAD_SAFE required now? no /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: New threads way questions
"Andrey A. Chernov" wrote: > I have some questions about new threads way. Daniel says that new way is: > > > gcc -Wall -o foo foo.c -lc_r > > 1) What about libgcc_r.a? Is it picked automatically in this case or > not? Is it ever needed now? libgcc_r is gone (merged into libgcc.a). In the meantime you should replace it manually with a symlink to libgcc.a (many ports still assume that gcc_r exists). > 2) Is new way is backward-compatible with old way? I.e. can we just change > ports to use new way and assume that still works on -stable? This issue is actually is more complicated than that. While this change has been MFC'ed to the stable, but this option is still required for the older versions (4.2-RELEASE and downward), so ideally __FreeBSD_version should be bumped and -lgcc_r placed into a conditional in all ports that make use of gcc_r. > 3) Is -D_THREAD_SAFE required now? AFAIK yes. -Maxim To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message